修改禅道已知bug

This commit is contained in:
qq787203167
2022-07-02 14:19:03 +08:00
parent 6d70cc7e90
commit f163558c0c
2 changed files with 65 additions and 2 deletions
@@ -621,6 +621,7 @@
this.selectedRowrowValue = []
this.$emit('value', this.selectedRowKeys)
this.$emit('rowValue', this.selectedRowrowValue)
this.$emit('getDataSource', this.dataSource)
setTimeout(() => {
this.loading = false
}, 500)
@@ -130,6 +130,11 @@
<a-icon type="plus"/>
{{$t('referenceparameter')}}
</div>
<!-- 保存-->
<div @click="handlePreservation(1)" class="operator-text" v-if='currentPersonRole == "dre"'>
<a-icon type="check-circle"/>
{{$t('preservation')}}
</div>
<!-- 提交-->
<div @click="handleSubmit" class="operator-text" v-if='currentPersonRole == "dre"'>
<a-icon type="check-circle"/>
@@ -157,7 +162,9 @@
<div style="width: 100%">
<!-- 表格-10控件-->
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
:formInline='formInline' :currentPersonRole='currentPersonRole' @value='value'
:formInline='formInline' :currentPersonRole='currentPersonRole'
@getDataSource="getDataSource"
@value='value'
@listReset='listReset' @LoginUserType='LoginUserType'/>
</div>
</a-card>
@@ -503,9 +510,15 @@
},
mounted() {
this.GetgetLoginUserType()
this.time = setInterval(() => {
this.handlePreservation()
}, 10000)
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
},
beforeDestroy() {
clearInterval(this.time);
},
methods: {
...mapGetters(['userInfo']),
handleCancelRoleSwitching() {
@@ -814,7 +827,7 @@
}
return flag
},
LoginUserType(val, currentPersonRole,userType) {
LoginUserType(val, currentPersonRole, userType) {
this.RoleType = []
if (this.currentPersonRole == '') {
this.currentPersonRole = currentPersonRole || userType || val[0].value
@@ -1001,6 +1014,55 @@
this.NoEngineer = 1
}
},
getDataSource(data) {
this.dataSource = data
},
handlePreservation(num) {
let _this = this
let postDate = []
let data = JSON.parse(JSON.stringify(this.dataSource))
let selectedRowKeysValue = []
data.forEach(res => {
if (res.state == 'Wait Fill' || res.state == '待填写') {
selectedRowKeysValue.push(res)
}
})
for (let i = 0; i < selectedRowKeysValue.length; i++) {
let postDateobj = {}
let itemIn = Object.keys(selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
}
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
}
}
}
}
}
postDateobj.id = selectedRowKeysValue[i].id
postDate.push(postDateobj)
}
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
postAction('/params/collectManifest/save', configDataList).then((res) => {
if (res.success) {
if (num && num == 1) {
_this.$message.success(_this.$t('OperationSuccessful'))
}
} else {
if (num && num == 1) {
_this.$message.warning(_this.$t('operationFailed'))
}
}
})
}
},
// 提交数据
ishandleSubmit() {
let _this = this