diff --git a/src/api/enterpriseStandardLibraryApi.js b/src/api/enterpriseStandardLibraryApi.js index f2631ff0..9d7c8eae 100644 --- a/src/api/enterpriseStandardLibraryApi.js +++ b/src/api/enterpriseStandardLibraryApi.js @@ -29,6 +29,13 @@ const cancelCollectStandard = (params) => postAction('/personal/lawsStandardColl // 分享企标 const shareStandard = (params) => postAction('/personal/lawsStandardSharing/enterprise/add', params) +// 企标详情-获取更新记录 +const detailGetUpdateRecord = (params) => getAction('', params) +// 企标详情-提交问题 +const detailSubmitQuestion = (params) => postAction('', params) +// 企标详情-企标评价 +const detailEvaluate = (params) => getAction('', params) + // 企标评审会记录-设置优质标准 const setQualityStandard = (params) => getAction('/enterprise/reviewMeeting/setQualityStandards', params) // 获取评分详情 @@ -63,6 +70,10 @@ export { cancelCollectStandard, shareStandard, + detailGetUpdateRecord, + detailSubmitQuestion, + detailEvaluate, + setQualityStandard, getScoreDetail, diff --git a/src/common/lang/enterpriseStandardLibrary/en.js b/src/common/lang/enterpriseStandardLibrary/en.js index 66a64bec..d8493d12 100644 --- a/src/common/lang/enterpriseStandardLibrary/en.js +++ b/src/common/lang/enterpriseStandardLibrary/en.js @@ -1,7 +1,7 @@ // 企标库的所有翻译 module.exports = { // 企业标准 - enterpriseStandard: { + standard: { allocationStandard: 'Allocation Standard', shiftOutStandard: 'Shift Out Standard', initChange: 'Initiate Changes', @@ -18,7 +18,9 @@ module.exports = { updateRecord: '更新记录', submitQuestion: '提交问题', standardResolutionSheet: '标准分解单', - nodeName: '节点名称' + nodeName: '节点名称', + subjectToClause: '依据条款', + standardContentOrRequirements: '标准内容或要求' }, // 评审会记录 reviewMeeting: { diff --git a/src/common/lang/enterpriseStandardLibrary/zh.js b/src/common/lang/enterpriseStandardLibrary/zh.js index 6f25a962..71a2da1f 100644 --- a/src/common/lang/enterpriseStandardLibrary/zh.js +++ b/src/common/lang/enterpriseStandardLibrary/zh.js @@ -18,7 +18,9 @@ module.exports = { updateRecord: '更新记录', submitQuestion: '提交问题', standardResolutionSheet: '标准分解单', - nodeName: '节点名称' + nodeName: '节点名称', + subjectToClause: '依据条款', + standardContentOrRequirements: '标准内容或要求' }, // 评审会记录 reviewMeeting: { diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 4b25e66f..5af351e2 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -352,7 +352,7 @@ export default { isFormInline: false, rules: {}, confirmLoading: false, - type: 'add', + type: 2, dataList: [], ruleList: [], uploadName: '', @@ -363,11 +363,9 @@ export default { add () { this.formInline = Object.assign({}, this.defaultValue) this.$forceUpdate() - this.type = 'add' this.getForm() }, edit (item) { - this.type = 'edit' this.loading = true this.getForm(() => { if (!this.getDocumentInfoFunc || typeof this.getDocumentInfoFunc !== 'function') { diff --git a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue index b368469d..68ef0483 100644 --- a/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue +++ b/src/views/enterpriseStandardLibrary/standard/EnterpriseStandardList.vue @@ -88,8 +88,8 @@ @@ -33,10 +60,11 @@ import '@assets/less/common.less' import AddForm from '@/components/customField/AddForm' import { getEnterpriseStandardAddForm, getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi' import { postAction } from '@/api/manage' +import CheckContentModal from './CheckContentModal' export default { name: 'EnterpriseStandardModal', - components: { AddForm }, + components: { CheckContentModal, AddForm }, data () { return { visible: false, @@ -47,6 +75,29 @@ export default { confirmLoading: false, getFormFunc: getEnterpriseStandardAddForm, getDocumentInfoFunc: getEnterpriseStandardInfoById, + columns: [ + { + title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'), + align: 'center', + width: 180, + dataIndex: 'subjectToClause', + scopedSlots: { customRender: 'text' } + }, + { + title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'), + align: 'center', + width: 180, + dataIndex: 'standardContentOrRequirements', + scopedSlots: { customRender: 'text' } + }, + { + title: this.$t('operation'), + scopedSlots: { customRender: 'action' }, + align: 'center', + width: 200 + } + ], + dataSource: [], url: { add: '/laws/standard/enterprise/commonAdd', edit: '/laws/standard/enterprise/commonEdit' @@ -66,6 +117,32 @@ export default { this.$refs.addForm.edit(record) }) }, + // 稽查内容的添加 + handleAdd () { + this.$refs.checkContentModal.title = this.$t('newlyAdded') + this.$refs.checkContentModal.add() + }, + // 稽查内容的编辑 + handleEdit (record, index) { + console.log(record, index) + this.$refs.checkContentModal.title = this.$t('edit') + this.$refs.checkContentModal.edit(record, index) + }, + // 稽查内容的删除 + handleDelete (index) { + this.dataSource.splice(index, 1) + }, + // 稽查内容新增编辑完成 + checkContentOk (value, index) { + console.log(value, index) + if (index || index === 0) { + // 有下标,说明是编辑 + this.dataSource.splice(index, 1, value) + } else { + // 没有下标, 是新增 + this.dataSource.push(value) + } + }, handleOk () { this.$refs.addForm.submit() }, @@ -104,6 +181,14 @@ export default { } - diff --git a/src/views/personalCenter/myCollection/MyCollection.vue b/src/views/personalCenter/myCollection/MyCollection.vue index 8a2bac7f..ffd87f88 100644 --- a/src/views/personalCenter/myCollection/MyCollection.vue +++ b/src/views/personalCenter/myCollection/MyCollection.vue @@ -28,7 +28,6 @@