Commit e57ca340 authored by 罗新东's avatar 罗新东
Browse files

修改了上传显示图标,修改了隐患详情不显示图片,已经修改不成功

parent 01410880
Loading
Loading
Loading
Loading
Loading
−2.63 KiB (426 B)
Loading image diff...
+443 B
Loading image diff...
−2.89 KiB (449 B)
Loading image diff...
+61 −15
Original line number Original line Diff line number Diff line
@@ -27,7 +27,11 @@
        @click="showProjectName = true"
        @click="showProjectName = true"
        :rules="[{ required: true, message: '所属项目不能为空' }]"
        :rules="[{ required: true, message: '所属项目不能为空' }]"
      />
      />
      <van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause">
      <van-popup
        v-model="showProjectName"
        position="bottom"
        v-if="!isShowreturnCause"
      >
        <van-picker
        <van-picker
          show-toolbar
          show-toolbar
          value-key="projectName"
          value-key="projectName"
@@ -47,7 +51,11 @@
        @click="showRange = true"
        @click="showRange = true"
        :rules="[{ required: true, message: '适用范围不能为空' }]"
        :rules="[{ required: true, message: '适用范围不能为空' }]"
      />
      />
      <van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause">
      <van-popup
        v-model="showRange"
        position="bottom"
        v-if="!isShowreturnCause"
      >
        <van-picker
        <van-picker
          show-toolbar
          show-toolbar
          value-key="hdRange"
          value-key="hdRange"
@@ -66,6 +74,7 @@
        placeholder="请选择"
        placeholder="请选择"
        @click="showType = true"
        @click="showType = true"
        :rules="[{ required: true, message: '隐患类型不能为空' }]"
        :rules="[{ required: true, message: '隐患类型不能为空' }]"
        :class="{'gray':isShowreturnCause}"
      />
      />
      <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause">
      <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause">
        <van-picker
        <van-picker
@@ -87,7 +96,11 @@
        @click="showDangerName = true"
        @click="showDangerName = true"
        :rules="[{ required: true, message: '隐患项目名称不能为空' }]"
        :rules="[{ required: true, message: '隐患项目名称不能为空' }]"
      />
      />
      <van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause">
      <van-popup
        v-model="showDangerName"
        position="bottom"
        v-if="!isShowreturnCause"
      >
        <van-picker
        <van-picker
          show-toolbar
          show-toolbar
          value-key="hdName"
          value-key="hdName"
@@ -216,7 +229,29 @@
            :max-count="5"
            :max-count="5"
            upload-text="最多上传五个"
            upload-text="最多上传五个"
            v-model="uploaderImg"
            v-model="uploaderImg"
          >
            <template slot="default">
              <!-- 11111111111 -->
              <div
                style="
                  width: 2.13333rem;
                  height: 2.13333rem;
                  background: #f7f8fa;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  flex-direction: column;
                "
              >
                <img
                  src="@/assets/upload/pic.png"
                  alt=""
                  style="width: 0.64rem; height: 0.64rem"
                />
                />
                <span class="van-uploader__upload-text">最多上传五个</span>
              </div>
            </template>
          </van-uploader>
        </template>
        </template>
      </van-field>
      </van-field>


@@ -392,6 +427,7 @@ export default {


  data() {
  data() {
    return {
    return {
      id: 0,
      text: "新增隐患",
      text: "新增隐患",
      taskId: "",
      taskId: "",
      projectId: "", // 所属工程
      projectId: "", // 所属工程
@@ -465,6 +501,7 @@ export default {


    onSubmit(values) {
    onSubmit(values) {
      let formdata = new FormData();
      let formdata = new FormData();
      formdata.append("id", this.id);
      formdata.append("proId", this.projectId);
      formdata.append("proId", this.projectId);
      // formdata.append("projectName", this.projectName);
      // formdata.append("projectName", this.projectName);
      formdata.append("hdRange", values.hdRange);
      formdata.append("hdRange", values.hdRange);
@@ -548,8 +585,9 @@ export default {
          // 对数据进行赋值
          // 对数据进行赋值
          this.returnCause = res.data.reason;
          this.returnCause = res.data.reason;
          let msg = res.data.hdReport;
          let msg = res.data.hdReport;
          msg.hdPictureList=msg.hdPictureList||[];
          // msg.hdPictureList=msg.hdPictureList||[];
          msg.hdVideoList=msg.hdVideoList||[];
          // msg.hdVideoList=msg.hdVideoList||[];
          this.id = msg.id;
          this.projectId = msg.proId;
          this.projectId = msg.proId;
          this.projectName = res.data.projectInformations.filter(
          this.projectName = res.data.projectInformations.filter(
            (item) => item.id == msg.proId
            (item) => item.id == msg.proId
@@ -566,20 +604,28 @@ export default {
          this.describe = msg.hdDescribe;
          this.describe = msg.hdDescribe;
          this.expireTime = msg.hdExpirationTime;
          this.expireTime = msg.hdExpirationTime;
          this.recPeople = msg.rectificationUser;
          this.recPeople = msg.rectificationUser;
          this.uploaderImg = msg.hdPictureList.map(item=>{
          this.uploaderImg = (res.data.imgsysFiles || []).map((item) => {
            return {
            return {
              ...item,
              ...item,
              url:item.filePath
              url: item.filePath,
            }
            };
          })
          });
          this.uploaderVideo =  msg.hdVideoList.map(item=>{
          console.log(this.uploaderImg);
          this.uploaderVideo = (res.data.videosysFiles || []).map((item) => {
            return {
            return {
              ...item,
              ...item,
              url:item.filePath
              url: item.filePath,
            };
          });

          postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then(
            (res) => {
              this.columnsRecPeople = res.data;
            }
            }
          );
        })
        })
        })
        .catch((err) => {
        .catch(() => {
          console.log(err);
          this.$toast.clear();
          this.$toast.clear();
          this.$toast.fail("加载失败,请稍后再试");
          this.$toast.fail("加载失败,请稍后再试");
        });
        });
+2 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@
      :scroll-to-error="true"
      :scroll-to-error="true"
      validate-trigger="onSubmit"
      validate-trigger="onSubmit"
    >
    >
      <van-field name="isResult" label="隐患复查结果">
      <van-field name="isResult" label="审批结果">
        <template #input>
        <template #input>
          <van-radio-group
          <van-radio-group
            v-model="radio"
            v-model="radio"
@@ -42,7 +42,7 @@
            @change="selectResult"
            @change="selectResult"
          >
          >
            <van-radio name="1">同意</van-radio>
            <van-radio name="1">同意</van-radio>
            <van-radio name="0">重新认定隐患级别</van-radio>
            <van-radio name="0">退回</van-radio>
          </van-radio-group>
          </van-radio-group>
        </template>
        </template>
      </van-field>
      </van-field>
Loading