<template>
  <div class="meeting-create">
    <div class="top-tab">
      <div>
        <span @click="currentTab = 0" :class="{ active: currentTab == 0 }"
          >会议信息</span
        ><span @click="currentTab = 1" :class="{ active: currentTab == 1 }"
          >会议资料</span
        >
      </div>
    </div>
    <div class="meeting-con">
      <el-scrollbar style="height:calc(100% - 62px)">
        <div v-if="currentTab == 0">
          <el-form
            class="lv-form"
            ref="form"
            size="small"
            :model="mdtForm"
            label-width="100%"
            label-position="top"
            style="padding-right: 20px"
          >
            <el-form-item label="MDT会议标题" prop="subject">
              <el-input v-if="isEdit" @input="limitWord('subject')" v-model.trim="mdtForm.subject" @blur="changeForm('subject')"></el-input>
              <p v-else>{{mdtForm.subject}}</p>
            </el-form-item>
            <el-form-item label="MDT会议时间" prop="date_">
              <template v-if="isEdit">
                <el-date-picker
                  style="flex: 1; margin-right: 8px"
                  value-format="yyyy-MM-dd"
                  @change="dateSelect"
                  v-model="date_"
                  type="date"
                  placeholder="选择日期"
                >
                </el-date-picker>
                <el-time-picker
                  :clearable="false"
                  style="flex: 1"
                  popper-class="no-select-box"
                  is-range
                  format="HH:mm"
                  value-format="HH:mm:ss"
                  @change="timeSelect"
                  v-model="dateTime"
                  range-separator="~"
                  start-placeholder="开始"
                  end-placeholder="结束"
                  placeholder="选择时间范围"
                >
                </el-time-picker>
              </template>
              <p v-else>{{
                mdtForm.startTime.split(" ")[0] +
                " " +
                mdtForm.startTime.split(" ")[1] +
                "-" +
                mdtForm.endTime.split(" ")[1]
              }}</p>
            </el-form-item>
            <el-form-item label="MDT会议分类" prop="meetingType">
              <el-select
                popper-class="mdt-create-form"
                v-if="isEdit"
                style="flex: 1"
                v-model="mdtForm.meetingType"
                placeholder="MDT会议分类"
                disabled
              >
                <el-option label="MDT会议" value="MDT会议"></el-option>
                <el-option label="Tumor Board" value="Tumor Board"></el-option>
              </el-select>
              <p v-else>{{ mdtForm.meetingType }}</p>
            </el-form-item>
            <el-form-item label="MDT会议地点" prop="roomTypeCode">
              <el-select
              popper-class="mdt-create-form"
                v-if="isEdit"
                style="flex: 1"
                v-model="mdtForm.roomTypeCode"
                @change="handleRoomChange"
                placeholder="MDT会议地点"
              >
                <el-option
                  v-for="item of roomList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
              <p v-else>{{mdtForm.roomInfo}}</p>
            </el-form-item>
            <el-form-item style="width: 100%" label="参会人员">
              <el-button
                v-if="isEdit"
                style="
                  position: absolute;
                  right: 0;
                  top: -38px;
                  text-decoration: underline;
                "
                type="text"
                :class="{'text-gray': !(selfPower >0 && selfPower < 4)}"
                @click="editMember"
                >编辑</el-button
              >
              <el-table
                highlight-current-row
                ref="multipleTable"
                :data="memberList"
                tooltip-effect="dark"
                :header-cell-style="mdtTheadClass"
                :cell-style="mdtTrowClass"
                style="flex: 1"
              >
                <el-table-column prop="doctorName" label="姓名" min-width="200">
                  <template slot-scope="scope">
                    <span>{{ scope.row.doctorName }}</span>
                    <el-tag
                      v-if="scope.row.status === 9"
                      style="margin-left: 5px"
                      type="success"
                      size="mini"
                      >外院</el-tag
                    >
                  </template>
                </el-table-column>
                <el-table-column
                  prop="deptName"
                  label="科室"
                  min-width="200"
                ></el-table-column>
              </el-table>
            </el-form-item>
            <el-form-item
              style="width: 100%"
              label="患者病情概述"
              prop="patientCase"
            >
              <el-input
                show-word-limit
                 maxlength="2000"
                v-if="isEdit"
                v-model="mdtForm.patientCase"
                type="textarea"
                 @blur="changeForm('patientCase')"
                :autosize="{ minRows: 4, maxRows: 5 }"
              ></el-input>
              <p v-else><pre style="padding:0;white-space: pre-wrap;">{{mdtForm.patientCase}}</pre></p>
            </el-form-item>
            <el-form-item style="width: 100%" label="患者诉求" prop="purpose">
              <el-input
              show-word-limit
                 maxlength="2000"
                v-if="isEdit"
                v-model="mdtForm.purpose"
                type="textarea"
                 @blur="changeForm('purpose')"
                :autosize="{ minRows: 4, maxRows: 5 }"
              ></el-input>
              <p v-else><pre style="padding:0;white-space: pre-wrap;">{{mdtForm.purpose}}</pre></p>
            </el-form-item>
            <el-form-item label="患者信息收集时间" prop="subject">
              <el-date-picker
                v-if="isEdit"
                style="flex: 1;"
                value-format="yyyy-MM-dd"
                @change="changeForm('writeSourceTime')"
                v-model="mdtForm.writeSourceTime"
                type="date"
                placeholder="选择日期"
              >
              </el-date-picker>
              <p v-else>{{mdtForm.writeSourceTime}}</p>
            </el-form-item>
            <el-form-item label="信息收集来源" prop="subject">
              <el-input v-if="isEdit" v-model.trim="mdtForm.patientSource" @input="limitWord('patientSource')" @blur="changeForm('patientSource')"></el-input>
              <p v-else>{{mdtForm.patientSource}}</p>
            </el-form-item>
          </el-form>
        </div>
        <div class="current-source" v-if="currentTab == 1">
          <div>
            <template v-if="allFileData.length">
              <sourceCard @preview="preview" :closable="!!((topObj.doctorInfo.id == i.doctorId) && !i.del && item.mdtMeeting.meetingNodeStatus == 7 && topObj.isRoute)" @close="delSource" custom-class="self-card" v-for="i in allFileData" :num="0" :item="i" :key="i.id" />
              <div class="self-card add-source" v-if="selfPower != 5 && item.mdtMeeting.meetingNodeStatus == 7 && topObj.isRoute" @click="showUpload">
                  <i class="el-icon-plus"></i>
                  <span>资料上传</span>
              </div>
            </template>
            <template v-else>
              <el-empty :image="require('@/assets/images/empty.png')" style="width:100%" description="暂无数据~"></el-empty>
            </template>
            <div class="past-consult">
              <div class="past-consult-item">
                <p><i class="iconfont iconPDF"></i>MDT小结</p>
                <p>
                  <span @click="preview(item.mdtMeeting,1)">查看</span>
                  <span v-if="(selfPower == 2 || selfPower == 3) && topObj.isRoute && item.mdtMeeting.meetingNodeStatus == 7" @click="editMDT">编辑</span>
                  <span @click="download(item.mdtMeeting,1)">导出</span>
                  <span @click="copyUrl(item.mdtMeeting)">复制链接</span>
                </p>
              </div>
               <!-- <div class="past-consult-item" :class="{'past-consult-gray': !item.mdtMeeting.opinionPdfUrl}" v-if="item.mdtMeeting.meetingType == 'Tumor Board'"> -->
               <div class="past-consult-item" v-if="item.mdtMeeting.meetingType == 'Tumor Board'">
                <p><i class="iconfont iconPDF"></i>Tumor Board备忘录</p>
                <p>
                  <template>
                    <span v-if="item.mdtMeeting.opinionPdfUrl" @click="preview(item.mdtMeeting,2)">查看</span>
                    <span v-if="(selfPower == 2 || selfPower == 3) && topObj.isRoute" @click="editTumor">编辑</span>
                    <span v-if="item.mdtMeeting.opinionPdfUrl" @click="download(item.mdtMeeting,2)">导出</span>
                  </template>
                  <!-- <template v-else>
                    <span v-if="(selfPower == 2 || selfPower == 3)" @click="editTumor">填写</span>
                    <span v-else>未填写</span>
                  </template> -->
                </p>
              </div>
            </div>
          </div>
        </div>
      </el-scrollbar>
      <div v-if="(this.selfPower < 4) && item.mdtMeeting.meetingNodeStatus == 7 && topObj.isRoute" class="btn-lv-option">
        <slot>
          <div v-if="!isEdit">
                <el-button size="small" class="btn-lv-red" plain @click="saveInfo(1)"
                  >取消会议</el-button
                >
                <el-button size="small" class="btn-lv-blue" plain @click="editMeeting">修改信息</el-button>
              </div>
              <div v-if="isEdit">
                <el-button size="small" class="btn-lv-red" @click="editCancle" plain>取消</el-button>
                <el-button size="small" type="primary" @click="saveInfo(3)"
                  >确定</el-button
                >
              </div>
          </slot>
        </div>
    </div>
    <!--关闭理由-->
    <el-dialog
      title="取消会议提示"
      :visible.sync="closeDialog"
      width="600px"
      custom-class="close-reason"
      top="35vh"
    >
      <div style="color: red; font-size: 14px; padding-bottom: 12px;display:flex;align-items:center">
        <i
          class="el-icon-warning-outline"
          style="font-size: 16px; margin-right: 8px"
        ></i>
        <span>取消后该次会议不再在页面进行展示</span>
      </div>
      <h3 style="margin-top: 0;margin-bottom: 4px;font-size:14px;font-weight:normal">取消理由</h3>
      <el-input
        placeholder="请输入会议取消原因"
        type="textarea"
        :rows="5"
        maxlength="500"
        show-word-limit
        v-model.trim="closeReason"
      />
      <span slot="footer" class="dialog-footer">
        <el-button
        size="small"
          @click="
            closeDialog = false;
            closeReason = '';
          "
          >取 消</el-button
        >
        <el-button size="small" :disabled="disabled" type="primary" @click="saveInfo(2)"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!--资料预览-->
    <previewPdf ref="preview1"/>
    <!-- <aegle-preview title=" " :visible.sync="showImgView" :list="urlList"/> -->
    <!--团队组建弹窗-->
    <team-dialog @change="memberChange" ref="teamDialog1"/>
  </div>
