需求调整
							parent
							
								
									2d7f8cddc3
								
							
						
					
					
						commit
						1c2dfb4f18
					
				| 
						 | 
				
			
			@ -15,11 +15,16 @@
 | 
			
		|||
      <el-table-column prop="companyName" label="企业名称" />
 | 
			
		||||
      <el-table-column prop="servicePlatformName" label="服务平台名称" />
 | 
			
		||||
      <el-table-column prop="thirdPlatformName" label="上级平台名称" />
 | 
			
		||||
      <el-table-column prop="handleStatus" label="处理类型">
 | 
			
		||||
      <el-table-column prop="pushStatus" label="推送状态">
 | 
			
		||||
        <template #default="{ row }">
 | 
			
		||||
          <span v-if="row.handleStatus === 1"> 未处理</span>
 | 
			
		||||
          <span v-else-if="row.handleStatus === 2"> 处理成功</span>
 | 
			
		||||
          <span v-else-if="row.handleStatus === 3"> 不需要处理</span>
 | 
			
		||||
          {{ translationStatus(row.pushStatus, pushOptions) }}
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column prop="receiveTime" label="数据接收时间" />
 | 
			
		||||
      <el-table-column prop="businessName" label="业务名称" />
 | 
			
		||||
      <el-table-column prop="handleStatus" label="处理状态">
 | 
			
		||||
        <template #default="{ row }">
 | 
			
		||||
          {{ translationStatus(row.handleStatus, handleStatusOptions) }}
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column v-slot="{ row }" label="操作" width="260">
 | 
			
		||||
| 
						 | 
				
			
			@ -63,6 +68,7 @@ import { getAlarmList } from "@/request/alarm_management.js";
 | 
			
		|||
import AppTable from "@/components/table/index.vue";
 | 
			
		||||
import { useRouter } from "vue-router";
 | 
			
		||||
import editDialog from "./components/edit.vue";
 | 
			
		||||
import { translationStatus } from "@/assets/js/utils.js";
 | 
			
		||||
 | 
			
		||||
const router = useRouter();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -73,6 +79,13 @@ const handleStatusOptions = [
 | 
			
		|||
  { name: "处理成功", id: 2 },
 | 
			
		||||
  { name: "不需要处理", id: 3 },
 | 
			
		||||
];
 | 
			
		||||
const pushOptions = [
 | 
			
		||||
  { id: 1, name: "未推送" },
 | 
			
		||||
  { id: 2, name: "定时推送" },
 | 
			
		||||
  { id: 3, name: "推送成功" },
 | 
			
		||||
  { id: 4, name: "重试中" },
 | 
			
		||||
  { id: 5, name: "推送失败" },
 | 
			
		||||
];
 | 
			
		||||
