liding
2 天以前 6c58e561a1a4747afd00226b35935edfd82c005e
fix(laboratory): 修正资质颁发时间字段显示与日期格式化
已修改1个文件
14 ■■■■■ 文件已修改
src/views/structural/capabilityAndLaboratory/laboratory/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/capabilityAndLaboratory/laboratory/index.vue
@@ -62,8 +62,8 @@
              <p style="line-height: 26px">
                资质名称:<span style="color: var(--el-color-primary)">{{ m.name }}</span>
              </p>
              <p style="line-height: 26px">颁发时间:{{ m.recentlyTime }}</p>
              <p style="line-height: 26px">到期时间:{{ m.expireTime }}</p>
              <p style="line-height: 26px">颁发时间:{{ formatDate(m.dateOfIssuance) }}</p>
              <p style="line-height: 26px">到期时间:{{ formatDate(m.expireTime) }}</p>
              <p>
                <span>状态:</span>
                <el-tag :type="m.state === 0 ? 'danger' : 'success'" size="small">{{ m.state === 0 ? "失效" : "有效"
@@ -167,6 +167,10 @@
} from "@/api/structural/laboratory";
import { getToken } from "@/utils/auth";
function formatDate(value) {
  return value ? String(value).slice(0, 10) : "";
}
export default {
  name: 'Laboratory',
  components: {
@@ -186,9 +190,8 @@
        { label: "资质编码", prop: "code" },
        { label: "颁发机构", prop: "organization" },
        { label: "资质说明", prop: "explanation" },
        { label: "首次颁发时间", prop: "firstIssuanceDate" },
        { label: "最近颁发时间", prop: "latestIssuanceDate" },
        { label: "到期颁发时间", prop: "expireTime" },
        { label: "颁发时间", prop: "dateOfIssuance", formatData: formatDate },
        { label: "到期时间", prop: "expireTime", formatData: formatDate },
        {
          dataType: "action",
          label: "操作",
@@ -257,6 +260,7 @@
    this.refreshTable();
  },
  methods: {
    formatDate,
    selectorSwitch(radio) {
      if (radio === 1) {
        this.reloadOverview();