gaoluyang
7 小时以前 07f9f8657d057a38792c3822acc9b08d83478967
src/views/productionManagement/productionReporting/index.vue
@@ -99,8 +99,7 @@
                                style="width: 100%" />
              </template>
            </el-table-column>
            <el-table-column label="操作"
                             >
            <el-table-column label="操作">
              <template #default="scope">
                <el-button link
                           type="primary"
@@ -124,11 +123,36 @@
    <input-modal v-if="isShowInput"
                 v-model:visible="isShowInput"
                 :production-product-main-id="isShowingId" />
    <!-- 参数详情弹窗 -->
    <el-dialog v-model="paramDetailVisible"
               title="参数详情"
               width="600px">
      <div v-if="currentParams && currentParams.length > 0"
           class="param-detail-list">
        <el-descriptions :column="1"
                         border>
          <el-descriptions-item v-for="param in currentParams"
                                :key="param.id"
                                :label="param.paramName">
            {{ param.inputValue }}
            <span v-if="param.unit && param.unit !== '/'"
                  class="unit-text">({{ param.unit }})</span>
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <el-empty v-else
                description="暂无参数数据" />
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="paramDetailVisible = false">关闭</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
  import { onMounted, ref } from "vue";
  import { onMounted, ref, reactive, toRefs, getCurrentInstance } from "vue";
  import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
  import { ElMessageBox } from "element-plus";
  import {
@@ -213,12 +237,20 @@
      label: "操作",
      align: "center",
      fixed: "right",
      width: 250,
      operation: [
        {
          name: "查看投入",
          type: "text",
          clickFun: row => {
            showInput(row);
          },
        },
        {
          name: "参数详情",
          type: "text",
          clickFun: row => {
            showParamDetail(row);
          },
        },
        {
@@ -232,6 +264,13 @@
    },
  ]);
  const tableData = ref([]);
  const paramDetailVisible = ref(false);
  const currentParams = ref([]);
  const showParamDetail = row => {
    currentParams.value = row.productionOperationParamList || [];
    paramDetailVisible.value = true;
  };
  const selectedRows = ref([]);
  const tableLoading = ref(false);
  const childrenLoading = ref(false);
@@ -417,4 +456,16 @@
  });
</script>
<style scoped></style>
<style scoped>
  .unit-text {
    margin-left: 5px;
    color: #909399;
    font-size: 12px;
  }
  .param-detail-list {
    padding: 10px;
  }
  .table_list {
    margin-top: unset;
  }
</style>