linwe
2024-08-09 5e2aafeede13d337380f736567caf74f49713be7
src/views/publicSecurity/keynotePlaceManage.vue
@@ -12,12 +12,17 @@
        <el-button type="text" :size="size" plain @click.stop="getDetail(row)">
          详情
        </el-button>
        <el-button type="text" :size="size" icon="el-icon-s-check" v-if="permission.place_check"
          :disabled="row.status != 1" plain @click=" goAudit(row)">审 核
        <el-button type="text" :size="size" v-if="permission.place_check" :disabled="row.status != 1" plain
          @click=" goAudit(row)">审 核
        </el-button>
        <!-- <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain
                    @click="rowDel(row)">删 除
                </el-button> -->
        <!--   <el-button type="text" :size="size" icon="el-icon-view" plain @click="rowDel(row)"> 删除
        </el-button> -->
        <el-button type="text" :size="size" plain @click="rowUpdateLabelColor(row)"> 标签颜色
        </el-button>
      </template>
      <template slot="status" slot-scope="{row, size}">
@@ -48,6 +53,32 @@
      custom-class="flow-design-dialog" :before-close="handleClose">
      <audit-base @handleSubmit="submitAudit"></audit-base>
    </el-dialog>
    <el-dialog :visible.sync="visibleLabelColor" append-to-body destroy-on-close title="标签颜色" width="600px"
      custom-class="flow-design-dialog" :before-close="handleLabelColorClose">
      <div class="labelColor">
        <div style="width:200px; margin: auto;
">
          <div>
            <el-radio-group v-model="color" @input="changColor">
              <el-radio-button label="green">绿</el-radio-button>
              <el-radio-button label="yellow">黄</el-radio-button>
              <el-radio-button label="red">红</el-radio-button>
            </el-radio-group>
          </div>
          <div style=" width:200px;margin: auto; text-align: center;">
            <el-button style="margin-top: 40px;" @click="saveLabelColor()" type="primary">保存</el-button>
          </div>
        </div>
      </div>
    </el-dialog>
    <el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
      <div class="title">
        <div class="icon">{{ refreshNum }}</div>
@@ -58,10 +89,6 @@
          <div class="info-name">场所名称</div>
          <div class="info-value">{{ rowDetail.placeName }}</div>
        </div>
        <!-- <div class="info-item">
          <div class="info-name">场所类别</div>
          <div class="info-value">{{ rowDetail.nineTypeName }}</div>
        </div> -->
        <div class="info-item">
          <div class="info-name">检查人</div>
          <div class="info-value">{{ rowDetail.name }}</div>
@@ -109,7 +136,7 @@
              {{ item.remark }}
            </div>
          </div>
          <div class="yh-pic-box">
          <!--  <div class="yh-pic-box">
            <div class="yh-pic-name">
              整改后图片
            </div>
@@ -126,7 +153,7 @@
            <div class="yh-remark-value">
              {{ item.rectificationRemark }}
            </div>
          </div>
          </div> -->
        </div>
      </div>
    </el-drawer>
@@ -140,6 +167,10 @@
    update,
    add,
  } from "@/api/task/task"
  import {
    updatePoiLabelColor
  } from '@/api/place/place'
  import {
    mapGetters
@@ -187,6 +218,8 @@
      }
      return {
        color: 'green',
        placeId: '',
        isDetail: false,
        refreshNum: 1,
        rowDetail: [],
@@ -201,6 +234,7 @@
          }],
        },
        visible: false,
        visibleLabelColor: false,
        taskType: 0,
        curRow: {},
        roleBox: false,
@@ -220,7 +254,7 @@
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 200,
          menuWidth: 260,
          // menu: false,
          height: "auto",
          calcHeight: 54,
