riku
2024-10-25 cc8043754bd50e28298e0b238e3fdf0b47d2f830
1. 数据产品功能(暂存)
已修改5个文件
33 ■■■■ 文件已修改
package-lock.json 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/data-product/components/BaseDataProduct.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
@@ -17,6 +17,7 @@
        "dayjs": "^1.11.13",
        "element-plus": "^2.8.3",
        "exceljs": "^4.4.0",
        "file-saver": "^2.0.5",
        "js-base64": "^3.7.5",
        "md5": "^2.3.0",
        "pinia": "^2.0.26",
@@ -4691,6 +4692,11 @@
      "engines": {
        "node": "^10.12.0 || >=12.0.0"
      }
    },
    "node_modules/file-saver": {
      "version": "2.0.5",
      "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
      "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
    },
    "node_modules/fill-range": {
      "version": "7.0.1",
@@ -11406,6 +11412,11 @@
        "flat-cache": "^3.0.4"
      }
    },
    "file-saver": {
      "version": "2.0.5",
      "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
      "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
    },
    "fill-range": {
      "version": "7.0.1",
      "dev": true,
package.json
@@ -22,6 +22,7 @@
    "dayjs": "^1.11.13",
    "element-plus": "^2.8.3",
    "exceljs": "^4.4.0",
    "file-saver": "^2.0.5",
    "js-base64": "^3.7.5",
    "md5": "^2.3.0",
    "pinia": "^2.0.26",
src/api/index.js
@@ -11,7 +11,7 @@
let ip2_file = 'https://fyami.com.cn/';
if (debug) {
  ip1 = 'http://192.168.0.138:8080/';
  ip1 = 'http://192.168.0.138:9001/';
  // ip1_file = 'http://192.168.0.138:8080/';
  // ip2 = 'http://192.168.0.138:8080/';
  // ip2_file = 'https://fyami.com.cn/';
src/components.d.ts
@@ -47,7 +47,10 @@
    ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
    ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
    ElOption: typeof import('element-plus/es')['ElOption']
    ElPagination: typeof import('element-plus/es')['ElPagination']
    ElPopover: typeof import('element-plus/es')['ElPopover']
    ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
    ElRow: typeof import('element-plus/es')['ElRow']
    ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
    ElSegmented: typeof import('element-plus/es')['ElSegmented']
src/views/fysp/data-product/components/BaseDataProduct.vue
@@ -68,16 +68,16 @@
            :prop="item1.name"
            :label="item1.name"
          >
            <template v-if="item1.children" #default="{ row1 }">
              <span v-html="row1[item1.name]"></span>
            <template v-if="item1.children" #default="scope1">
              <span v-html="scope1.row[item1.name]"></span>
              <el-table-column
                v-for="(item2, index2) in item1.children"
                :key="index2"
                :prop="item2.name"
                :label="item2.name"
              >
                <template v-if="item2.children" #default="{ row2 }">
                  <span v-html="row2[item2.name]"></span>
                <template v-if="item2.children" #default="scope2">
                  <span v-html="scope2.row[item2.name]"></span>
                </template>
              </el-table-column>
            </template>
@@ -218,14 +218,18 @@
    if (matchTxt) {
      matchTxt.forEach((txt) => {
        let newTxt = txt.replace(new RegExp(/\n/, 'g'), '<br />');
        // let newTxt = txt.replace(new RegExp(/\n/, 'g'), '</span><br/><span>');
        // newTxt = newTxt.replace(new RegExp(/"/, 'g'), '');
        // tableData = tableData.replace(txt, `<span>${newTxt}</span>`);
        let newTxt = txt.replace(new RegExp(/\n/, 'g'), '');
        newTxt = newTxt.replace(new RegExp(/"/, 'g'), '');
        tableData = tableData.replace(txt, newTxt);
      });
      // console.log(tableData);
    }
    // console.log(tableData);
    const t = strToTableObj(tableData);
    console.log(t);
    // console.log(head);
    // console.log(data);
    excelDatas.value.set(sheetName, t);