123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <div class="commonTitle">故障详情</div>
- <el-scrollbar class="barHeight">
- <div class="textItem" v-for="(item, index) in infoTopData" :key="index">
- <div class="left describeText">{{ item.bond }}</div>
- <div class="right describeText">
- {{ showInfoValue(item.value) ? showInfoValue(item.value) : "-" }}
- </div>
- </div>
- <el-divider />
- <div class="textItem" v-for="(item, index) in infoBottomData" :key="index">
- <div class="left describeText">{{ item.bond }}</div>
- <div class="right describeText">
- {{ showInfoValue(item.value) ? showInfoValue(item.value) : "-" }}
- </div>
- </div>
- </el-scrollbar>
- </template>
- <script lang="ts" setup>
- import { getEscalationFaultById } from "@/api/repair";
- const ordersDataArray = inject("ordersDataArray");
- const selectOrderIndex = inject("selectOrderIndex");
- const infoData = ref({});
- const showInfoValue = (value: string) => {
- return infoData.value[value];
- };
- const getInfoData = async (id: any) => {
- console.log(id, "2222");
- const { data } = await getEscalationFaultById(id);
- infoData.value = data;
- };
- const infoTopData = [
- {
- bond: "产品名称",
- value: "materialName",
- },
- {
- bond: "型号",
- value: "spec",
- },
- {
- bond: "产品图号",
- value: "faultNumber",
- },
- {
- bond: "产品代号",
- value: "materialCode",
- },
- {
- bond: "阶段",
- value: "stageDictValue",
- },
- ];
- const infoBottomData = [
- {
- bond: "单据编号",
- value: "",
- },
- {
- bond: "归档编号",
- value: "archiveNumber",
- },
- {
- bond: "工作令号",
- value: "workOrderNumber",
- },
- {
- bond: "批次",
- value: "",
- },
- {
- bond: "跟踪卡号",
- value: "",
- },
- {
- bond: "日期",
- value: "created",
- },
- {
- bond: "生产数量",
- value: "planNum",
- },
- {
- bond: "不合格品数量",
- value: "unqualifiedNum",
- },
- {
- bond: "不合格品分布情况及工序",
- value: "processes",
- },
- {
- bond: "不合格原因分类",
- value: "reason",
- },
- {
- bond: "责任/经办者",
- value: "personResponsible",
- },
- {
- bond: "检验员",
- value: "userName",
- },
- {
- bond: "是否首检",
- value: "firstInspection",
- },
- {
- bond: "特征和程度",
- value: "",
- },
- {
- bond: "处置措施",
- value: "disposalMeasures",
- },
- ];
- watch(selectOrderIndex, () => {
- getInfoData(ordersDataArray.value[selectOrderIndex.value].id);
- });
- </script>
- <style lang="scss" scoped>
- .describeText {
- line-height: 30px;
- }
- .barHeight {
- height: calc(100vh - 184px);
- }
- .textItem {
- width: 100%;
- display: flex;
- .left {
- width: 220px;
- display: inline-block;
- text-align: right;
- }
- .right {
- flex: 1;
- margin-left: $p10;
- color: black;
- }
- }
- </style>
|