const options = [
 | 
			
		||||
  { key: "companyName", label: "企业名称" },
 | 
			
		||||
  { key: "servicePlatformName", label: "服务平台名称" },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,24 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <app-info-builder :options :info> </app-info-builder>
 | 
			
		||||
    <app-info-builder :options :info>
 | 
			
		||||
      <template #receiveData>
 | 
			
		||||
        <template v-if="!fnToJsonParse(info.receiveData)">{{
 | 
			
		||||
          receiveData
 | 
			
		||||
        }}</template>
 | 
			
		||||
        <template v-else>
 | 
			
		||||
          {
 | 
			
		||||
          <div
 | 
			
		||||
            class="mt-2 pl-18"
 | 
			
		||||
            v-for="(value, key) in fnToJsonParse(info.receiveData)"
 | 
			
		||||
            :key="key"
 | 
			
		||||
          >
 | 
			
		||||
            <span class="key-contanier"> {{ key }}</span> :
 | 
			
		||||
            <span class="value-contanier">{{ value }}</span>
 | 
			
		||||
          </div>
 | 
			
		||||
          }
 | 
			
		||||
        </template>
 | 
			
		||||
      </template>
 | 
			
		||||
    </app-info-builder>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -9,30 +27,57 @@ import { useRoute } from "vue-router";
 | 
			
		|||
import AppInfoBuilder from "@/components/info_builder/index.vue";
 | 
			
		||||
import { ref } from "vue";
 | 
			
		||||
import { getAlarmInfo } from "@/request/alarm_management.js";
 | 
			
		||||
import { translationStatus } from "@/assets/js/utils.js";
 | 
			
		||||
const route = useRoute();
 | 
			
		||||
const { id } = route.query;
 | 
			
		||||
const info = ref({});
 | 
			
		||||
const fnGetData = async () => {
 | 
			
		||||
  const { data } = await getAlarmInfo({ id });
 | 
			
		||||
  info.value = data;
 | 
			
		||||
  info.value.status = fnStatus(info.value.handleStatus);
 | 
			
		||||
  info.value.handleStatus = translationStatus(
 | 
			
		||||
    info.value.handleStatus,
 | 
			
		||||
    handleStatusOptions
 | 
			
		||||
  );
 | 
			
		||||
  info.value.pushStatus = translationStatus(info.value.pushStatus, pushOptions);
 | 
			
		||||
};
 | 
			
		||||
fnGetData();
 | 
			
		||||
const fnStatus = (status) => {
 | 
			
		||||
  switch (status) {
 | 
			
		||||
    case 1:
 | 
			
		||||
      return "未处理";
 | 
			
		||||
    case 2:
 | 
			
		||||
      return "处理成功";
 | 
			
		||||
    case 3:
 | 
			
		||||
      return "不需要处理";
 | 
			
		||||
const handleStatusOptions = [
 | 
			
		||||
  { id: 1, name: "未处理" },
 | 
			
		||||
  { id: 2, name: "处理成功" },
 | 
			
		||||
  { id: 3, name: "不需要处理" },
 | 
			
		||||
];
 | 
			
		||||
const pushOptions = [
 | 
			
		||||
  { id: 1, name: "未推送" },
 | 
			
		||||
  { id: 2, name: "定时推送" },
 | 
			
		||||
  { id: 3, name: "推送成功" },
 | 
			
		||||
  { id: 4, name: "重试中" },
 | 
			
		||||
  { id: 5, name: "推送失败" },
 | 
			
		||||
];
 | 
			
		||||
const fnToJsonParse = (params) => {
 | 
			
		||||
  if (params === null) {
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
  try {
 | 
			
		||||
    const obj = JSON.parse(params);
 | 
			
		||||
    return obj;
 | 
			
		||||
  } catch (error) {
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
const options = [
 | 
			
		||||
  { key: "companyName", label: "企业名称" },
 | 
			
		||||
  { key: "servicePlatformName", label: "服务平台名称" },
 | 
			
		||||
  { key: "thirdPlatformName", label: "上级平台名称" },
 | 
			
		||||
  { key: "alarmReason", label: "告警原因" },
 | 
			
		||||
  {
 | 
			
		||||
    key: "pushStatus",
 | 
			
		||||
    label: "推送状态",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "businessName",
 | 
			
		||||
    label: "业务名称",
 | 
			
		||||
  },
 | 
			
		||||
  { key: "receiveTime", label: "数据接收时间" },
 | 
			
		||||
 | 
			
		||||
  { key: "handleBy", label: "	处理人" },
 | 
			
		||||
  { key: "handleRemark", label: "处理备注" },
 | 
			
		||||
  {
 | 
			
		||||
| 
						 | 
				
			
			@ -40,10 +85,24 @@ const options = [
 | 
			
		|||
    label: "处理结果",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    key: "status",
 | 
			
		||||
    key: "handleStatus",
 | 
			
		||||
    label: "处理状态",
 | 
			
		||||
  },
 | 
			
		||||
  { key: "alarmReason", label: "告警原因", span: 2 },
 | 
			
		||||
  {
 | 
			
		||||
    key: "receiveData",
 | 
			
		||||
    label: "上报数据",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss"></style>
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.key-contanier {
 | 
			
		||||
  color: #92278f;
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
.value-contanier {
 | 
			
		||||
  color: #3ab54a;
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,8 +7,8 @@
 | 
			
		|||
      :data="list"
 | 
			
		||||
      @get-data="getData"
 | 
			
		||||
    >
 | 
			
		||||
      <el-table-column prop="servicePlatformName" label="所在平台名称" />
 | 
			
		||||
      <el-table-column prop="thirdPlatformName" label="上级平台名称" />
 | 
			
		||||
      <el-table-column prop="serviceName" label="所在平台名称" />
 | 
			
		||||
      <el-table-column prop="platformName" label="上级平台名称" />
 | 
			
		||||
      <el-table-column prop="businessName" label="数据类型" />
 | 
			
		||||
      <el-table-column prop="receiveTime" label="上传时间" />
 | 
			
		||||
      <el-table-column prop="receiveStatus" label="数据接收状态">
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ const reqMapObj = reqMapArr.find(
 | 
			
		|||
  (item) => item.dataType.indexOf(route.query.dataType) !== -1
 | 
			
		||||
);
 | 
			
		||||
const reqMapOptions = reqMapObj?.options || [];
 | 
			
		||||
const reqMap = reqMapObj?.reqMap;
 | 
			
		||||
const reqMap = reqMapObj?.reqMap || {};
 | 
			
		||||
 | 
			
		||||
const { list, pagination, searchForm, getData, resetPagination, tableRef } =
 | 
			
		||||
  useListData(getRecordList, {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,6 +3,8 @@
 | 
			
		|||
    <el-row :gutter="40">
 | 
			
		||||
      <el-col :span="8">
 | 
			
		||||
        <div class="grid-content">
 | 
			
		||||
          <h3 class="tc">上报数据</h3>
 | 
			
		||||
          <el-divider></el-divider>
 | 
			
		||||
          <template v-if="!fnToJsonParse(requestJson)">{{
 | 
			
		||||
            requestJson
 | 
			
		||||
          }}</template>
 | 
			
		||||
| 
						 | 
				
			
			@ -22,6 +24,8 @@
 | 
			
		|||
      </el-col>
 | 
			
		||||
      <el-col :span="16">
 | 
			
		||||
        <div class="grid-content" v-for="(item, index) in logList" :key="index">
 | 
			
		||||
          <h3 class="tc">请求数据</h3>
 | 
			
		||||
          <el-divider></el-divider>
 | 
			
		||||
          <div v-if="item.requestTime">请求时间{{ item.requestTime }}</div>
 | 
			
		||||
          <el-row :gutter="40">
 | 
			
		||||
            <el-col :span="12">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,10 @@
 | 
			
		|||
        <el-table-column prop="fieldType" label="字段类型" />
 | 
			
		||||
        <el-table-column label="是否必填">
 | 
			
		||||
          <template #default="{ row }">
 | 
			
		||||
            <el-radio-group v-model="row.isRequired">
 | 
			
		||||
            <el-radio-group
 | 
			
		||||
              v-model="row.isRequired"
 | 
			
		||||
              @change="fnChangeRequired(row)"
 | 
			
		||||
            >
 | 
			
		||||
              <el-radio :value="1">是</el-radio>
 | 
			
		||||
              <el-radio :value="0">否</el-radio>
 | 
			
		||||
            </el-radio-group>
 | 
			
		||||
| 
						 | 
				
			
			@ -62,7 +65,7 @@
 | 
			
		|||
        </el-table-column>
 | 
			
		||||
        <el-table-column label="是否需要">
 | 
			
		||||
          <template #default="{ row }">
 | 
			
		||||
            <el-radio-group v-model="row.isNeed">
 | 
			
		||||
            <el-radio-group v-model="row.isNeed" @change="fnChangeNeed(row)">
 | 
			
		||||
              <el-radio :value="1">是</el-radio>
 | 
			
		||||
              <el-radio :value="0">否</el-radio>
 | 
			
		||||
            </el-radio-group>
 | 
			
		||||
| 
						 | 
				
			
			@ -134,6 +137,16 @@ const fnFindByMenuId = async () => {
 | 
			
		|||
  });
 | 
			
		||||
  list.value = data.list;
 | 
			
		||||
};
 | 
			
		||||
const fnChangeRequired = (row) => {
 | 
			
		||||
  if (row.isRequired === 1) {
 | 
			
		||||
    row.isNeed = 1;
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
const fnChangeNeed = (row) => {
 | 
			
		||||
  if (row.isNeed === 0) {
 | 
			
		||||
    row.isRequired = 0;
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
const validateForm = () => {
 | 
			
		||||
  if (!form.value.menuId && !form.value.tableName) {
 | 
			
		||||
    return ElMessage.warning("请选择数据目录并填写对接表名称");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue