[update] 修改bug80447

This commit is contained in:
lideqin
2024-01-16 14:23:26 +08:00
parent 5954525a32
commit 424e49aa92
14 changed files with 321 additions and 188 deletions
@@ -6,7 +6,7 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => { return (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index }"
rowKey="uid"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
@@ -21,10 +21,10 @@
<!--</template>-->
<!-- 操作栏 -->
<div slot="action" slot-scope="{record, index}" class="action-span-cell">
<div slot="action" slot-scope="{record}" class="action-span-cell">
<!-- 上传企标 只能上传分配给自己的上传企标,到期未上传跳过该起草人,操作列表显示- -->
<a v-if="record.operateType !== '1'"
@click="handleUploadStandard(record, index)"
@click="handleUploadStandard(record)"
class="table-ope-btn"
:disabled="disabled"
>
@@ -112,7 +112,7 @@ export default {
loading: false,
userInfo: {}, // 当前登录人信息
currentDate: '',
uploadIndex: undefined // 正在上传企标的下标
uploadUid: undefined // 正在上传企标的行uid
}
},
mounted () {
@@ -123,7 +123,15 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值
this.dataSource = data.otherDraftUserVOS
this.dataSource = data.otherDraftUserVOS.map(item => {
const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10)
}
return {
uid: uidGenerator(),
...item
}
})
// 给表单赋值
this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data)
@@ -165,10 +173,9 @@ export default {
this.ipagination = pagination
},
// 上传企标
handleUploadStandard (record, index) {
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
handleUploadStandard (record) {
this.$refs.uploadFile.open(record.fileId)
this.uploadIndex = dataIndex
this.uploadUid = record.uid
},
// 上传企标后的回调
uploadFileChange (data) {
@@ -179,7 +186,8 @@ export default {
})
}
/** 赋值给对应行的企标 */
this.dataSource[this.uploadIndex].fileId = attIdList.join(',')
const dataIndex = this.dataSource.findIndex(item => item.uid === this.uploadUid)
this.dataSource[dataIndex].fileId = attIdList.join(',')
}
}
}