| | |
| | | </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> |
| | |
| | | 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, |
| | | }, |
| | |
| | | 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: { |
| | |
| | | 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; |
| | |
| | | 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; |