研发图纸文件管理系统-前端项目
he wei
2022-09-08 037e9248103698ea0944cdf7aa21a293b78dcc62
U 软件列表 查询修改
1个文件已修改
80 ■■■■ 已修改文件
src/pages/resourceManage/software/list.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/software/list.vue
@@ -41,7 +41,24 @@
              </a-space>
            </template>
            <template slot="action" slot-scope="{ record }">
              <a-popover title="" trigger="hover">
                <div class="" slot="content" style="width: 450px">
                  <a-table
                    size="small"
                    :scroll="{ y: 300 }"
                    bordered
                    :columns="prodsColumns"
                    :data-source="record.links"
                    :pagination="false"
                    :expandRowByClick="true"
                    :row-key="(record1, index) => index"
                  >
                  </a-table>
                </div>
                <a>适用机型</a>
              </a-popover>
              <template v-if="canDownloadSoftware">
                <a-divider type="vertical"></a-divider>
                <a @click="download(record)">下载</a>
              </template>
            </template>
@@ -132,44 +149,47 @@
      columns: [
        {
          title: "名称",
          dataIndex: "fileName",
          dataIndex: "soft.fileName",
          align: "center",
          searchAble: true,
        },
        {
          title: "类型",
          dataIndex: "type",
          dataIndex: "soft.type",
          align: "center",
          width: 180,
          noSearch: true,
        },
        {
          title: "版本",
          dataIndex: "version",
          dataIndex: "soft.version",
          align: "center",
          noSearch: true,
        },
        {
          title: "负责人",
          dataIndex: "owner",
          dataIndex: "soft.owner",
          align: "center",
          searchAble: true,
          width: 160
        },
        {
          title: "适用机型号",
          dataIndex: "applyModel",
          align: "center",
          searchAble: true,
          visible: false,
        },
        {
          title: "适用机料号",
          dataIndex: "applyMaterialCode",
          align: "center",
          searchAble: true,
        },
        {
          title: "适用机型号号",
          dataIndex: "applyModel",
          align: "center",
          searchAble: true,
          visible: false,
        },
        {
          title: "升级说明",
          dataIndex: "releaseNotes",
          dataIndex: "soft.releaseNotes",
          align: "center",
          noSearch: true,
        },
@@ -181,9 +201,24 @@
          fixed: "right",
          scopedSlots: { customRender: "action" },
          noSearch: true,
        }
        },
      ],
      dataSource: [],
      prodsColumns: [
        {
          title: "型号",
          dataIndex: "applyModel",
          align: "center",
          searchAble: true,
        },
        {
          title: "料号",
          dataIndex: "applyMaterialCode",
          align: "center",
          width: 180,
          noSearch: true,
        },
      ]
    };
  },
  components: {
@@ -220,7 +255,17 @@
      const { pageCurr, pageSize, conditions } = this;
      let params = {};
      Object.keys(conditions).forEach((v) => {
        params[v] = conditions[v];
        switch (v) {
          case "soft.fileName":
            params[v] = conditions['fileName'];
            break;
          case "soft.owner":
            params[v] = conditions['owner'];
            break;
          default:
            params[v] = conditions[v];
            break;
        }
      });
      getList(pageCurr, pageSize, params).then((res) => {
        res = res.data;
@@ -228,7 +273,14 @@
        let data = [];
        let total = 0;
        if (res.code && res.data) {
          data = res.data2.list;
          data = res.data2.list.map((v) => {
            let soft = v.softwares[0];
            return {
              id: soft.id,
              soft,
              links: v.softwares,
            };
          });
          total = res.data2.total;
        }
        this.dataSource = data;