diff --git a/jero-web/src/components/CollectionTypeDisabled/index.vue b/jero-web/src/components/CollectionTypeDisabled/index.vue index 7711a94c6..8528fa48d 100644 --- a/jero-web/src/components/CollectionTypeDisabled/index.vue +++ b/jero-web/src/components/CollectionTypeDisabled/index.vue @@ -2,604 +2,739 @@
-
-
-
- - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- +
+
+
+
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ +
-
-
-
- - - - - - - - - - - -
- +
+
+
+
+ + + + + + + + + + + +
+ +
+
+ +
+
+ +
-
-
-
- - +
+
+
+
+ + {{ item.label }} - - + + +
+
+
+ +
+
+
-
-
-
- - +
+
+
+
+ + {{ item.label }} - - + + +
+
+
+ +
+
+
-
-
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - +
+
+
+
+ + {{ (itemval.dataValue === 'null' || itemval.dataValue === '' || + itemval.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + +
+
+
+ +
+
+
-
-
-
- - +
+
+
+
+ + {{ itemin.label }} - - + + +
+
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
-
- - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
+
+ +
+
+
-
-
-
- - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
- - +
+
+
+
+ + {{ item.label }} - - + + +
+
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ +
+
+
-
-
-
- - - - - - - - - - - -
- +
+
+
+
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- +
+ + {{ (itemval.dataValue === 'null' || itemval.dataValue === '' || + itemval.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} +
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - +
+ +
+
+
-
-
-
- - +
+
+
+ +
+ + {{ itemin.label }} - - + + +
+
+ + {{ (itemval.dataValue === 'null' || itemval.dataValue === '' || + itemval.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + +
+
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - +
+ +
+
+
-
-
-
- - +
+
+
+ +
+ + {{ item.label }} - - + + +
+
+ + {{ (itemval.dataValue === 'null' || itemval.dataValue === '' || + itemval.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} + +
+
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - +
+ +
+
+
-
-
-
- - +
+
+ +
+ +
+ + {{ itemin.label }} - - -
-
- - - - - - - - - - - -
- + +
- -
- +
+ + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- +
+ + {{ (itemval.dataValue === 'null' || itemval.dataValue === '' || + itemval.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} +
-
- - {{ (item.dataValue === 'null' || item.dataValue === '' || - item.dataValue == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} - +
+ +
+
+
@@ -627,17 +762,30 @@ isLock: '0', formInline: {}, visible: false, - detailDatetransformation: [] + detailDatetransformation: [], + fileNameOne: '', + fileNameTwo: '', + fileIndex: '' } }, components: { uploadFileChangeDown }, mounted() { - this.detailDate.list.forEach((item) => { - if (item.type === 'pull_more') { - console.log(item.dataValue) - } + // this.detailDate.list.forEach((item) => { + // if (item.type === 'pull_more') { + // console.log(item.dataValue) + // } + // // this.detailDatetransformation.push(item) + // }) + this.paramsConfigData = this.detailDate.paramsConfigData + Object.keys(this.detailDate.paramsConfigData).forEach(res => { + this.detailDate.paramsConfigData[res].forEach(val => { + if (val.type === 'pull_more' && !val.dataValue) { + val.dataValue = [] + } + }) + // }) // this.detailDatetransformation.push(item) }) }, @@ -668,14 +816,16 @@ // console.log('form',this.formInline) } - this.detailDate.list.forEach((item, index) => { - if (item.type === 'file') { - item.dataValue = attIdList.join(',') - } - }) - this.$emit('update:detailDate', this.detailDate); + this.detailDate.paramsConfigData[this.fileNameOne][this.fileIndex].dataValue = attIdList.join(',') + // this.detailDateList.forEach((item, index) => { + // if (item.type === 'file') { + // item.dataValue = attIdList.join(',') + // } + // }) }, - clickButtonToUpload(item) { + clickButtonToUpload(name, item, index) { + this.fileNameOne = name + this.fileIndex = index // if (item.isLock == '1') { // this.$refs.uploadFile.disabled = true // } else { @@ -689,6 +839,50 @@ this.$refs.uploadFile.perentHandleFunc() } }) + }, + generateRandom() { + return Math.random().toString(32) + }, + addconfig() { + let paramsConfigData = Object.keys(this.detailDate.paramsConfigData) + for (let i = 0; i < paramsConfigData.length; i++) { + if (i == paramsConfigData.length - 1) { + let name = paramsConfigData[i] + let generateRandom = this.generateRandom() + this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name])) + this.detailDate.paramsConfigData[generateRandom].forEach(res => { + if (res.type === 'pull_more') { + res.dataValue = [] + } else { + res.dataValue = '' + } + }) + } + } + this.detailDate.paramsConfigData = { ...this.detailDate.paramsConfigData } + this.$emit('consolidateData') + // postAction('params/configData/add', { + // paramsCollectManifestId: this.recordList.id, + // paramsConfigId: this.detailDate.configId + // }).then((res) => { + // if (res.success) { + // this.$emit('collectionForm') + // } else { + // } + // }) + }, + delconfig(item) { + delete this.detailDate.paramsConfigData[item] + this.detailDate.paramsConfigData = { ...this.detailDate.paramsConfigData } + this.$emit('consolidateData') + // for (const key in this.detailDate.paramsConfigData) { + // deleteAction('params/configData/delete', { id: key }).then((res) => { + // if (res.success) { + // this.$emit('collectionForm') + // } else { + // } + // }) + // } } }, watch: { @@ -725,17 +919,32 @@ line-height: 38px !important; } + .ant-select-selection-selected-value { + height: 100%; + } + .selectWid .ant-select-selection__rendered { line-height: 36px !important; } + diff --git a/jero-web/src/components/tableCollection/index1.vue b/jero-web/src/components/tableCollection/index1.vue index 5484a236d..71777e9d4 100644 --- a/jero-web/src/components/tableCollection/index1.vue +++ b/jero-web/src/components/tableCollection/index1.vue @@ -58,7 +58,7 @@ - +
@@ -293,6 +293,7 @@ detailDateList: [], selectedRowKeys: [], selectedRowrowValue: [], + description:'', dataSource: [], pageNo: 1, pageSize: 100, @@ -653,13 +654,24 @@ if (this.currentPersonRole !== 'dre') { res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { + if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - Obj[item].list.forEach((itemLi) => { - itemLi.isLock = 1 - if (itemLi.type === 'pull_more') { - itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') - } - }) + for (const key in Obj[item].paramsConfigData){ + Obj[item].paramsConfigData[key].forEach((itemLi) => + { + + itemLi.isLock = 1 + if (itemLi.type === 'pull_more') { + itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') + } + }) + } + // Obj[item].list.forEach((itemLi) => { + // itemLi.isLock = 1 + // if (itemLi.type === 'pull_more') { + // itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') + // } + // }) } }) tt.push(Obj) @@ -668,11 +680,18 @@ res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - Obj[item].list.forEach((itemLi) => { - if (itemLi.type === 'pull_more') { - itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') - } - }) + for (const key in Obj[item].paramsConfigData){ + Obj[item].paramsConfigData[key].forEach((itemLi) => { + if (itemLi.type === 'pull_more') { + itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') + } + }) + } + // Obj[item].list.forEach((itemLi) => { + // if (itemLi.type === 'pull_more') { + // itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') + // } + // }) } }) tt.push(Obj) @@ -693,6 +712,9 @@ cancleoperationFailed() { this.selectedRowKeys = [] }, + consolidateData(){ + this.dataSource = [...this.dataSource] + }, getTableList(currentPersonRole) { console.log(this.url.tableList) let paramsManifestid @@ -734,28 +756,56 @@ // }) let tt = [] if (this.currentPersonRole !== 'dre') { + + console.log(res.result.records, 'res.result.records') res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - Obj[item].list.forEach((itemLi) => { - itemLi.isLock = 1 - if (itemLi.type === 'pull_more') { - itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') - } - }) + for (const key in Obj[item].paramsConfigData){ + Obj[item].paramsConfigData[key].forEach((itemLi) => { + console.log(item) + if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){ + itemLi.isLock = 0 + }else{ + itemLi.isLock = 1 + } + if (itemLi.type === 'pull_more') { + itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') + } + }) + } + // Obj[item].list.forEach((itemLi) => { + // console.log(item) + // if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){ + // itemLi.isLock = 0 + // }else{ + // itemLi.isLock = 1 + // } + // if (itemLi.type === 'pull_more') { + // itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') + // } + // }) } }) tt.push(Obj) }) } else { + res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - Obj[item].list.forEach((itemLi) => { - if (itemLi.type === 'pull_more') { - itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') - } - }) + for (const key in Obj[item].paramsConfigData){ + Obj[item].paramsConfigData[key].forEach((itemLi) => { + if (itemLi.type === 'pull_more') { + itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') + } + }) + } + // Obj[item].list.forEach((itemLi) => { + // if (itemLi.type === 'pull_more') { + // itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') + // } + // }) } }) tt.push(Obj) diff --git a/jero-web/src/views/parameter/managementdetails/index.vue b/jero-web/src/views/parameter/managementdetails/index.vue index f9b4518ec..66d960461 100644 --- a/jero-web/src/views/parameter/managementdetails/index.vue +++ b/jero-web/src/views/parameter/managementdetails/index.vue @@ -316,34 +316,69 @@ data.forEach(res => { selectedRowKeysValue.push(res) }) - console.log(selectedRowKeysValue) - 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' && selectedRowKeysValue[i][itemIn[j]].list) { - 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 !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) { - 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() + // console.log(selectedRowKeysValue) + // 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' && selectedRowKeysValue[i][itemIn[j]].list) { + // 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 !== null && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue instanceof Array) { + // 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 + // postDateobj.remarks = selectedRowKeysValue[i].remarks + // postDate.push(postDateobj) + // } + // let configDataList = { configDataList: postDate } + if (selectedRowKeysValue && selectedRowKeysValue.length > 0) { + let configDataList = [] + for (let i = 0; i < selectedRowKeysValue.length; i++) { + configDataList.push({ + id: selectedRowKeysValue[i].id + }) + if (selectedRowKeysValue[i].configIds && selectedRowKeysValue[i].configIds.length > 0) { + for (let j = 0; j < selectedRowKeysValue[i].configIds.length; j++) { + let keyIndex = Object.keys(selectedRowKeysValue[i]) + for (let k = 0; k < keyIndex.length; k++) { + if (keyIndex[k] == selectedRowKeysValue[i].configIds[j]) { + let keyName = keyIndex[k] + configDataList[i][keyName] = selectedRowKeysValue[i][keyName] } } } } } - postDateobj.id = selectedRowKeysValue[i].id - postDateobj.remarks = selectedRowKeysValue[i].remarks - postDate.push(postDateobj) - } - let configDataList = { configDataList: postDate } - if (selectedRowKeysValue && selectedRowKeysValue.length > 0) { + // return + if (configDataList && configDataList.length > 0) { + configDataList.forEach(res => { + Object.keys(res).forEach(val => { + if (res[val] && res[val].paramsConfigData) { + let paramsConfigData = res[val].paramsConfigData + Object.keys(paramsConfigData).forEach((ol, index) => { + paramsConfigData[ol][0].orderNum = index + paramsConfigData[ol].forEach(item => { + if (item.type == 'pull_more') { + item.dataValue = item.dataValue.join(',') + } + }) + }) + } + }) + }) + } this.textLoading = true let query = { - ...configDataList, + configDataList: configDataList, paramsManifestId: this.$route.query.id } postAction('/report/detail/save', query).then((res) => {