qx
qx
2 天以前 26a983e0c22f1fe54c91c66c2b52888858e52cd1
src/views/picture/picture/index.vue
@@ -778,14 +778,21 @@
      let tjNumber = val;
      this.loading = true;
      getYxJcXx(tjNumber).then((res) => {
        this.tableList = res.data.map((item) => {
          // 如果 imageUrl 存在且是纯 Base64 字符串,添加 data:image 前缀
          if (item.imageUrl && !item.imageUrl.startsWith("data:image")) {
            // 假设图片类型为 png,如果接口提供类型,可以替换为动态值
            item.imageUrl = `data:image/png;base64,${item.imageUrl}`;
          }
          return item;
        });
        if (res && res.data && Array.isArray(res.data)) {
          this.tableList = res.data.map((item) => {
            // 如果 imageUrl 存在且是纯 Base64 字符串,添加 data:image 前缀
            if (item.imageUrl && !item.imageUrl.startsWith("data:image")) {
              // 假设图片类型为 png,如果接口提供类型,可以替换为动态值
              item.imageUrl = `data:image/png;base64,${item.imageUrl}`;
            }
            return item;
          });
        }else {
          // 如果 res.data 不存在或不是数组,设置为空数组
          this.tableList = [];
          console.warn('API response data is not an array:', res);
        }
        this.loading = false;
        this.$nextTick(() => {
          const headerCheckbox = this.$refs.mu.$el.querySelector(
@@ -914,13 +921,35 @@
      this.form.proResult = yxbx;
    },
    submiepilog() {
      // 检查 tableList 是否为空
      if (!this.tableList || this.tableList.length === 0) {
        this.$message.warning("表格中没有数据");
        return;
      }
      // 检查 tableList 表格中是否有选中的项目
      const selectedRows = this.$refs.mu.selection;
      if (!selectedRows || selectedRows.length === 0) {
        this.$message.warning("请先选择表格中的项目");
        return;
      }
      this.$refs.aaa.open = true;
      let proId = "1633660948860522585";
      this.$refs.aaa.getList(proId);
    },
    submito() {
      if (!this.selectedRow || !this.selectedRow.proId) {
        this.$message.error("请选择提交项目");
      // 检查 tableList 是否为空
      if (!this.tableList || this.tableList.length === 0) {
        this.$message.warning("表格中没有数据");
        return;
      }
      // 检查 tableList 表格中是否有选中的项目
      const selectedRows = this.$refs.mu.selection;
      if (!selectedRows || selectedRows.length === 0) {
        this.$message.warning("请先选择表格中的项目");
        return;
      }