<template>
  <div class="housedetails">
    <div class="list">
      <div class="allpd32rpx bgcFFFFFF mb16rpx">
        <van-row>
          <van-col :span="24">
            <div class="detailstitle width100 mt24rpx border_bottom_ccc">
              <div class="float_left width80">
                <div>{{ form.qymc }}</div>
                <span style="color: #aaaaaa; font-size: 24rpx">
                  {{ form.rzsj ? "园区入驻时间：" + form.rzsj : '园区入驻时间：暂无' }}
                </span>
              </div>
              <div class="width20 float_left">
                <div class="companystatus" v-if="form.settleInType"
                  style="margin-top: -7rpx; float: right; width: 100%">
                  {{ form.settleInType && form.settleInType.length > 0 ? getDicType("type", form.settleInType) : '暂无' }}
                  <!--									{{form.settleInType}}-->
                </div>
              </div>
            </div>
          </van-col>
          <van-col :span="24">
            <div class="typestitle width100 mt24rpx mb16rpx border_bottom_ccc fontcolor251FCA">
              <div class="float_left" style="width: 90%" @click="jumpDeleteTgas()">
                <span v-for="(item, index) in qymcString" :key="index" v-if="qymcString && qymcString.length > 0">
                  {{ item }}
                  ·
                </span>
                <span v-if="!qymcString || qymcString.length == 0">
                  暂无标签
                </span>
              </div>
              <van-icon @click="jumpChosseTags()" class="float_right"
                style="font-size: 50rpx; width: 50rpx; margin-top: -12rpx" name="edit" />
            </div>
          </van-col>
        </van-row>
        <van-row class="border_bottom_ccc">
          <van-col :span="8">
            <div class="yongtu_second_title">入驻状态</div>
            <div class="yongtu_first_title">
              {{ form.entryStatus && form.entryStatus.length > 0 ? form.entryStatusgetDicType("zt", form.entryStatus) :
                '暂无'
              }}
            </div>
          </van-col>
          <!-- <van-col :span="6">
            <div class="yongtu_second_title">所属楼盘</div>
            <div class="yongtu_first_title chaochuyincang">
              {{ !form.areaName ? "暂无" : form.areaName }}
            </div>
          </van-col> -->
          <!-- <van-col :span="6">
            <div class="yongtu_second_title">招商经理</div>
            <div class="yongtu_first_title chaochuyincang">
              {{
                form.investmentManagerName == null
                  ? "暂无"
                  : form.investmentManagerName
              }}
            </div>
          </van-col> -->
          <van-col :span="8">
            <div class="yongtu_second_title">从业人数</div>
            <div class="yongtu_first_title">
              {{ form.practiceNumber == null ? "未知" : form.practiceNumber }}
            </div>
          </van-col>
          <van-col :span="8">
            <div class="yongtu_second_title">所属行业</div>
            <div class="yongtu_first_title chaochuyincang">
              {{ form.industry == null ? "未知" : form.industry }}
            </div>
          </van-col>
        </van-row>
        <div style="
            border-top: 2rpx solid #cccccc;

            font-size: 24rpx;
            color: #777777;
          ">
          <div style="margin: 16rpx 0">
            所属楼盘：{{ !form.areaName ? "暂无" : form.areaName }}
          </div>
          <!-- <div style="margin: 16rpx 0">
            当前企服专员{{
              !form.serviceCommissionerName
                ? "暂无"
                : form.serviceCommissionerName
            }}
          </div> -->
        </div>
      </div>
      <div class="list-row" style="padding-top: 0">
        <uni-collapse v-model="value" style="width: 100%">
          <uni-collapse-item title="基础信息" :open="true" @change="selectItems">
            <view slot="title" class="uni-collapse-item__title-text">基础信息
              <van-icon @click="jumpEditCompanyDetails(id)" name="edit" style="
                  color: #1d18bc;
                  z-index: 100;
                  font-size: 35rpx;
                  font-weight: bold;
                  margin-left: 10px;
                " />
            </view>
            <div style="height: auto">
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
                style="display: flex;height: auto;">
                <view class="input_title float_left">公司名称：</view>
                <span class="input_value float_left" style="color: #777;height: auto;">{{ form.qymc }}</span>

              </view>
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">统一社会信用代码：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.shxydm" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">注册资金（万元）：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.zczj" />
              </view>
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">币种</view>
                <div style="color: #777" class="input_value float_left">
                  {{ getDicType("money", form.currency) }}
                </div>
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">注册时间：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.zcsj" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">法定代表人：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.fddbr" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">法人电话 ：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.legalPersonPhone" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">法人邮箱 ：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.frEmail" />
              </view>

              <!-- <view
                v-if="
                  !form.frsfzh ||
                  form.frsfzh.length == 0 ||
                  form.frsfzh == '暂无'
                "
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
              >
                <view class="input_title float_left">法人身份证：</view>
                <input
                  disabled="true"
                  style="color: #777"
                  class="input_value float_left"
                  placeholder="暂无"
                />
              </view>

              <view
                v-if="form.frsfzh && form.frsfzh.length != 0"
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date"
                style="height: 194rpx"
              >
                <view class="input_title">法人身份证：</view>

                <view class="width100" style="position: relative">
                  <img
                    @click="choosefrsfzh_zhenmian()"
                    :src="
                      BASE_URI +
                      '/FileController/download/' +
                      form.frsfzh_zhenmian
                    "
                    class="idclass margin12rpx float_left"
                    placeholder="请输入"
                  />

                  <img
                    @click="choosefrsfzh_fanmian()"
                    :src="
                      BASE_URI +
                      '/FileController/download/' +
                      form.frsfzh_fanmian
                    "
                    class="idclass margin12rpx float_left"
                    placeholder="请输入"
                  />
                </view>
              </view> -->
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">企业联系人</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.qylxr" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">联系人电话：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.lxdh" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">联系人邮箱：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.email" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">财务负责人：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.cwfzr" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">负责人电话：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.cwfzrdh" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">入驻类型</view>

                <div class="input_value float_left">
                  {{ form.settleInType ? getDicType("type", form.settleInType) : '暂无' }}
                  <!-- {{ form.settleInType }} -->
                </div>
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date" style="display: flex">
                <view class="input_title float_left">招商经理：</view>
                <view style="color: #777; font-size: 28rpx; width: 60%">
                  {{ form.investmentManagerName == 'undefined' ? form.investmentManagerName : '暂无' }}
                </view>
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">所属楼盘：</view>
                <input disabled="true" style="color: #777" class="input_value float_left" placeholder="暂无"
                  v-model="form.areaName" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
                style="display: flex;height: auto;">
                <view class="input_title float_left">注册地址：</view>
                <span class="input_value float_left" style="color: #777;height: auto;">{{ form.zcdz }}</span>

              </view>
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">
                  <span style="color: red">*&nbsp;</span>
                  所属园区
                </view>
                <div style="width: 315rpx; float: left">{{ form.parkInfoName || '请选择' }}</div>
                <!--                <img class="height40rpx width40rpx float_left" src="../../../static/mine/youjiantou.png" alt="" />-->
              </view>
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">
                  <span style="color: red">*&nbsp;</span>

                  面积:
                </view>
                <input style="color: #777" class="input_value float_left" placeholder="请输入" v-model="form.areaSize" />
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx">
                <view class="input_title float_left">
                  <span style="color: red">*&nbsp;</span>
                  经营地址：
                </view>
                <input style="color: #777" class="input_value float_left" placeholder="请输入" v-model="form.jydzValue" />
              </view>
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date"
                style="    display: flex;align-items: center;flex-direction: column;">
                <view class="input_title float_left" style="width: 100%;display: flex;justify-content: space-between;">
                  <div><span style="color: red">*&nbsp;</span> 经营地址载体：</div>
                </view>
                <div v-for="item in jydzAry" class="jydzList">
                  <div class="jydzList-row">{{ item.name }}</div>
                </div>
              </view>
              <textarea class="mt24rpx border_bottom_ccc" :maxlength="2000" placeholder="请输入经营地址说明"
                v-model="form.jydzRemark" type="textarea" style="
                height: 270rpx;
                background: rgba(249, 249, 249, 1);
                padding: 20rpx;
                width: calc(100% - 40rpx);
              " />
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date" style="display: flex">
                <view class="input_title">主营业务：</view>
                <div>
                  <span v-for="(item, index) in form.jyfw" :key="index">
                    {{ item }}
                    {{ form.jyfw && index != form.jyfw.length - 1 ? ',' : '' }}
                  </span>
                </div>
              </view>
              <view class="width100 mt24rpx list_date height40rpx">
                <view class="input_title float_left" style="width: 52%">营业执照副本：（限1张）</view>
              </view>
              <view class="custom-image-box" style="position: relative">
                <img :src="!form.yyzzfbzp ||
                  form.yyzzfbzp == 'null' ||
                  form.yyzzfbzp == '暂无'
                  ? '../../../static/unuploadzhizhao.png'
                  : BASE_URI + '/FileController/download/' + form.yyzzfbzp
                  " style="color: #777; width: 300rpx; height: 260rpx" placeholder="请输入" />
              </view>
              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height300rpxs">
                <view class="input_title float_left">荣誉信息（限6张）</view>
                <textarea :maxlength="2000" placeholder="请输入" v-model="form.honorInformation" type="textarea" style="
                    height: 270rpx;
                    background: rgba(249, 249, 249, 1);
                    padding: 20rpx;
                    width: calc(100% - 40rpx);
                  " />
                <div style="
                    background: rgba(249, 249, 249, 1);
                    text-align: right;
                    padding-right: 10px;
                    padding-bottom: 10rpx;
                    margi-bottom: 10rpx;
                  ">
                  {{
                    form.honorInformation ? form.honorInformation.length : 0
                  }}/2000
                </div>
                <view class="custom-image-box" style="margin-top: 20rpx; display: flex">
                  <img v-for="item in form.ryxxzp" :key="item" :src="BASE_URI + '/FileController/download/' + item"
                    class="idclass margin12rpx float_left" placeholder="请输入" />
                </view>
              </view>

              <view class="width100 mt24rpx padb24rpx border_bottom_ccc list_date" style="display: flex">
                <view class="input_title float_left">关联企业：</view>
                <div style="color: #777; width: 60%" class="float_left">
                  {{ form.associationCompanyName }}
                </div>
              </view>
            </div>
          </uni-collapse-item>
        </uni-collapse>
      </div>
      <div class="list-row" style="padding-top: 0">
        <uni-collapse v-model="value2" style="width: 100%">
          <uni-collapse-item title="关联社会载体" :open="true" @change="selectItems">
            <view slot="title" class="uni-collapse-item__title-text">关联社会载体
            </view>
            <div style="height: auto">
              <div class="form_row pdt32 pdb32 border_bottom_ccc width100" style="display: flex; height: auto">
                <div class="width30 first_title">自有</div>
                <div style="width: 60%" class="float_left font28rpx">
                  {{
                    form.socialCarrierStrName
                      ? form.socialCarrierStrName
                      : "暂无"
                  }}
                </div>
              </div>

              <div class="form_row pdt32 pdb32 border_bottom_ccc width100" style="display: flex; height: auto">
                <div class="width30 first_title">租赁</div>
                <div style="width: 60%" class="float_left font28rpx">
                  {{
                    form.socialCarrierLeaseStrName
                      ? form.socialCarrierLeaseStrName
                      : "暂无"
                  }}
                </div>
              </div>

              <div class="form_row pdt32 pdb32 border_bottom_ccc width100" style="display: flex; height: auto">
                <div class="width30 first_title">未确定</div>
                <div style="width: 60%" class="float_left font28rpx">
                  {{
                    form.socialCarrierNoTrueName
                      ? form.socialCarrierNoTrueName
                      : "暂无"
                  }}
                </div>
              </div>
            </div>
          </uni-collapse-item>
        </uni-collapse>
      </div>
      <div class="list-row" style="padding-top: 0">
        <uni-collapse v-model="value2" style="width: 100%">
          <uni-collapse-item title="关联自有载体" :open="true" @change="selectItems">
            <view slot="title" class="uni-collapse-item__title-text">关联自有载体
            </view>
            <div style="height: auto">
              <div class="form_row pdt32 pdb32 border_bottom_ccc width100" style="display: flex; height: auto">
                <div class="width30 first_title">有合同</div>
                <div style="width: 60%" class="float_left font28rpx">
                  {{
                    !form.socialCarrierName ? "暂无" : form.socialCarrierName
                  }}
                </div>
              </div>
              <div class="form_row pdt32 pdb32 border_bottom_ccc width100" style="display: flex; height: auto">
                <div class="width30 first_title">无合同</div>
                <div style="width: 60%" class="float_left font28rpx">
                  {{
                    form.contractCarrierNoStrName
                      ? form.contractCarrierNoStrName
                      : "暂无"
                  }}
                </div>
              </div>
            </div>
          </uni-collapse-item>
        </uni-collapse>
      </div>
      <!-- <div class="list-row" style="padding-top: 0">
        <uni-collapse v-model="value1" style="width: 100%">
          <uni-collapse-item
            title="走访信息"
            :open="true"
            @change="selectItems"
          >
            <div
              style="height: auto; margin: 32rpx 0 32rpx 0"
              v-for="item in interviewList"
              :key="item.id"
            >
              <view
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
              >
                <view class="input_title float_left">走访时间：</view>
                <input
                  disabled="true"
                  style="color: #777"
                  class="input_value float_left"
                  placeholder="暂无"
                  v-model="item.interviewTime"
                />
              </view>

              <view
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
              >
                <view class="input_title float_left">走访类型：</view>
                <div
                  disabled="true"
                  style="color: #777"
                  class="input_value float_left"
                  placeholder="暂无"
                >
                  {{ getDicTypeZoufang(item.interviewType) }}
                </div>
              </view>

              <view
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date"
                style="display: flex"
              >
                <view class="input_title float_left">走访记录：</view>
                <div style="color: #777; width: 60%" class="float_left">
                  {{ item.interviewRecord }}
                </div>
              </view>

              <view
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
              >
                <view class="input_title float_left">是否需要处理：</view>

                <div class="input_value float_left">
                  <span style="color: #777" v-if="item.isStatus == 2">是</span>
                  <span style="color: #777" v-if="item.isStatus == 1">否</span>
                </div>
              </view>

              <view
                v-if="item.isStatus == 2"
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date height40rpx"
              >
                <view class="input_title float_left">处理人：</view>
                <input
                  disabled="true"
                  style="color: #777"
                  class="input_value float_left"
                  placeholder="暂无"
                  v-model="item.handleUserName"
                />
              </view>

              <view
                v-if="item.isStatus == 2"
                class="width100 mt24rpx padb24rpx border_bottom_ccc list_date"
                style="display: flex"
              >
                <view class="input_title float_left">处理结果：</view>

                <div style="color: #777; width: 60%" class="float_left">
                  {{
                    !item.handleResult || item.handleResult == "null"
                      ? ""
                      : item.handleResult
                  }}
                </div>
              </view>
              <div
                color="#1D18BC"
                class="dengjibutton"
                @click="openHandleReportDialog(item)"
                v-if="
                  item.isStatus == 2 &&
                  !item.handleUserName &&
                  !item.handleResult
                "
              >
                处理登记
              </div>
              <div
                color="#1D18BC"
                class="dengjibutton"
                style="background: #e6e8e9"
                v-if="
                  item.isStatus != 2 ||
                  (item.handleUserName && item.handleResult)
                "
              >
                无需处理
              </div>
            </div>
          </uni-collapse-item>
        </uni-collapse>
      </div> -->
    </div>
    <handle-report ref="handleReport" @changeActive="changeActive" />
  </div>