@@ -254,6 +288,7 @@
              searchSpan: 5,
              searchLabelWidth: 76,
            }, {
              width: 140,
              label: "场所名称",
              prop: "placeName",
              span: 24,
@@ -263,6 +298,7 @@
              align: 'center'
            },
            {
              width: 140,
              label: "场所地址",
              prop: "location",
              span: 24,
@@ -271,7 +307,9 @@
              searchLabelWidth: 46,
              overHidden: true,
              align: 'center'
            }, {
            },
            {
              width: 120,
              label: "场所类别",
              prop: "nineType",
              align: 'center',
@@ -352,6 +390,7 @@
              align: 'center'
            },
            {
              width: 100,
              label: "场所负责人电话",
              prop: "principalPhone",
              span: 24,
@@ -375,14 +414,55 @@
              prop: "status",
              span: 24,
              align: 'center',
              slot: true,
              // slot: true,
              type: "select",
              searchSpan: 4,
              search: true,
              dicData: [{
                  label: "待审核",
                  value: 1
                },
                {
                  label: "已审核",
                  value: 2
                },
                {
                  label: "未通过",
                  value: 3
                },
                {
                  label: "待完成",
                  value: 4
                }
              ],
            },
            {
              label: "标签颜色",
              prop: "color",
              span: 24,
              row: true,
              searchLabelWidth: 46,
              align: 'center',
              dicData: [{
                  label: "绿",
                  value: "green",
                },
                {
                  label: "黄",
                  value: "yellow",
                },
                {
                  label: "红",
                  value: "red",
                },
              ],
            },
            {
              width: 120,
              label: "创建时间",
              prop: "createTime",
              span: 24,
              row: true,
              searchSpan: 4,
              searchLabelWidth: 46,
              align: 'center'
            },
@@ -478,6 +558,26 @@
      }
    },
    methods: {
      changColor(e) {
        console.log("*******************", e)
        this.color = e
      },
      saveLabelColor() {
        updatePoiLabelColor(this.placeId, this.color).then(res => {
          if (res.data) {
            this.visibleLabelColor = false
            this.onLoad(this.page, this.query)
          }
        })
      },
      rowUpdateLabelColor(row) {
        this.visibleLabelColor = true
        this.color = row.color
        this.placeId = row.placeId
      },
      // 点击展开收缩
      flodQL(index) {
        this.rowDetail.qTypeList[index].isShowQList = !this.rowDetail.qTypeList[index].isShowQList
@@ -532,7 +632,6 @@
                item.imageUrlsList = item.imageUrls.split(',').map(ele => {
                  return website.minioUrl + ele
                })
              }
              if (item.rectificationImageUrls) {
                item.rectificationImageUrlsList = item.rectificationImageUrls.split(',').map(ele => {
@@ -602,6 +701,11 @@
      // 弹窗关闭回调
      handleClose() {
        this.cancelAudit()
      },
      // 弹窗关闭回调
      handleLabelColorClose() {
        // this.cancelAudit()
        this.visibleLabelColor = false
      },
      // 取消审核
@@ -821,26 +925,7 @@
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          // getPlace(this.form.id).then((res) => {
          //   this.form = res.data.data
          //   if (this.form.imageUrls.length) {
          //     this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
          //       .minioUrl + item).join(',')
          //   }
          //   if (this.form.placePoiLabelVOList.length) {
          //     let lebelTwo = this.form.placePoiLabelVOList.find(item => {
          //       return item.type == 2
          //     })
          //     if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
          //     let lebelThree = this.form.placePoiLabelVOList.find(item => {
          //       return item.type == 3
          //     })
          //     if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
          //   }
          //   done()
          // })
        } else {
        if (["edit", "view"].includes(type)) {} else {
          done()
        }
      },
@@ -877,7 +962,7 @@
            })
          }
          data.records.forEach(item => {
            if (item.signaturePath.length > 0) {
            if (item.signaturePath && item.signaturePath.length > 0) {
              var urls = []
              var names = item.signaturePath.split(",")
              names.forEach(name => {
@@ -1072,4 +1157,10 @@
      }
    }
  }
  .labelColor {
    // display: flex;
    // justify-content: center;
    /* 居中对齐 */
  }
</style>