Newer
Older
urbanLifeline_YanAn / src / views / DialogTabs / component / GongDanPaiFa.vue
<template>
  <div id="GongDanPaiFa">
    <el-form
      :model="AllData.form"
      label-width="auto"
      style="max-width: 100%; padding: 0 40px 0 0px"
      class="GongDanPaiForm"
    >
      <el-form-item label="工单类型:" class="cell2">
        <el-input v-model="AllData.form.GDType" />
      </el-form-item>
      <el-form-item label="警情时间:" class="cell2">
        <el-input v-model="AllData.form.JQTimer" />
      </el-form-item>
      <el-form-item label="风险位置:" class="cell1">
        <el-input v-model="AllData.form.FXWZ" />
      </el-form-item>
      <el-form-item label="辅助研判:" class="cell1">
        <el-input v-model="AllData.form.FZYP" />
      </el-form-item>
      <el-form-item label="要求反馈时间:" class="cell2">
        <el-input v-model="AllData.form.FKSJ" />
      </el-form-item>
      <el-form-item label="要求完成时间:" class="cell2">
        <el-input v-model="AllData.form.WCSJ" />
      </el-form-item>
    </el-form>
    <el-button color="#03B6A0" style="width: 110px; height: 34px" @click="CloseDialog()"
      >派发工单</el-button
    >
  </div>
</template>

<script setup name="GongDanPaiFa">
import { ref, reactive, toRefs, onMounted } from "vue";
import bus from "@/bus";
const props = defineProps({
  // 数据id
  dataID: {
    type: String,
  },
});
import { unitVoiceTemplateCall } from "@/api/OutgoingCall/templateList";
const { proxy } = getCurrentInstance();
const AllData = reactive({
  form: {
    GDType: "预警工单",
    JQTimer: "2024-09-26  17:26",
    FXWZ: "宝塔区凤凰山街道二道街",
    FZYP: "压力检测超标,并且该地点管网发生过管道泄漏事件",
    FKSJ: "2小时内",
    WCSJ: "2024-09-30",
  },
});
// 关闭弹窗
const CloseDialog = () => {
  unitVoiceTemplateCall({
    robotId: "e01059a0-7cc3-4971-b4e8-66cefbf236ef",
    phones: "13129919657,13638648812,13332926003",
    templateDesc: {
      title: "延安城市生命线通知",
      notice: `在${AllData.form.FXWZ}出现了${AllData.form.FZYP},请于${AllData.form.FKSJ}进行确认与反馈`,
    },
  }).then((response) => {
    proxy.$modal.msgSuccess("派发成功");
    bus.emit("publicDialog_Close");
  });
};
onMounted(() => {
  console.log(123123123, props.dataID);
  if (props.dataID == "001") {
    AllData.form.FZYP = "压力监测异常波动,可能是设施故障";
  } else if (props.dataID == "002") {
    AllData.form.FZYP = "燃气管道压力过大,会存在燃气爆管风险";
  } else if (props.dataID == "003") {
    AllData.form.FZYP = "高峰期流量持续降低,会存在燃气泄漏风险";
  } 
});
</script>

<style lang="scss" scoped>
#GongDanPaiFa {
  width: 100%;
  height: 100%;
  text-align: center;
  padding-top: 20px;

  :deep(.GongDanPaiForm) {
    width: 100%;
    height: calc(100% - 60px);
    overflow: auto;

    .cell1 {
      float: left;
      width: 100%;
    }
    .cell2 {
      float: left;
      width: 50%;

      .el-form-item__label {
        width: 200px !important;
      }
    }
    .el-form-item__label {
      font-family: Source Han Sans CN;
      font-weight: 400;
      font-size: 16px;
      color: #ffffff;
    }
    .el-input__wrapper {
      background: rgba(14, 69, 89, 0.9);
      border: 1px solid #1cf5fc;
      box-shadow: none;

      .el-input__inner {
        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 16px;
        color: #c1d3d4;
      }
    }
  }
}
</style>