</template>
<script>
//需要保存会议ID
import uploadImage from "aegle-sp-components/src/utils/mdtUpload";
import mdtmix from "../mdtmix";
import teamDialog from './teamDialog.vue'
import { DonMessage } from "@/axios/message.js";
const $message = new DonMessage();
import { debounce, cloneDeep } from "lodash";
import sourceCard from './source-card.vue'
import fileCheck from './file-check.vue'
import previewPdf from '../components/previewPdf.vue'
import { setMdtInfo, changeMdtStatus, getMdtMember, delSource } from '@/request/mdt.js'
export default {
    inheritAttrs: true,
    components: { sourceCard, fileCheck,teamDialog,previewPdf },
    mixins: [mdtmix],
    model: {
        event: 'change',
        prop: 'isEdit'
    },
    props: {
      item: Object,
      edit: Boolean,
      isEdit: {
        type: Boolean,
      },
      // currentTab: {
      //   type: Number,
      //   default: 0,
      // },
    },
    inject: ['topObj'],
  data() {
    return {
      showImgView: false,
      urlList: [],
      createMeetingTemporaryStatus: 0,//暂存
      showPreview: true,
        currentTab: 0,
      disabled: false, //取消会议的按钮用
      closeDialog: false, //取消会议
      closeReason: "", //关闭原因
      date_: "",
      mdtForm: {
        doctorList: [],
        endTime: "",
        meetingType: "",
        patientBaseId: "",
        patientCase: "",
        purpose: "",
        roomInfo: "",
        roomTypeCode: "",
        startTime: "",
        subject: "",
        patientSource: "",
        writeSourceTime: ""
      },
      dateTime: ["00:00:00", "23:59:59"],
      pickerMinDate: "",
      pickerOptions: {
        onPick: ({ minDate, maxDate }) => {
          if (minDate && !maxDate) {
            this.pickerMinDate = minDate;
            // const date = ''
            // const date = moment(this.pickerMinDate).format('YYYY-MM-DD')
            // const max = date + ' 23:59:59'
          }
        },
        disabledDate: (time) => {
          if (this.pickerMinDate) {
            const date = "";
            // const date = moment(this.pickerMinDate).format('YYYY-MM-DD')
            const min = date + " 00:00:00";
            const max = date + " 23:59:59";
            return (
              time.getTime() < new Date(min).getTime() - 1 ||
              time.getTime() > new Date(max).getTime() + 1
            );
          }
        },
      },
      memberList: [],
      roomList: [],
      existId: "", //存储会议id
      defaultInfo: {},
      //资料补充
      fileList: [],
      accept: '.pdf,.PDF,.doc,.docx',
      allFileData: [],
      selfPower: 0
    };
  },
  created() {
      this.getRoomList()
  },
  mounted() {
    this.defaultInfo =cloneDeep(this.item)
    this.handleForm(this.defaultInfo)
  },
  computed: {
    meetingDisable() {
      return false;
    }
  },
  watch: {
    isEdit(v){
      // if(v) this.handleForm(this.defaultInfo);
    },
    currentTab(v) {
      if(v == 1) {
        this.editCancle()
        this.getSourceList(this.item?.mdtMeeting?.id)
      }
    },
    item: {
      handler(v) {
        if(v){  
          v.doctorList = v.doctorList || []
          this.existId = v?.mdtMeeting.id
          // this.selfPower = this.hasMdtAuthority(v.doctorList,this.topObj?.doctorInfo?.id)
          this.selfPower = v?.mdtMeeting?.status || 0
        }
      },
      immediate: true
    },
  },
  methods: {
    //团队修改赋值
    memberChange(d) {
      this.memberList = d
      // if(this.step == 1) {
      //   this.saveTemprary()
      // }
    },
    showUpload() {
      if(!(this.selfPower < 5 && this.topObj.isRoute)) return;
      uploadImage(this,this.accept,(files)=> {
        const str = files[0].name.slice(files[0].name.lastIndexOf('.') + 1,files[0].name.length)
        if(this.accept.indexOf(str) == -1) {
            this.$message.error('暂不支持上传该类文档格式！')
            return;
        }
        if(files[0].size > 30*1024*1024) {
            this.$message.error("最大只能上传30M");
            return false
        }
        this.sureUpload(files,this.item?.mdtMeeting?.id)
      })
    },
    //文件删除
    async delSource(d) {
      const {code,msg} = await delSource({id: d.id, mdtId:this.item?.mdtMeeting.id})
      if(code == 0) {
        this.$message.success('删除成功！')
        this.getSourceList(this.item?.mdtMeeting?.id)
      } else {
        this.$message.error(msg || '删除失败！')
      }
    },
    editMDT(item) {
      this.$emit('changeStep', {step:5,status: 0})
    },
    editTumor() {
      //isPower1,核心cm,2:主管,3:主诊,4:参会医生,5非参会医生,还要判断当前是不是mdt或者cm的路由
      if((this.selfPower == 2 || this.selfPower == 3) && this.topObj.isRoute) {
        const tabParams = {
            label: "Tumor Board备忘录",
            value: 'consult',
            closable: true,
          };
          this.topObj.handleOption(5,tabParams)
        // this.$store.commit("patientMdt/addNewMdtTimeNav", tabParams);
        // this.$store.commit("patientMdt/changeCurMdtTimeI", 'consult');
      }
    },
    //form改变发送请求保存
    changeForm(type) {
      if(!this.mdtForm[type] || !this.mdtForm[type].trim()) {
        return
      };
    },
    //初始表单赋值
    handleForm(data) {
      if(data && JSON.stringify(data) != {} && data?.mdtMeeting) {
        this.mdtForm = {
          doctorList: [],
          endTime: data?.mdtMeeting?.endTime || '',
          meetingDate: data?.mdtMeeting?.meetingDate || '',
          meetingType: data?.mdtMeeting?.meetingType || '',
          patientBaseId: data?.mdtMeeting?.patientBaseId || '',
          patientCase: data?.mdtMeeting?.patientCase || '',
          purpose: data?.mdtMeeting?.purpose || '',
          roomInfo: data?.mdtMeeting?.roomInfo || '',
          roomTypeCode: data?.mdtMeeting?.roomTypeCode || '',
          startTime: data?.mdtMeeting?.startTime || '',
          subject: data?.mdtMeeting?.subject || '',
          patientSource:data?.mdtMeeting?.patientSource || '',
          writeSourceTime: (data?.mdtMeeting?.writeSourceTime&&data?.mdtMeeting?.writeSourceTime.slice(0,10)) || '',
        }
        this.date_ = this.mdtForm.startTime ? this.mdtForm?.startTime.slice(0,10) : '';
        this.dateTime = [(this.mdtForm.startTime ? this.mdtForm?.startTime.slice(11,20) : '00:00:00'),(this.mdtForm.endTime ? this.mdtForm?.endTime.slice(11,20) : '23:59:59')]
        this.memberList = data?.doctorList;
        this.existId = data?.mdtMeeting?.id;
        this.createMeetingTemporaryStatus = data?.mdtMeeting?.createMeetingTemporaryStatus;
        // this.saveMdtId(this.existId)
        // this.saveMeetingId(this.existId)
        this.topObj.handleOption(3,this.existId)
      } else {
        this.existId = '';
        this.createMeetingTemporaryStatus = 0;
        getMdtMember(this.topObj.patientId).then(({data,code,msg}) => {
          if(code == 0) {
            this.memberList = data
          } else {
            this.memberList = []
            this.$message.error(msg)
          }
        })
      }
    },
    //取消编辑
    editCancle() {
        this.handleForm(this.defaultInfo)
        this.$emit('change', false)
    },
    //开启编辑
    editMeeting() {
      this.currentTab = 0
      this.$emit('change', true)
      this.$forceUpdate()
    },
    editMember() {
      if(!(this.selfPower >0 && this.selfPower < 4 && this.isEdit)) return
      this.$refs.teamDialog1.open({list: this.memberList, status: false,info: this.defaultInfo?.mdtMeeting,patientId: this.topObj.patientId,mdtId: this.item.id})
    },
    // 会议室切换
    handleRoomChange(val) {
      this.roomList.forEach((item) => {
        if (item.value === val) {
          this.mdtForm.roomInfo = item.label;
        }
      });
    },
    //会议时间日期选择选择
    dateSelect(d) {
      this.date_ = d;
      if (d) {
        this.mdtForm.startTime = d + " " + this.dateTime[0];
        this.mdtForm.endTime = d + " " + this.dateTime[1];
      } else {
        this.dateTime = ["00:00:00", "23:59:59"];
      }
    },
    //会议时间时分秒选择
    timeSelect(d) {
      if (d) {
        this.mdtForm.startTime = this.date_ + " " + d[0];
        this.mdtForm.endTime = this.date_ + " " + d[1];
      }
    },
    //准备会议点击
    saveInfo: debounce(
      function (type) {
        if (type == 3) {
          //准备会议
          this.goMeeting();
        } else if (type == 1) {
          if(this.existId){
            //显示取消会议弹窗
            this.closeReason = "";
            this.closeDialog = true;
          } else {
            //还没填写任何直接返回
            this.handleMeeting(0)
          }
          
        } else if (type == 2) {
          //取消会议确定
          let param = {
            doctor: this.topObj?.doctorInfo?.nicknames,
            reason: this.closeReason.trim(),
            id: this.item?.mdtMeeting?.id,
            patientBaseId: this.item?.mdtMeeting?.patientBaseId,
            del: 0
          }
          this.cancleMeeting(param, () => this.$emit('refreshList'));
        } else if(type == 4) {
            //资料上传进入会议
            changeMdtStatus({meetingNodeStatus: 3,mdtId: this.existId}).then(res => {
              if(res.code == 0) this.$emit('changeStep', {step:3,status: 1})
            })
        } else if(type == 0){
          if(!this.createMeetingTemporaryStatus) {
            this.clearData()
            this.$emit('changeStep', {step:0,status: 1})
          }
        } else if (type == 5) {
          //填写mdt小结
          this.$emit('changeStep', {step:5,status: 1})
        } else if (type == 6) {
          //填写Tumor Board
          this.editTumor()
        }
      },
      2000,
      { leading: true, trailing: false }
    ),
    //准备会议
    goMeeting() {
      if (!this.mdtForm.subject || !this.mdtForm.subject.trim()) {
        $message.error("会议标题不能为空！");
        return;
      } else if (!this.date_) {
        $message.error("会议时间不能为空！");
        return;
      } else if (!this.mdtForm.meetingType) {
        $message.error("会议分类不能为空！");
        return;
      } else if (!this.mdtForm.roomTypeCode) {
        $message.error("会议地点不能为空！");
        return;
      } else if (!this.memberList.length) {
        $message.error("参会人员不能为空！");
        return;
      } else if (
        !this.mdtForm.patientCase || !this.mdtForm.patientCase.trim()
      ) {
        $message.error("患者病情概述不能为空！");
        return;
      } else if (!this.mdtForm.purpose || !this.mdtForm.purpose.trim()) {
        $message.error("患者诉求不能为空！");
        return;
      }else if (!this.mdtForm.writeSourceTime) {
        $message.error("患者信息收集时间不能为空！");
        return;
      } else if (!this.mdtForm.patientSource.trim()) {
        $message.error("信息收集来源不能为空！");
        return;
      }
      this.saveMeeting(1);
    },
    async saveTemprary(){
      const doctorIds = this.memberList.map((item) => {
          return {
            doctorId: item.doctorId,
            mdtPatientTeamId: item.mdtPatientTeamId || '',
            doctorSpecialty: item.doctorSpecialty || ''
          }
        });
      let param = {
        subject: this.mdtForm.subject,
        startTime: this.mdtForm.startTime,
        endTime: this.mdtForm.endTime,
        meetingType: this.mdtForm.meetingType,
        roomInfo: this.mdtForm.roomInfo,
        roomTypeCode: this.mdtForm.roomTypeCode,
        doctorList: doctorIds,
        patientCase: this.mdtForm.patientCase ? this.mdtForm.patientCase.trim() : '',
        purpose: this.mdtForm.purpose ? this.mdtForm.purpose.trim() : '',
        createMeetingTemporaryStatus: 1,
        patientBaseId: this.topObj.patientId,
        patientSource: this.mdtForm.patientSource.trim(),
        writeSourceTime: this.mdtForm.writeSourceTime ? this.mdtForm.writeSourceTime + ' 00:00:00' : ''
      };
      if (this.existId) param.id = this.existId;
      const {msg, code, data} = await setMdtInfo(param)
      if(code == 0) {
        this.existId = data
        this.topObj.handleOption(3,this.existId)
        await changeMdtStatus({meetingNodeStatus: 1,mdtId: this.existId})
      }else {
        this.$message.error(msg);
      }
    },
    //保存会议请求
    async saveMeeting() {
       const str = this.mdtForm.subject ? this.mdtForm.subject.trim() : '';
      if(str.length > 100){
        this.$message.error('字数限制100')
        return
      }
      const doctorIds = this.memberList.map((item) => {
        return {
          doctorId: item.doctorId,
          mdtPatientTeamId: item.mdtPatientTeamId,
          doctorSpecialty: item.doctorSpecialty
        }
      });
      let param = {
        subject: this.mdtForm.subject,
        startTime: this.mdtForm.startTime,
        endTime: this.mdtForm.endTime,
        meetingType: this.mdtForm.meetingType,
        roomInfo: this.mdtForm.roomInfo,
        roomTypeCode: this.mdtForm.roomTypeCode,
        doctorList: doctorIds,
        patientCase: this.mdtForm.patientCase ? this.mdtForm.purpose.trim() : '',
        purpose: this.mdtForm.purpose ? this.mdtForm.purpose.trim() : '',
        createMeetingTemporaryStatus: 1,
        patientBaseId: this.topObj.patientId,
        patientSource: this.mdtForm.patientSource.trim(),
        writeSourceTime: this.mdtForm.writeSourceTime ? this.mdtForm.writeSourceTime + ' 00:00:00' : ''
      };
      if (this.existId) param.id = this.existId;
      const {msg, code, data} = await setMdtInfo(param)
      if(code !== 0) {
        this.$message.error(msg);
        return
      }
      this.$emit('change', false)
      this.$message.success('会议信息修改成功！')
    },
  },
};
</script>
<style lang="less">
.mdt-create-form {
  .el-select-dropdown__wrap.el-scrollbar__wrap {
    margin-bottom: 0!important;
  }
}
</style>
<style lang="less" scoped>
// @import url('../new-mdt.less');
/deep/ .close-reason {
  .el-dialog__header {
    padding: 32px 40px 4px;
    .el-dialog__title {
      font-size: 16px;
    }
  }
  .el-dialog__body {
    padding: 0 40px 10px!important;
  }
  .el-dialog__headerbtn {
    font-size: 20px;
    right: 40px;
    top: 30px;
  }
  .el-dialog__footer {
    padding: 10px 40px 32px;
  }
}
.meeting-create {
  width: 430px;
  height: 100%;
  display: flex;
  flex-direction: column;
  .top-tab {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    height: 46px;
    > div {
      width: 160px;
      height: 26px;
      background: #ffffff;
      border-radius: 4px;
      display: flex;
      span {
        width: 80px;
        text-align: center;
        height: 100%;
        line-height: 26px;
        border: 1px solid #d9d9d9;
        color: rgba(0, 0, 0, 0.65);
        cursor: pointer;
        font-size: 14px;
      }
      span:first-child {
        border-radius: 4px 0 0 4px;
        border-right: transparent;
      }
      span:last-child {
        border-radius: 0 4px 4px 0;
        border-left: transparent;
      }
      span.active {
        border: 1px solid #1890ff;
        color: #1890ff;
      }
    }
  }
  .meeting-con {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /deep/ .el-scrollbar {
      // height: 100%;
      flex: 1;
      overflow: hidden;
      .el-scrollbar__wrap {
        overflow-x: hidden;
      }
      .el-scrollbar__view {
        min-height: 100%;
      }
    }
  }
  /deep/ .el-form-item {
    padding-left: 20px;
    margin-bottom: 20px;
    margin-top: 8px;
    .el-form-item__label {
      position: relative;
      padding-left: 15px;
      line-height: 25px;
      padding: 0 0 8px 12px;
    }
    .el-form-item__label:before {
      content: " " !important;
      position: absolute;
      left: 0px;
      top: 10px;
      width: 6px;
      height: 6px;
      background-color: #3e98ff;
      border-radius: 50%;
      margin-right: 6px;
    }
    .el-form-item__label::after {
      content: "*";
      position: absolute;
      right: -15px;
      top: 0px;
      color: #f56c6c;
      margin-right: 6px;
    }
    .el-form-item__content {
      display: flex;
      position: relative;
      align-items: center;
      justify-content: flex-end;
      pre,
      p {
        width: 100%;
        // padding-left: 15px;
        line-height: 24px;
        font-size: 14px;
        font-family: PingFangSC, PingFangSC-Regular;
        color: #000000;
        margin: 0;
        word-break: break-all;
      }
      // .btn-red {
      //   color: #e02020;
      //   border-color: #e02020;
      // }
      // .btn-blue {
      //   color: #409eff;
      //   border-color: #409eff;
      // }
      // .btn-gray {
      //   color: ;
      // }
       .el-textarea__inner {
        font-family: PingFangSC, PingFangSC-Regular;
      }
    }
    .el-textarea__inner {
      padding-bottom: 15px;
    }
    .el-input__count {
      height: 14px;
      line-height: 14px;
      bottom: 1px;
    }
  }
  .current-source {
    padding: 10px 30px 0;
    display: flex;
    justify-content: center;
    > div {
      width: 385px;
      display: flex;
      flex-wrap: wrap;
      .self-card:nth-child(2n) {
        margin: 0 0 16px 0;
      }
    }
    .add-source {
        width: 175px;
        height: 107px;
        border: 1px dashed rgba(62,152,255,0.40);
        border-radius: 4px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 13px;
        font-family: PingFangSC, PingFangSC-Regular;
        color: #1890ff;
        cursor: pointer;
        margin-bottom: 12px;
        i {
            font-size: 20px;
            margin-bottom: 10px;
        }
    }
    .past-consult {
      width: 100%;
      padding: 20px 0;
      border-top: 1px dashed rgba(151, 151, 151, 0.5);
      padding-bottom: 20px;
      .past-consult-item {
        font-size: 13px;
        height: 54px;
        background: rgba(9, 189, 133, 0.1);
        border: 1px solid rgba(9, 189, 133, 0.3);
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        color: #262626;
        margin-bottom: 12px;
         >p {
           font-family: PingFangSC, PingFangSC-Regular;
          margin: 0;
          &:first-child {
            display: flex;
            align-items: center;
          }
        }
        i {
          color: #09bd85;
          font-size: 30px;
          margin-right: 10px;
        }
        span {
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          text-decoration: underline;
          color: #09bd85;
          margin-left: 8px;
          cursor: pointer;
        }
      }
      .past-consult-gray {
        background: #fafafa !important;
        border: 1px dashed #dddddd !important;
        // color: #ddd !important;
        color: #666;
        i,
        span {
          color: #666;
        }
      }
    }
  }
  .btn-lv-option {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px 20px;
    .el-button--small {
      margin-left: 8px;
      height: 30px;
    }
  }
}
</style>