|
|
@ -263,13 +263,13 @@ |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
label="操作" |
|
|
label="操作" |
|
|
align="center" |
|
|
align="center" |
|
|
width="100"> |
|
|
|
|
|
|
|
|
width="120"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="primary" @click="openDialog(scope.row)">查看</a> |
|
|
<a type="primary" @click="openDialog(scope.row)">查看</a> |
|
|
<!-- <a--> |
|
|
|
|
|
<!-- type="text" size="small"--> |
|
|
|
|
|
<!-- @click="viewSopFile(scope.row)"--> |
|
|
|
|
|
<!-- >查看附件</a>--> |
|
|
|
|
|
|
|
|
<a |
|
|
|
|
|
type="text" size="small" |
|
|
|
|
|
@click="viewSopFile(scope.row)" |
|
|
|
|
|
>查看附件</a> |
|
|
<a type="text" size="small" @click="downloadFile(scope.row)">下载</a> |
|
|
<a type="text" size="small" @click="downloadFile(scope.row)">下载</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -811,22 +811,29 @@ export default { |
|
|
} |
|
|
} |
|
|
this.dataList = data.rows2 |
|
|
this.dataList = data.rows2 |
|
|
// 遍历sopFileList,将每个对象的orderRef4赋值给versionNumber |
|
|
// 遍历sopFileList,将每个对象的orderRef4赋值给versionNumber |
|
|
data.rows3.forEach((item) => { |
|
|
|
|
|
|
|
|
data.rows3.forEach((item,index) => { |
|
|
|
|
|
const finalIndex = data.rows3.length - 1 |
|
|
item.fileType = item.fileSuffix |
|
|
item.fileType = item.fileSuffix |
|
|
item.versionNumber = item.orderRef4 |
|
|
item.versionNumber = item.orderRef4 |
|
|
item.resourceInfo = item.orderRef3 + '(' + item.resourceDesc + ')' |
|
|
item.resourceInfo = item.orderRef3 + '(' + item.resourceDesc + ')' |
|
|
if (item.expiryDate !== null) { |
|
|
|
|
|
if (new Date(item.expiryDate) < new Date()) { |
|
|
|
|
|
item.status = '失效' |
|
|
|
|
|
|
|
|
console.log(index) |
|
|
|
|
|
if (index !== 0){ |
|
|
|
|
|
if(item.orderRef3 !== data.rows3[index - 1].orderRef3){ |
|
|
|
|
|
data.rows3[index - 1].status = '有效' |
|
|
|
|
|
} else { |
|
|
|
|
|
data.rows3[index - 1].status = '无效' |
|
|
|
|
|
if (index === finalIndex){ |
|
|
|
|
|
item.status = '有效' |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
else { |
|
|
|
|
|
|
|
|
if (index + 1 === data.rows3.length){ |
|
|
item.status = '有效' |
|
|
item.status = '有效' |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
item.status = '有效' |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
data.rows3.forEach((item) =>{ |
|
|
if (this.searchData.status === '有效'){ |
|
|
if (this.searchData.status === '有效'){ |
|
|
if (item.status !== '失效'){ |
|
|
|
|
|
|
|
|
if (item.status === '有效'){ |
|
|
this.sopFileList.push(item) |
|
|
this.sopFileList.push(item) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|