diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue
index cc7ae0aa4..ffb6d6052 100644
--- a/jero-web/src/components/tableCollection/index.vue
+++ b/jero-web/src/components/tableCollection/index.vue
@@ -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)
diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
index ca847d402..2d1e8886f 100644
--- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
+++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
@@ -130,6 +130,11 @@
{{$t('referenceparameter')}}
+
+
+
+ {{$t('preservation')}}
+
@@ -157,7 +162,9 @@
@@ -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