diff --git a/src/common/lang/businessSupport/zh.js b/src/common/lang/businessSupport/zh.js index d1a74900..82768b65 100644 --- a/src/common/lang/businessSupport/zh.js +++ b/src/common/lang/businessSupport/zh.js @@ -28,7 +28,10 @@ module.exports = { expenseReimbursement: '费用列支', meetingMaterial: '会议资料', pleaseEnterCorrectPhone: '请输入正确格式的电话', - addUpToFourLevels: '该节点无法添加子节点' + addUpToFourLevels: '该节点无法添加子节点', + pleaseUploadGroupInfo: '请上传集团参与情况资料', + pleaseUploadPaymentInfo: '请上传支付信息资料', + pleaseUploadMeeting: '请上传参会记录会议资料' }, // 问答库 questionAnswer: { diff --git a/src/common/lang/standardRegulationLibrary/zh-cn.js b/src/common/lang/standardRegulationLibrary/zh-cn.js index 4976e8c5..0f848244 100644 --- a/src/common/lang/standardRegulationLibrary/zh-cn.js +++ b/src/common/lang/standardRegulationLibrary/zh-cn.js @@ -55,6 +55,8 @@ module.exports = { // 资料中心 profileCenter: { typeOfOwnership: '所属类型', - uploadData: '上传资料' + uploadData: '上传资料', + addAPeer: '新增同级', + newChild: '新增子级' } } diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js index bf756f62..553ad286 100644 --- a/src/common/lang/workCenter/zh.js +++ b/src/common/lang/workCenter/zh.js @@ -174,7 +174,18 @@ module.exports = { updateReason: '修改理由', lookUpdateBeforeContent: '查看修改前内容', proposingDepartment: '提出部门', - introducer: '提出人' + introducer: '提出人', + levelCode: '更改级别代号', + isHasGraph: '有无二维或三维图', + customerConfirmation: '顾客确认(适用军品)', + refreshFileNumber: '刷新文件号(三维)', + inventory: '库存', + workInProgress: '在制品', + spareParts: '备件', + relatedChanges: '关联更改项', + changeTag: '更改标记', + treatmentCount: '处数', + effectiveDate: '生效日期' }, // 企标复审流程 enStandardRecheck: { diff --git a/src/components/FlowChart.vue b/src/components/FlowChart.vue index 1bd3217e..f6259292 100644 --- a/src/components/FlowChart.vue +++ b/src/components/FlowChart.vue @@ -98,7 +98,6 @@ export default { this.isLoadEnd = true const dom = document.getElementById(this.domId) this.observer = new ResizeObserver(this.handleResize) - console.log(this.observer) this.observer.observe(dom, { box: 'border-box' }) }) }, @@ -337,6 +336,7 @@ export default { return } this.graph.changeSize(document.getElementById(this.domId).clientWidth, document.getElementById(this.domId).clientHeight) + this.graph.fitCenter() } }, beforeDestroy () { diff --git a/src/components/ProcessDetailList.vue b/src/components/ProcessDetailList.vue index b656c626..739a33e2 100644 --- a/src/components/ProcessDetailList.vue +++ b/src/components/ProcessDetailList.vue @@ -177,6 +177,7 @@ export default { { title: this.$t('workCenter.processDetail.timeConsuming'), width: 150, + dataIndex: 'timeConsuming', scopedSlots: { customRender: 'timeConsuming' } }, // 审批意见 diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index da250f9e..70dae7d0 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -466,7 +466,7 @@ export default { this.innerDisabledField = this.innerDisabledField.filter(item => item !== 'standard_state') } } - // 起草、征求依据、报批状态时发布日期、实施日期不必填 + // 起草、征求依据、报批、废止状态时发布日期、实施日期不必填 this.handleRequiredByState(val) } }, @@ -715,7 +715,7 @@ export default { let notRequiredStatus = [], fields = [] // 国内和海外的标准状态是同一个数据字典 if (this.flag === StandardSource.DOMESTIC.value || this.flag === StandardSource.OVERSEAS.value) { - notRequiredStatus = [StandardStatus.DRAFT.value, StandardStatus.SEEK_FOR_OPTIONS.value, StandardStatus.EXAMINE.value, StandardStatus.APPROVAL.value] + notRequiredStatus = [StandardStatus.DRAFT.value, StandardStatus.SEEK_FOR_OPTIONS.value, StandardStatus.EXAMINE.value, StandardStatus.APPROVAL.value, StandardStatus.ABOLISH.value] fields = ['release_date', 'implementation_date'] } else { // 处理企标 notRequiredStatus = [EnterpriseStandardStatus.DRAFT.value, EnterpriseStandardStatus.SEEK_FOR_OPTIONS.value, EnterpriseStandardStatus.EXAMINE.value, EnterpriseStandardStatus.APPROVAL.value] diff --git a/src/components/dict/JDictSelectTag.vue b/src/components/dict/JDictSelectTag.vue index eb62fae4..389ed5d9 100644 --- a/src/components/dict/JDictSelectTag.vue +++ b/src/components/dict/JDictSelectTag.vue @@ -17,6 +17,7 @@ :placeholder="placeholder" :disabled="disabled" :value="getValueSting" + v-bind="$attrs" show-search :filter-option="filterOption" @change="handleInput" diff --git a/src/components/jerobiz/modal/JSelectDepartModal.vue b/src/components/jerobiz/modal/JSelectDepartModal.vue index 3484a353..ae637d5c 100644 --- a/src/components/jerobiz/modal/JSelectDepartModal.vue +++ b/src/components/jerobiz/modal/JSelectDepartModal.vue @@ -100,7 +100,8 @@ export default { treeScreenClass () { return { 'my-dept-select-tree': true, - fullscreen: this.fullscreen + fullscreen: this.fullscreen, + 'radio-class': !this.multi } } }, @@ -131,16 +132,16 @@ export default { // 筛选出只有在选择范围里的数据 filterTreeDataOnlySelectRange (arr) { for (const item of arr) { + console.log('可选范围是否包括', item.departName, this.selectRange.includes(item.key)) + if (!this.selectRange.includes(item.key)) { + item.disabled = true + item.selectable = false + } else { + item.disabled = false + item.selectable = true + } if (item.children && item.children.length > 0) { this.filterTreeDataOnlySelectRange(item.children) - } else { - if (!this.selectRange.includes(item.key)) { - item.disabled = true - item.selectable = false - } else { - item.disabled = false - item.selectable = true - } } } }, @@ -332,4 +333,11 @@ export default { background: #fff; border-radius: 0 0 2px 2px; } + +// 单选 +.radio-class { + /deep/ .ant-tree-checkbox-inner { + border-radius: 8px; + } +} diff --git a/src/components/selection/EnterpriseRecheckPlanSelectionModal.vue b/src/components/selection/EnterpriseRecheckPlanSelectionModal.vue index 98866432..a12fddda 100644 --- a/src/components/selection/EnterpriseRecheckPlanSelectionModal.vue +++ b/src/components/selection/EnterpriseRecheckPlanSelectionModal.vue @@ -15,13 +15,13 @@ - + - + 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/mixins/WorkCenterMixin.js b/src/mixins/WorkCenterMixin.js index 1cd3bfdc..c6ae6272 100644 --- a/src/mixins/WorkCenterMixin.js +++ b/src/mixins/WorkCenterMixin.js @@ -30,9 +30,17 @@ export const WorkCenterMixin = { }) if (!this.$route.query.processInstanceId) { // 说明是在新发起一个节点,初始化发起人员信息 - this.personnelInfoData[0].linkUserIds = Vue.ls.get(USER_INFO).id - this.personnelInfoData[0].linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' - this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' + const firstFieldName = this.personnelInfoData[0].variableName + for (const item of this.personnelInfoData) { + if (item.variableName === firstFieldName) { + item.linkUserIds = Vue.ls.get(USER_INFO).id + item.linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' + item.userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' + } + } + // this.personnelInfoData[0].linkUserIds = Vue.ls.get(USER_INFO).id + // this.personnelInfoData[0].linkUserIds_dictText = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' + // this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')' } if (callback) { callback() diff --git a/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue b/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue index 74a8fa2a..58ffe850 100644 --- a/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue +++ b/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue @@ -109,6 +109,7 @@ import { getCarTypeProjectList } from '@/api/projectLibraryApi.js' // 双向绑定的标准选择器 import StandardSelection from '@/components/selection/StandardSelection' import pick from 'lodash.pick' +import moment from 'moment' export default { name: 'QuizModal', @@ -200,8 +201,7 @@ export default { this.visible = true this.form.resetFields() const param = {} - param.quizTime = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDay() + ' ' + - new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds() + param.quizTime = moment().format('YYYY-MM-DD HH:mm:ss') this.$nextTick(() => { this.form.setFieldsValue(pick(param, 'quizTime')) }) diff --git a/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue index 98a1308d..96a1c202 100644 --- a/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue +++ b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue @@ -2,7 +2,7 @@
{{ model.title }}
- {{ $t('businessSupport.questionAnswer.poster') + ':' + model.orgCode_dictText + ' ' + model.userId_dictText }} + {{ $t('businessSupport.questionAnswer.poster') + ':' + (model.orgCode_dictText || '') + ' ' + (model.userId_dictText || '') }}
@@ -56,7 +56,7 @@ @@ -88,7 +88,7 @@
-

