修改禅道已知bug
This commit is contained in:
@@ -621,6 +621,7 @@
|
|||||||
this.selectedRowrowValue = []
|
this.selectedRowrowValue = []
|
||||||
this.$emit('value', this.selectedRowKeys)
|
this.$emit('value', this.selectedRowKeys)
|
||||||
this.$emit('rowValue', this.selectedRowrowValue)
|
this.$emit('rowValue', this.selectedRowrowValue)
|
||||||
|
this.$emit('getDataSource', this.dataSource)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|||||||
@@ -130,6 +130,11 @@
|
|||||||
<a-icon type="plus"/>
|
<a-icon type="plus"/>
|
||||||
{{$t('referenceparameter')}}
|
{{$t('referenceparameter')}}
|
||||||
</div>
|
</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"'>
|
<div @click="handleSubmit" class="operator-text" v-if='currentPersonRole == "dre"'>
|
||||||
<a-icon type="check-circle"/>
|
<a-icon type="check-circle"/>
|
||||||
@@ -157,7 +162,9 @@
|
|||||||
<div style="width: 100%">
|
<div style="width: 100%">
|
||||||
<!-- 表格-10控件-->
|
<!-- 表格-10控件-->
|
||||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
|
<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'/>
|
@listReset='listReset' @LoginUserType='LoginUserType'/>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
@@ -503,9 +510,15 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.GetgetLoginUserType()
|
this.GetgetLoginUserType()
|
||||||
|
this.time = setInterval(() => {
|
||||||
|
this.handlePreservation()
|
||||||
|
}, 10000)
|
||||||
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
|
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
|
||||||
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
|
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
clearInterval(this.time);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
handleCancelRoleSwitching() {
|
handleCancelRoleSwitching() {
|
||||||
@@ -814,7 +827,7 @@
|
|||||||
}
|
}
|
||||||
return flag
|
return flag
|
||||||
},
|
},
|
||||||
LoginUserType(val, currentPersonRole,userType) {
|
LoginUserType(val, currentPersonRole, userType) {
|
||||||
this.RoleType = []
|
this.RoleType = []
|
||||||
if (this.currentPersonRole == '') {
|
if (this.currentPersonRole == '') {
|
||||||
this.currentPersonRole = currentPersonRole || userType || val[0].value
|
this.currentPersonRole = currentPersonRole || userType || val[0].value
|
||||||
@@ -1001,6 +1014,55 @@
|
|||||||
this.NoEngineer = 1
|
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() {
|
ishandleSubmit() {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
|||||||
Reference in New Issue
Block a user