</template>

<script>
import {
  getCompanyHouseDetails,
  getByCodes,
  getCompanyTagsByQybq,
  interviewEscalationListAll,
  findCompanyTags,
  selectByCompanyId,
  getRoomNameByCompanyId,
  getAreaByIds
} from "@/js_sdk/http";
import handleReport from "../companyreport/components/handlereport.vue";
export default {
  components: {
    handleReport,
  },
  data() {
    return {

      BASE_URI: this.$constant.BASE_URI,
      id: "",
      qymcString: [],
      dic_SelectList: {},
      interviewList: [],
      dic_key: [
        "MNP_BUILDING_TYPE",
        "SETTLE_IN_STATUS",
        "interviewType",
        "CURRENCY",
      ],
      activeNames: [],
      StatusBar: 0,
      search: {
        pageSize: 10,
        pageNum: 1,
      },
      form: {
        id: "",
        settleInType: null,
        socialCarrierName: "123123",
      },
      // value: true,
      value1: true,
      value2: true,
      list: [],
      value: ["0"],
      modeIndex: -1,
      styleIndex: -1,
      current: 0,
      mode: "default",
      dotsStyles: {},
      swiperDotIndex: 0,
      jydzAry: []
    };
  },

  onLoad(option) {
    try {
      this.id = option.id;
      this.getByCodes();
    } catch (error) {
      console.log(error);
    }
  },
  onShow() {
    this.getByCodes();
    this.findCompanyTags(this.id);
  },
  methods: {
    async getRoomNameByCompanyId() {
      let socialCarrierName = await getRoomNameByCompanyId({
        companyId: this.id,
      });
      this.form.socialCarrierName = socialCarrierName;
      let form = { ...this.form }
      this.form = {}
      this.form = form
    },
    async selectByCompanyId1() {
      let zaiti = await selectByCompanyId({ companyId: this.id });
      console.log("zaitizaitizaitizaiti", zaiti);
      let socialCarrierStr = [];
      let socialCarrierStrName = [];
      let socialCarrierLeaseStr = [];
      let socialCarrierLeaseStrName = [];
      let socialCarrierNoTrue = [];
      let socialCarrierNoTrueName = [];
      let contractCarrierNoStr = [];
      let contractCarrierNoStrName = [];
      for (let i = 0; i < zaiti.length; i++) {
        let item = zaiti[i];
        console.log(item.propertyNature, item.socialType);
        if (item.propertyNature === "2" && item.socialType === "1") {
          socialCarrierStr.push(item.houseId);
          socialCarrierStrName.push(
            item.discName + item.groupName + item.buildName + item.houseName
          );
        }
        if (item.propertyNature === "2" && item.socialType === "2") {
          socialCarrierLeaseStr.push(item.houseId);
          socialCarrierLeaseStrName.push(
            item.discName + item.groupName + item.buildName + item.houseName
          );
        }
        if (item.propertyNature === "2" && item.socialType === "3") {
          socialCarrierNoTrue.push(item.houseId);
          socialCarrierNoTrueName.push(
            item.discName + item.groupName + item.buildName + item.houseName
          );
        }
        if (item.propertyNature === "1" && item.ownType === "2") {
          contractCarrierNoStr.push(item.houseId);
          contractCarrierNoStrName.push(
            item.discName + item.groupName + item.buildName + item.houseName
          );
        }
      }
      this.form.socialCarrierStr = socialCarrierStr.join(",");
      this.form.socialCarrierStrName = socialCarrierStrName.join(",");
      this.form.socialCarrierLeaseStr = socialCarrierLeaseStr.join(",");
      this.form.socialCarrierLeaseStrName = socialCarrierLeaseStrName.join(",");
      this.form.socialCarrierNoTrue = socialCarrierNoTrue.join(",");
      this.form.socialCarrierNoTrueName = socialCarrierNoTrueName.join(",");
      this.form.contractCarrierNoStr = contractCarrierNoStr.join(",");
      this.form.contractCarrierNoStrName = contractCarrierNoStrName.join(",");
      console.log(this.form);
    },
    async findCompanyTags(id) {
      let data = await findCompanyTags(id);
      this.qymcString = data.map((e) => {
        return e.tagName;
      });
    },
    jumpEditCompanyDetails(e) {
      uni.navigateTo({
        url: "/pages/subPackages/companyDetailsEdit/companyDetailsEdit?id=" + e,
      });
    },
    jumpDeleteTgas() {
      uni.navigateTo({
        url: "/pages/subPackages/companyTagsDelete/index?id=" + this.form.id,
      });
    },
    jumpChosseTags() {
      try {
        uni.navigateTo({
          url: "/pages/subPackages/chooseCompanyTags/index?id=" + this.form.id,
        });
      } catch (error) { }
    },
    openHandleReportDialog(item) {
      let that = this;
      that.$refs.handleReport.openDianlog(item);
    },
    getDicTypeZoufang(value) {
      if (!value && this.dic_SelectList.interviewType) return;
      let interviewType = this.dic_SelectList.interviewType;
      let index = interviewType.findIndex((e) => e.value == value);
      if (index != -1) return interviewType[index].label;
    },
    getDicType(type, value) {
      if (type == "money" && this.dic_SelectList.CURRENCY) {
        let CURRENCY = this.dic_SelectList.CURRENCY;
        let index = CURRENCY.findIndex((e) => e.value == value);
        console.log(index)
        if (index != -1) return CURRENCY[index].label;
        else return "暂无";
      }
      if (type == "type" && this.dic_SelectList.MNP_BUILDING_TYPE) {
        if (value) {
          let MNP_BUILDING_TYPE = this.dic_SelectList.MNP_BUILDING_TYPE;
          let index = MNP_BUILDING_TYPE.findIndex((e) => e.value == value);
          if (index != -1) {
            return MNP_BUILDING_TYPE[index].label;
          } else return "暂无";
        } else {
          return "";
        }
      }
      if (type == "zt" && this.dic_SelectList.SETTLE_IN_STATUS) {
        // console.log('entryStatusentryStatusentryStatusentryStatusentryStatusentryStatusentryStatusentryStatusentryStatus',value)
        // console.log('entryStatusentryStatusentryStatusentryStatusentryStatusentryStatusentryStatusentryStatusentryStatus',this.dic_SelectList.SETTLE_IN_STATUS)

        let SETTLE_IN_STATUS = this.dic_SelectList.SETTLE_IN_STATUS;
        let index = SETTLE_IN_STATUS.findIndex((e) => e.value == value);
        if (index != -1) return SETTLE_IN_STATUS[index].label;
        else return "暂无";
      }
    },
    async getByCodes() {
      try {
        this.search.pageNum = 1;
        let data = await getByCodes(JSON.stringify(this.dic_key));

        this.dic_SelectList = this.$common.handleDicList(data);
        let interviewList = await interviewEscalationListAll(this.id);
        this.getCompanyHouseDetails(this.id);

        this.interviewList = interviewList;
      } catch (error) {
        console.log(error);
      }
    },

    async changeActive() {
      let interviewList = await interviewEscalationListAll(this.id);
      this.interviewList = interviewList;
    },
    selectItems(e) {
      this.$nextTick(() => {
        this.$refs.collapse.resize();
      });
    },
    choosefrsfzh_zhenmian() {
      let that = this;

      uni.previewImage({
        urls: [
          that.BASE_URI +
          "/FileController/download/" +
          that.form.frsfzh_zhenmian,
        ],
        longPressActions: {
          itemList: ["发送给朋友", "保存图片", "收藏"],
          success: function (data) { },
          fail: function (err) { },
        },
      });
    },
    choosefrsfzh_fanmian() {
      let that = this;

      uni.previewImage({
        urls: [
          that.BASE_URI +
          "/FileController/download/" +
          that.form.frsfzh_fanmian,
        ],
        longPressActions: {
          itemList: ["发送给朋友", "保存图片", "收藏"],
          success: function (data) { },
          fail: function (err) { },
        },
      });
    },
    async getCompanyHouseDetails(e) {
      try {
        let that = this;
        let detail = await getCompanyHouseDetails(e);
        let qymcString = await getCompanyTagsByQybq(detail.data.qybq);
        if (detail.data.jydz) {
          const jydzAry = detail.data.jydzStr.split(',').map((e) => {
            return {
              name: e
            }
          })
          const jydzIdAry = detail.data.jydz.split(',')
          for (let i = 0; i < jydzIdAry.length; i++) {
            jydzAry[i].id = jydzIdAry[i]
            console.log(jydzIdAry)
            console.log('jydzIdAry[i].id', jydzIdAry[i])
            getAreaByIds({
              ids: jydzIdAry[i]
            }).then((e) => {
              jydzAry[i].name += `；${e}㎡`
            })
          }
          this.jydzAry = jydzAry
          console.log(jydzAry)
        } else {
          this.jydzAry = []
        }
        that.findCompanyTags(e);
        that.form = detail.data;
        console.log(detail.data.frsfzh);
        that.form.qymcString = qymcString;
        console.log(that.form.jyfw.split(","));
        that.form.jyfw = that.form.jyfw.split(",");
        if (detail.data.ryxxzp && detail.data.ryxxzp.length > 0) {
          that.form.ryxxzp = detail.data.ryxxzp.split(",");
        }
        if (detail.data.frsfzh && detail.data.frsfzh.length > 0) {
          let sfzlist = detail.data.frsfzh.split(",");
          that.form.frsfzh_fanmian = sfzlist[0];
          that.form.frsfzh_zhenmian = sfzlist[1];
          that.$forceUpdate();
        }

        for (const key in that.form) {
          if (that.form[key] == null || that.form[key] == "null") {
            //   that.form[key] == undefined;
            that.form[key] = "暂无";
          }
        }
        that.selectByCompanyId1();
        this.getRoomNameByCompanyId();
        that.$forceUpdate();
      } catch (error) { }
    },
    onChange(event) {
      this.activeNames = event.detail;
    },
  },
};
</script>
<style scoped lang="scss">
.chaochuyincang {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form_row {
  height: 40rpx;
  font-weight: 400;
  font-size: 24rpx;
}

.dengjibutton {
  margin-top: 24rpx;
  margin-left: 60rpx;
  margin-right: 60rpx;
  width: calc(100% - 120rpx);
  height: 60rpx;
  text-align: center;
  background: #1d18bc;
  color: white;
  line-height: 60rpx;
}

.housedetails {
  margin-bottom: 200rpx;
}

.housedetails {
  .detailstitle {
    display: flex;
    font-size: 30rpx;
    font-weight: 500;
    color: #333333;
    padding-bottom: 16rpx;
  }

  .typestitle {
    display: flex;
    font-size: 24rpx;
    font-weight: 500;
    padding-bottom: 16rpx;
    margin-bottom: 16rpx;
  }
}
</style>
<style lang="scss">
::v-deep .is-open+.uni-collapse-item__wrap {
  height: auto !important;
}

::v-deep .uni-collapse-item__wrap-content {
  height: auto !important;
}

.pageconfig {
  background: #ffffff;
  padding: 32rpx;
}

.input_title {
  min-width: 40%;
  font-size: 28rpx;
  height: 40rpx;
  line-height: 40rpx;
  color: #333333;
}

.input_value {
  //   width: 60%;
  font-size: 28rpx;
  height: 40rpx;
  line-height: 40rpx;
  color: #777777;
}

.uni-collapse-item__title-box {
  padding: 0 !important;
}

.uni-collapse-item__title-text {
  color: #1d18bc !important;
  font-size: 32rpx !important;
  margin: 32rpx 0;
  font-weight: bold;
}

.idclass {
  width: 147rpx;
  height: 100rpx;
}
</style>
