diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index 5edbc5c27..02ab1fba8 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -1,16 +1,33 @@ @@ -91,6 +107,8 @@ return { loading: false, gData: [], + valueSelect: [], + dictOptions: [], autoExpandParent: false, checkboxList: [], expandedKeys: [], @@ -111,7 +129,35 @@ } }, mounted() { - + this.valueSelect = [] + this.dictOptions = [] + setTimeout(() => { + if (this.value) { + let contentName = [] + let contentId = [] + if (this.personneQuery[this.query.db_field_name + 'Name']) { + contentName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') + } else if (this.personneQuery[this.query.db_field_name]) { + contentName = this.personneQuery[this.query.db_field_name].split(',') + } else { + contentName = [] + } + if (this.personneQuery[this.query.db_field_name + '_id']) { + contentId = this.personneQuery[this.query.db_field_name + '_id'].split(',') + } else if (this.personneQuery[this.query.db_field_name]) { + contentId = this.personneQuery[this.query.db_field_name].split(',') + } else { + contentId = [] + } + contentId.forEach((res, index) => { + this.dictOptions.push({ + value: res, + title: contentName[index] + }) + this.valueSelect.push(res) + }) + } + }, 600) }, methods: { // checkChange(val, checked, indeterminate) { @@ -314,6 +360,28 @@ this.visible = false this.treeVisible = false }, + onChange(value) { + this.valueSelect = value + console.log(this.valueSelect) + console.log(this.dictOptions) + this.userIds = [] + this.userName = [] + if (this.valueSelect && this.valueSelect.length > 0) { + value.forEach(res => { + this.dictOptions.forEach(val => { + if (res == val.value) { + this.userIds.push(val.value) + this.userName.push(val.title) + } + }) + }) + } + let userIds = JSON.parse(JSON.stringify(this.userIds)) + let userName = JSON.parse(JSON.stringify(this.userName)) + console.log(userIds) + this.$emit('input', userName.join(',')) + this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) + }, handleSubmit() { // if (this.userIds && this.userIds.length > 0) { if (this.isSingleChoice) { @@ -330,6 +398,19 @@ // userIds = userIds.filter(function(item, index) { // return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 // }) + if (!this.isInput) { + this.dictOptions = [] + this.valueSelect = [] + if (userIds && userIds.length > 0) { + userIds.forEach((res, index) => { + this.dictOptions.push({ + title: userName[index], + value: res + }) + this.valueSelect.push(res) + }) + } + } this.$emit('input', userName.join(',')) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.visible = false @@ -514,11 +595,18 @@ width: 100%; } + .itemModelStand-input { + width: calc(100% - 100px); + display: inline-block; + height: 38px; + } + .button-box { + width: 90px; margin-left: 10px; height: 38px; line-height: 38px; - + float: right; } .drawer-bootom-button { @@ -590,4 +678,18 @@ color: #21c9cc; display: inline-block; } + + .itemOption { + display: inline-block; + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + } + + \ No newline at end of file diff --git a/jero-web/src/components/libraryAddForm/index.vue b/jero-web/src/components/libraryAddForm/index.vue index 73fae7f9f..86cd81291 100644 --- a/jero-web/src/components/libraryAddForm/index.vue +++ b/jero-web/src/components/libraryAddForm/index.vue @@ -150,6 +150,7 @@ * {{$t('authorizedUser')}} - + * {{$t('regulatoryContact')}} - + {{$t('Administrativeprivileges')}} - + {{$t('Checkthepermissions')}} - + diff --git a/jero-web/src/views/projectManagement/components/addModel.vue b/jero-web/src/views/projectManagement/components/addModel.vue index 65b190bd4..4a4469093 100644 --- a/jero-web/src/views/projectManagement/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/addModel.vue @@ -93,10 +93,11 @@ * {{$t('StudioEngineer')}} - + @@ -108,10 +109,11 @@
{{$t('certifiedEngineer')}}
- + diff --git a/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue b/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue index 1468194df..8de753c3c 100644 --- a/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue +++ b/jero-web/src/views/projectManagement/components/listOfRelevantPersonnel.vue @@ -176,8 +176,9 @@ {{$t('regulatoryEngineer')}} - + {{$t('engineeringInterfacePerson')}} - + @@ -36,6 +37,7 @@