diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 2bf1259d2..9de9bc800 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -178,6 +178,7 @@ module.exports = { ButtonsPermissions: 'Buttons / permissions', ConventionalExport:'Conventional export', CustomExport:'Custom export', + CustomTemplateName:'Custom template name', assembly: 'Assembly', route: 'Route', AddSubmenu: 'Add submenu', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index e682a10f4..dd0cdc762 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -180,6 +180,7 @@ module.exports = { ButtonsPermissions: '按钮/权限', ConventionalExport:'常规导出', CustomExport:'自定义导出', + CustomTemplateName:'自定义模板名称', assembly: '组件', route: '路径', AddSubmenu: '添加子菜单', diff --git a/jero-web/src/components/exporthistory/index.vue b/jero-web/src/components/exporthistory/index.vue index 181fb0c2b..1b353803e 100644 --- a/jero-web/src/components/exporthistory/index.vue +++ b/jero-web/src/components/exporthistory/index.vue @@ -202,7 +202,10 @@ export default { this.loadData() }, dowloadfile(item){ - downloadFile('/sys/common/downLoadFile', item.exportFileName, {id:item.exportFileId}) + let query = { + id: item.exportFileId + } + downloadFile('/sys/common/downLoadFile', item.exportFileName, query, this.Deselect) }, loadData() { let _this = this diff --git a/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue b/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue index 9496747a7..800c461b0 100644 --- a/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue +++ b/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue @@ -1,46 +1,38 @@ + @@ -98,6 +71,7 @@ import PersonnelSelection from '@/components/PersonnelSelection/index' import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import uploadFileChange from '@/components/uploadFileChange/file' +import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil' export default { name: 'addModel', @@ -108,13 +82,30 @@ export default { props: ['url'], data() { return { - formInline: {}, + formInline: { + }, confirmLoading: false, + description:false, + dictOptions:[], visible: false, + required:false, + disabled:false, rules: { - templateName:[ - { required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'change' }, - { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' }, + separator:[ + { required: true, message: this.$t('PleaseEnter')+this.$t('MergeSeparator'), trigger: 'change' }, + // { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' }, + ], + certCategory:[ + { required: true, message: this.$t('PleaseEnter')+this.$t('certificationCategory'), trigger: 'change' }, + // { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' }, + ], + combineFlag:[ + { required: true, message: this.$t('PleaseSelect')+this.$t('WhetherMergeParameters'), trigger: 'change' }, + // { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' }, + ], + configIds:[ + { required: true, message: this.$t('PleaseSelect')+this.$t('configure'), trigger: 'change' }, + // { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' }, ], description:[ { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }, @@ -126,7 +117,6 @@ export default { { required: true, message: this.$t('PleaseSelect')+this.$t('attachmentTemplate'), trigger: 'change' }, ], }, - disabled: false, projectNameList: [], title: '' } @@ -170,12 +160,27 @@ export default { this.visible = true this.title = this.$t('CustomExport') this.formInline = {} - this.formInline.state = '0' + this.formInline.separator = ',' this.formInline = {...this.formInline} + this.getConfigure() + this.$nextTick(() => { this.$refs['ruleForm'].clearValidate() }) }, + getConfigure(){ + let pram = { + paramsManifestId: this.$route.query.id + } + getAction('report/detail/getConfigLabelList', pram).then((res) => { + if (res.success) { + console.log(res.result) + this.dictOptions = res.result + } else { + // this.$refs.uploadFile.perentHandleFunc() + } + }) + }, editModel(value) { this.visible = true this.title = '编辑' @@ -185,40 +190,41 @@ export default { }, handleCancel() { this.visible = false + this.$refs.ruleForm.resetFields() + }, + certCategoryName(value){ + getAction('sys/dict/getDictItems/cert_category', { }).then((res) => { + if (res.success) { + let tt = '' + res.result.forEach((item) => { + if(item.value == value){ + tt=item.title + } + }) + this.contentListStart = tt + console.log(this.contentListStart) + } + }) + console.log(value) }, handleSubmit() { - if(this.formInline.paramsTemplateName !== undefined) { - this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim() - } this.$refs.ruleForm.validate(valid => { if (valid) { - let url = '' - let Action - if (this.formInline.id) { - url = this.url.edit - Action = postAction - } else { - url = this.url.add - Action = postAction - } + let url = this.url.ConventionalExport + let Action = getAction let query = JSON.parse(JSON.stringify(this.formInline)) Object.keys(query).forEach(res => { if (query[res] && query[res] instanceof Array) { query[res] = query[res].join(',') } }) + if(this.contentListStart){ + query.certCategoryName = this.contentListStart + } + query.paramsManifestId = this.$route.query.id this.confirmLoading = true - Action(url, query).then((res) => { - if (res.success) { - this.confirmLoading = false - this.$message.success(this.$t('OperationSuccessful')) - this.visible = false - this.$emit('addModelList') - } else { - this.$message.warning(this.$t('operationFailed')) - this.confirmLoading = false - } - }) + downloadFile('report/detail/exportNormal', this.$t('GeneralExportInformation')+'.zip', query) + this.confirmLoading = false } }) },