{{ currentUser.realname }}({{ currentUser.username }}) {{ currentUser.departIds_dicText }}

+

{{ currentUser.departIds_dicText || '' }} {{ currentUser.realname }}({{ currentUser.username }})

{{ $t('businessSupport.questionAnswer.answerQuestion') }}

@@ -124,6 +124,7 @@ import { getFileInfo } from '@/api/api' import { previewPdf } from '@/utils/previewPdf' import InternalDetailPage from '@/components/InternalDetailPage' import { kkFilePreview } from '@/utils/kkFilePreview' +import { isHasPermission } from '@/utils/hasPermission' // 支持预览的文件后缀 const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'] @@ -166,6 +167,7 @@ export default { } }, methods: { + isHasPermission, // 初始化获取数据信息 initData (id) { this.loading = true diff --git a/src/views/businessSupport/standardizationActivity/modules/StandardizationActivityDrawer.vue b/src/views/businessSupport/standardizationActivity/modules/StandardizationActivityDrawer.vue index 489d9a85..b6b0f3c0 100644 --- a/src/views/businessSupport/standardizationActivity/modules/StandardizationActivityDrawer.vue +++ b/src/views/businessSupport/standardizationActivity/modules/StandardizationActivityDrawer.vue @@ -84,18 +84,20 @@
{{ $t('businessSupport.standardizationActivity.groupParticipation') }}
- +
{{ $t('businessSupport.standardizationActivity.paymentInfo') }}
-
{{ $t('businessSupport.standardizationActivity.attendanceRecord') }}
- @@ -103,8 +105,8 @@
- {{ $t('determine') }} {{ $t('cancel') }} + {{ $t('determine') }}
@@ -263,6 +265,12 @@ export default { }) }, handleOk () { + const groupValidateFlag = this.$refs.groupTable.validateTableData() + const paymentValidateFlag = this.$refs.paymentTable.validateTableData() + const meetingValidateFlag = this.$refs.meetingTable.validateTableData() + if (!groupValidateFlag || !paymentValidateFlag || !meetingValidateFlag) { + return + } this.form.validateFields((errors, values) => { if (!errors) { const formData = { @@ -333,4 +341,4 @@ export default { margin-top: 0; } - \ No newline at end of file + diff --git a/src/views/businessSupport/standardizationActivity/tables/GroupTable.vue b/src/views/businessSupport/standardizationActivity/tables/GroupTable.vue index 2454845d..e458b8f8 100644 --- a/src/views/businessSupport/standardizationActivity/tables/GroupTable.vue +++ b/src/views/businessSupport/standardizationActivity/tables/GroupTable.vue @@ -186,6 +186,17 @@ export default { /** 赋值给当前对应的表单文件 */ this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(',')) this.$emit('ok', this.realDataSource) + }, + /** + * 校验文件是否上传 + * @returns {boolean} + */ + validateTableData() { + if (this.realDataSource.some(tt => !tt.feeData)) { + this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadGroupInfo')) + return false + } + return true } } } @@ -197,4 +208,4 @@ export default { .button-text { width: 100%; } - \ No newline at end of file + diff --git a/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue b/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue index 319f8f45..6a1a994e 100644 --- a/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue +++ b/src/views/businessSupport/standardizationActivity/tables/MeetingTable.vue @@ -185,6 +185,17 @@ export default { }, handleTableChange (pagination) { this.ipagination = pagination + }, + /** + * 校验文件是否上传 + * @returns {boolean} + */ + validateTableData() { + if (this.realDataSource.some(tt => !tt.meetingData)) { + this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadMeeting')) + return false + } + return true } } } @@ -197,4 +208,4 @@ export default { width: 100%; } - \ No newline at end of file + diff --git a/src/views/businessSupport/standardizationActivity/tables/PaymentTable.vue b/src/views/businessSupport/standardizationActivity/tables/PaymentTable.vue index 75259241..bb351767 100644 --- a/src/views/businessSupport/standardizationActivity/tables/PaymentTable.vue +++ b/src/views/businessSupport/standardizationActivity/tables/PaymentTable.vue @@ -173,6 +173,17 @@ export default { /** 赋值给当前对应的表单文件 */ this.$set(this.realDataSource[this.uploadTable.index], this.uploadTable.dbFieldName, attIdList.join(',')) this.$emit('ok', this.realDataSource) + }, + /** + * 校验文件是否上传 + * @returns {boolean} + */ + validateTableData() { + if (this.realDataSource.some(tt => !tt.feeData)) { + this.$message.warning(this.$t('businessSupport.standardizationActivity.pleaseUploadPaymentInfo')) + return false + } + return true } } } @@ -185,4 +196,4 @@ export default { width: 100%; } - \ No newline at end of file + diff --git a/src/views/enterpriseStandardLibrary/standard/detail/module/SubmitQuestionModal.vue b/src/views/enterpriseStandardLibrary/standard/detail/module/SubmitQuestionModal.vue index 9990f950..85f02a80 100644 --- a/src/views/enterpriseStandardLibrary/standard/detail/module/SubmitQuestionModal.vue +++ b/src/views/enterpriseStandardLibrary/standard/detail/module/SubmitQuestionModal.vue @@ -73,6 +73,7 @@ import { detailSubmitQuestion } from '@/api/enterpriseStandardLibraryApi' import { getCarTypeProjectList } from '@/api/projectLibraryApi.js' import pick from 'lodash.pick' +import moment from 'moment' export default { name: 'SubmitQuestionModal', @@ -139,8 +140,7 @@ export default { this.visible = true const param = {} param.standardNumber = standardNumber - param.quizTime = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDay() + ' ' + - new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds() + param.quizTime = moment().format('YYYY-MM-DD HH:mm:ss') this.$nextTick(() => { this.form.setFieldsValue(pick(param, 'standardNumber', 'quizTime')) }) diff --git a/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionRecord.vue b/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionRecord.vue index c40da8b8..291123a3 100644 --- a/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionRecord.vue +++ b/src/views/enterpriseStandardLibrary/standard/modules/TemporaryPermissionRecord.vue @@ -79,7 +79,7 @@ @@ -186,6 +186,12 @@ export default { } }) }, + // 解除授权按钮是否不可点击 + isDisabled (record) { + const authExpireDate = new Date(Date.parse(record.authExpireDate)) + const currentDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate() + return new Date(Date.parse(authExpireDate)) < new Date(Date.parse(currentDate)) + }, loadData (arg) { if (!this.url.list) { this.$message.warning('请设置url.list属性!') @@ -254,6 +260,17 @@ export default { close () { this.queryParam = {} this.visible = false + this.ipagination = { + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '30', '50', '100', '150', '200'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip') + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + } } } } diff --git a/src/views/personalCenter/taskCareOf/table/BasicLibraryInfo.vue b/src/views/personalCenter/taskCareOf/table/BasicLibraryInfo.vue index 579577de..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,19 +195,19 @@ 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) { - this.$message.warning(this.$t('selectARecord')) + this.$message.warning(this.$t('selectLeastOne')) } else { this.$refs.userSelectModal.open() } diff --git a/src/views/personalCenter/taskCareOf/table/ProcessInfo.vue b/src/views/personalCenter/taskCareOf/table/ProcessInfo.vue index 4e6def57..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,14 +187,16 @@ 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) { - this.$message.warning(this.$t('selectARecord')) + this.$message.warning(this.$t('selectLeastOne')) } else { this.$refs.userSelectModal.open() } diff --git a/src/views/projectLibrary/inconformityItem/InconformityItemList.vue b/src/views/projectLibrary/inconformityItem/InconformityItemList.vue index bf9fe14f..af357a5c 100644 --- a/src/views/projectLibrary/inconformityItem/InconformityItemList.vue +++ b/src/views/projectLibrary/inconformityItem/InconformityItemList.vue @@ -131,11 +131,21 @@ import InconformityItemModal from './modules/InconformityItemModal' import { batchCloseInconformityItem } from '../../../api/projectLibraryApi' import InconformityItemDetailModal from './modules/InconformityItemDetailModal' import { StandardSource } from '../../../enums/commonEnums' +import { mapGetters } from 'vuex' export default { name: 'InconformityItemList', components: { JTable, InconformityItemModal, InconformityItemDetailModal }, mixins: [JeroListMixin], + computed: { + ...mapGetters(['userInfo']), + // 当前用户是否管理员 + isAdmin () { + const adminRoleList = window._CONFIG.adminRoleCode.split(',') + const userRoleList = this.userInfo.roleCode.split(',') + return userRoleList.some(tt => adminRoleList.includes(tt)) + } + }, data () { return { columns: [ @@ -233,7 +243,11 @@ export default { { text: this.$t('edit'), clickEvent: 'handleEdit', - has: 'inconformityItem:edit' + has: 'inconformityItem:edit', + // 创建人可以维护自己创建的数据,管理员可以维护所有数据 + show: (record) => { + return this.isAdmin || record.engineerId === this.userInfo.id + } } ], disableMixinCreated: true @@ -301,8 +315,8 @@ export default { path, query }) }, - handlePreview ({ id }) { - this.$refs.detailModal.open() + handlePreview (record) { + this.$refs.detailModal.open(record) } } } @@ -311,4 +325,4 @@ export default { \ No newline at end of file + diff --git a/src/views/projectLibrary/inconformityItem/modules/InconformityItemDetailModal.vue b/src/views/projectLibrary/inconformityItem/modules/InconformityItemDetailModal.vue index 1747bd8c..b6326861 100644 --- a/src/views/projectLibrary/inconformityItem/modules/InconformityItemDetailModal.vue +++ b/src/views/projectLibrary/inconformityItem/modules/InconformityItemDetailModal.vue @@ -11,41 +11,42 @@
- {{ detailData.standardNumber }} + {{ detailData.standardNumber || global.emptyLine }}
- {{ detailData.a }} + {{ detailData.standardName || global.emptyLine }}
- {{ detailData.state_dictText }} + {{ detailData.state_dictText || global.emptyLine }}
- {{ detailData.expectedTime }} + {{ detailData.expectedTime || global.emptyLine }}
- {{ detailData.projectName }} + {{ detailData.projectName || global.emptyLine }}
- {{ detailData.engineerName }} + {{ detailData.engineerId_dictText || global.emptyLine }}
- {{ detailData.b }} + {{ detailData.prcNum || global.emptyLine }}
- {{ $t('projectLibrary.noncoincidenceItem.viewNonMatchItemEvaluationResult') }} + + {{ $t('projectLibrary.noncoincidenceItem.viewNonMatchItemEvaluationResult') }}
@@ -56,22 +57,22 @@
- {{ detailData.termNum }} + {{ detailData.termNum || global.emptyLine }}
- {{ detailData.termName }} + {{ detailData.termName || global.emptyLine }}
- {{ detailData.projectName }} + {{ detailData.projectName || global.emptyLine }}
- {{ detailData.engineerName }} + {{ detailData.engineerName || global.emptyLine }}
@@ -79,6 +80,8 @@