diff --git a/src/components/selection/UserSelectByContact.vue b/src/components/selection/UserSelectByContact.vue index e91efbc5..c96115f1 100644 --- a/src/components/selection/UserSelectByContact.vue +++ b/src/components/selection/UserSelectByContact.vue @@ -5,15 +5,19 @@ :type="inputType" :autoSize="true" :rows="1" - disabled - class="user-input" + readOnly + :disabled="disabled" + :class="{ + 'input-readonly': !disabled, + 'user-input': showBtn + }" :placeholder="placeholder" :value="checkedValue" @click="selectClick" :title="checkedValue" > - + {{ $t('userSelect.select') }} @@ -56,6 +60,12 @@ export default { type: String, required: false, default: 'text' + }, + // 是否展示按钮 + showBtn: { + type: Boolean, + required: false, + default: true } }, watch: { @@ -73,6 +83,10 @@ export default { }, methods: { selectClick () { + // 禁用后不弹框 + if (this.disabled) { + return + } this.$refs.selectModal.open(this.value) }, selectChange (ids) { @@ -106,7 +120,7 @@ export default { width: calc(100% - 70px); } // 因为需要加title,所以不能把鼠标事件去掉 - /deep/ .ant-input-disabled { + /deep/ .input-readonly.ant-input-disabled { background: #fff; color: rgba(0, 0, 0, 0.65); cursor: default; diff --git a/src/components/selection/UserSelectByWorkGroup.vue b/src/components/selection/UserSelectByWorkGroup.vue index 2c1bea18..72ca8990 100644 --- a/src/components/selection/UserSelectByWorkGroup.vue +++ b/src/components/selection/UserSelectByWorkGroup.vue @@ -5,15 +5,19 @@ :type="inputType" :autoSize="true" :rows="1" - disabled - class="user-input" + readOnly + :disabled="disabled" + :class="{ + 'input-readonly': !disabled, + 'user-input': showBtn + }" :placeholder="placeholder" :value="checkedValue" @click="selectClick" :title="checkedValue" > - + {{ $t('userSelect.select') }} @@ -56,6 +60,12 @@ export default { type: String, required: false, default: 'text' + }, + // 是否展示按钮 + showBtn: { + type: Boolean, + required: false, + default: true } }, watch: { @@ -73,6 +83,10 @@ export default { }, methods: { selectClick () { + // 禁用后不弹框 + if (this.disabled) { + return + } this.$refs.selectModal.open(this.value) }, selectChange (ids) { @@ -103,7 +117,7 @@ export default { width: calc(100% - 70px); } // 因为需要加title,所以不能把鼠标事件去掉 - /deep/ .ant-input-disabled { + /deep/ .input-readonly.ant-input-disabled { background: #fff; color: rgba(0, 0, 0, 0.65); cursor: default; diff --git a/src/views/personalCenter/taskCareOf/table/BasicLibraryInfo.vue b/src/views/personalCenter/taskCareOf/table/BasicLibraryInfo.vue index adad6b78..094cc51a 100644 --- a/src/views/personalCenter/taskCareOf/table/BasicLibraryInfo.vue +++ b/src/views/personalCenter/taskCareOf/table/BasicLibraryInfo.vue @@ -150,9 +150,10 @@ export default { dataIndex: 'transferUser', customRender: (value, row, index) => { return } } @@ -194,15 +195,15 @@ export default { if (res.success) { this.$message.success(res.message) this.loadData() - this.$forceUpdate() - this.$refs.userSelection.$forceUpdate() } else { this.$message.warning(res.message) } - }).finally(() => { - this.loading = false }) }, + userNameChange (value, fieldName) { + const data = this.dataSource.find(item => item.id === fieldName.split('-')[0]) + data.transferUser_dictText = value + }, // 批量转交 handleTransfer () { if (this.selectedRowKeys.length <= 0) { diff --git a/src/views/personalCenter/taskCareOf/table/ProcessInfo.vue b/src/views/personalCenter/taskCareOf/table/ProcessInfo.vue index 452ca38d..10fc5251 100644 --- a/src/views/personalCenter/taskCareOf/table/ProcessInfo.vue +++ b/src/views/personalCenter/taskCareOf/table/ProcessInfo.vue @@ -22,6 +22,7 @@ @@ -152,10 +153,11 @@ export default { customRender: (value, row, index) => { if (row.state) { return + nameStr={this.dataSource[index].transferUser_dictText} + filedName={this.dataSource[index].taskId} + onChange={this.transferUserChange} + onNameChange={this.userNameChange} showBtn={false} + disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} /> } else { return this.global.emptyLine } @@ -185,10 +187,12 @@ export default { } else { this.$message.warning(res.message) } - }).finally(() => { - this.loading = false }) }, + userNameChange (value, fieldName) { + const data = this.dataSource.find(item => item.taskId === fieldName) + data.transferUser_dictText = value + }, // 批量转交 handleTransfer () { if (this.selectedRowKeys.length <= 0) { diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue index 6d9db14b..30367083 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/ContactSelectApproverBaseInfo.vue @@ -205,7 +205,7 @@ export default { customRender: (value, row, index) => { return } } diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue index b4af3aaf..1e9d6413 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/EngineerInitBaseInfo.vue @@ -252,7 +252,7 @@ export default { } else { // 不是被驳回的待办,可以设置联络人 return } } diff --git a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/LeaderApproveSentBaseInfo.vue b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/LeaderApproveSentBaseInfo.vue index 1cbe8ffd..cd033f17 100644 --- a/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/LeaderApproveSentBaseInfo.vue +++ b/src/views/workCenter/annualRevisionPlanStandardizationInit/modules/LeaderApproveSentBaseInfo.vue @@ -196,7 +196,7 @@ export default { customRender: (value, row, index) => { return } }