linwe
2024-08-08 1a5c9d89d7a1347046692ce5086a1391027c8593
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}">
@@ -47,6 +52,31 @@
    <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%"
      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">
@@ -106,7 +136,7 @@
              {{ item.remark }}
            </div>
          </div>
          <div class="yh-pic-box">
          <!--  <div class="yh-pic-box">
            <div class="yh-pic-name">
              整改后图片
            </div>
@@ -123,7 +153,7 @@
            <div class="yh-remark-value">
              {{ item.rectificationRemark }}
            </div>
          </div>
          </div> -->
        </div>
      </div>
    </el-drawer>
@@ -137,6 +167,10 @@
    update,
    add,
  } from "@/api/task/task"
  import {
    updatePoiLabelColor
  } from '@/api/place/place'
  import {
    mapGetters
@@ -184,6 +218,8 @@
      }
      return {
        color: 'green',
        placeId: '',
        isDetail: false,
        refreshNum: 1,
        rowDetail: [],
@@ -198,6 +234,7 @@
          }],
        },
        visible: false,
        visibleLabelColor: false,
        taskType: 0,
        curRow: {},
        roleBox: false,
@@ -217,7 +254,7 @@
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 200,
          menuWidth: 260,
          // menu: false,
          height: "auto",
          calcHeight: 54,
@@ -251,6 +288,7 @@
              searchSpan: 5,
              searchLabelWidth: 76,
            }, {
              width: 140,
              label: "场所名称",
              prop: "placeName",
              span: 24,
@@ -260,6 +298,7 @@
              align: 'center'
            },
            {
              width: 140,
              label: "场所地址",
              prop: "location",
              span: 24,
@@ -268,7 +307,9 @@
              searchLabelWidth: 46,
              overHidden: true,
              align: 'center'
            }, {
            },
            {
              width: 120,
              label: "场所类别",
              prop: "nineType",
              align: 'center',
@@ -349,6 +390,7 @@
              align: 'center'
            },
            {
              width: 100,
              label: "场所负责人电话",
              prop: "principalPhone",
              span: 24,
@@ -372,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'
            },
@@ -475,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
@@ -598,6 +701,11 @@
      // 弹窗关闭回调
      handleClose() {
        this.cancelAudit()
      },
      // 弹窗关闭回调
      handleLabelColorClose() {
        // this.cancelAudit()
        this.visibleLabelColor = false
      },
      // 取消审核
@@ -1049,4 +1157,10 @@
      }
    }
  }
  .labelColor {
    // display: flex;
    // justify-content: center;
    /* 居中对齐 */
  }
</style>