上报库管理-参数项查看页与后端联调

上报库管理-参数项查看页-常规导出与后端联调
This commit is contained in:
zyx.net
2022-07-04 16:27:58 +08:00
parent c9057a5370
commit e8b98d0d90
9 changed files with 837 additions and 43 deletions
+8
View File
@@ -176,6 +176,8 @@ module.exports = {
MenuType: 'Menu type',
menu: 'Menu',
ButtonsPermissions: 'Buttons / permissions',
ConventionalExport:'Conventional export',
CustomExport:'Custom export',
assembly: 'Assembly',
route: 'Route',
AddSubmenu: 'Add submenu',
@@ -385,6 +387,7 @@ module.exports = {
StandardDetails: 'Standard Details',
whole: 'Whole',
DocumentLibrary: 'Document Library',
GeneralExportInformation:'General export information',
DocumentComparisonLibrary: 'Document comparison Library',
weekly: 'Weekly',
SyncLibrary: 'Sync to doc. library',
@@ -727,6 +730,7 @@ module.exports = {
// 参数收集开始
MaintainConfigureInfo: 'Maintain configuration information',
ParameteItemCollectionList: 'Parameter item collection list',
ParameterViewPage:'Parameter View page',
Areyousureparameteritems: 'Are you sure to submit the selected parameter items?',
Theselectedconfiguration: 'The configuration can only be added when the parameter items in the parameter list are to be collected or changed',
NoConfigurationNotStart: 'No configuration added, unable to start collection, please check',
@@ -792,6 +796,10 @@ module.exports = {
releaseVersion: 'Release Version',
parameterTemplate: 'Parameter Template',
contentDescription: 'Content Description',
WhetherMergeParameters:'Whether to merge parameters',
merge:'merge',
nonjoinder:'nonjoinder',
MergeSeparator:'Merge separator',
parameterTemplateExportName: 'Parameter List',
parameterDataExport: 'Parameter Export Data',
// 参数收集结束
+8
View File
@@ -178,6 +178,8 @@ module.exports = {
MenuType: '菜单类型',
menu: '菜单',
ButtonsPermissions: '按钮/权限',
ConventionalExport:'常规导出',
CustomExport:'自定义导出',
assembly: '组件',
route: '路径',
AddSubmenu: '添加子菜单',
@@ -390,6 +392,7 @@ module.exports = {
StandardDetails: '标准详情',
whole: '全部',
DocumentLibrary: '文档库',
GeneralExportInformation:'常规导出信息',
DocumentComparisonLibrary: '文档对比库',
weekly: '周报',
SyncLibrary: '同步至文档库',
@@ -742,6 +745,7 @@ module.exports = {
// 参数收集
MaintainConfigureInfo: '维护配置信息',
ParameteItemCollectionList: '参数项收集清单',
ParameterViewPage:'参数项查看页',
Areyousureparameteritems: '确认提交所选参数项嘛?',
Theselectedconfiguration: '参数清单中参数项均为待发起收集或变更时才能添加配置',
NoConfigurationNotStart: '未添加任何配置无法开始收集请检查',
@@ -807,6 +811,10 @@ module.exports = {
releaseVersion: '发布版本',
parameterTemplate: '参数模板',
contentDescription: '内容说明',
WhetherMergeParameters:'是否合并参数',
merge:'合并',
nonjoinder:'不合并',
MergeSeparator:'合并分隔符',
parameterTemplateExportName: '参数项列表',
parameterDataExport: '参数项导出数据',
// 参数收集结束
@@ -21,7 +21,7 @@
<a-form-model-item :label="$t('ListTitle')" prop='ListTitle'>
<a-input
:placeholder="$t('PleaseEnter')+$t('ListTitle')"
v-model='formData.projectName' />
v-model='formData.title' />
</a-form-model-item>
</a-col>
<a-col :span='6' style='margin-top: 4px;'>
@@ -178,10 +178,11 @@ export default {
console.log(this.areaTable,'this.areaTable')
this.listVisible = false
},
// 下载文件
editArea(val) {
this.listVisibleRowDate = val
// this.listVisibleRowDate = val
console.log(val)
this.listVisible = true
// this.listVisible = true
},
pageOnChange(page, pageSize) {
this.pageNo = page
@@ -2,7 +2,7 @@
<div>
<a-modal v-model="visible" :maskClosable="false" :footer="[]" :title="title">
<a-upload-dragger
accept='*.*'
:accept="accept"
:disabled="disabled"
class="ant-upload-list"
:class="{'uploadFile':isUploadFile}"
@@ -34,7 +34,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'file',
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile','detailDate'],
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile','detailDate','accept'],
data() {
return {
visible: false,
@@ -64,7 +64,7 @@
@showSizeChange="SizeChange"
/>
</div>
<!-- 复制参数模板-->
<!-- 导出历史模板-->
<a-modal class="show-drawer" :title="titleTag" width="900px" v-model="drawerVisible" :footer="null">
<export-history v-if='drawerVisible' @areaVisible='drawerVisible = false'></export-history>
</a-modal>
@@ -0,0 +1,388 @@
<!--常规导出-->
<template>
<div>
<a-modal
:title="title"
:maskClosable="false"
:width="750"
placement="right"
:closable="true"
@cancel="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text" :title="$t('certificationCategory')">
<span>{{$t('certificationCategory')}}</span>
</div>
<a-form-model-item class="itemModel" prop="certificationCategory">
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'select'"
@input="certCategoryName"
:triggerChange="false" :dictCode="'cert_category'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text" :title="$t('configure')">
<span>{{$t('configure')}}</span>
</div>
<a-form-model-item class="itemModel" prop="configure">
<j-multi-select-tag class="box-input" v-model="formInline.configIds"
:options="dictOptions"
:placeholder="$t('PleaseSelect')+$t('configure')"
:type="'select'"
:triggerChange="false" :dictCode="'cert_category'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('WhetherMergeParameters')">{{$t('WhetherMergeParameters')}}</span>
</div>
<a-form-model-item class="itemModel" prop="combineFlag">
<a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.combineFlag">
<a-radio value="1">
{{$t('nonjoinder')}}
</a-radio>
<a-radio value="2">
{{$t('merge')}}
</a-radio>
</a-radio-group>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if='required'>*</span>
<span class="title-text-text"
:title="$t('MergeSeparator')">{{$t('MergeSeparator')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'description'">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.separator"
:placeholder="$t('PleaseEnter')+$t('MergeSeparator')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-form>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('export')}}</a-button>
</div>
</a-modal>
<uploadFileChange ref="uploadFile" :accept="'.doc,.doxc,.xls,.xlsx'" @uploadSuccess="uploadSuccess"></uploadFileChange>
</div>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFileChange from '@/components/uploadFileChange/file'
export default {
name: 'addModel',
components: {
uploadFileChange,
PersonnelSelection
},
props: ['url'],
data() {
return {
formInline: {
},
confirmLoading: false,
description:false,
dictOptions:[],
visible: false,
required:false,
rules: {
MergeSeparator:[
{ 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' },
],
description:[
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
],
status: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' },
],
fileConnectId: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('attachmentTemplate'), trigger: 'change' },
],
},
disabled: false,
projectNameList: [],
title: ''
}
},
mounted() {
this.getNameList()
},
methods: {
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
this.$refs.uploadFile.visible = false
/** 赋值给当前对应的表单文件 */
this.formInline.fileConnectId = attIdList.join(',')
this.formInline = { ...this.formInline }
},
clickButtonToUpload(item) {
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: this.formInline.fileConnectId }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
flagChange(value){
console.log(value.target.value)
if(value.target.value == 2){
this.required = true
this.description = true
}else{
this.required = false
this.description = false
}
},
getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
},
addModel() {
this.visible = true
this.title = this.$t('ConventionalExport')
this.formInline = {}
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 = '编辑'
this.$nextTick(() => {
this.formInline = value
})
},
handleCancel() {
this.visible = false
},
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() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
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
downloadFile('report/detail/exportNormal', this.$t('GeneralExportInformation')+'.zip', query)
this.confirmLoading = false
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
projectNameChange(value){
console.log(value)
},
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index:100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
/deep/.add-input{
min-height: 135px!important;
}
</style>
<style>
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>
@@ -0,0 +1,358 @@
<template>
<div>
<a-drawer
:title="title"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="templateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.templateName"
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('status')">{{$t('status')}}</span>
</div>
<a-form-model-item class="itemModel" prop="state">
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('status')" v-model='formInline.state'>
<a-select-option :key="'0'" :value="'0'">{{$t('Enable')}}
</a-select-option>
<a-select-option :key="'1'" :value="'1'">{{$t('disable')}}
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
</div>
<a-form-model-item class="itemModel" prop="description">
<a-input class="box-input add-input"
type="textarea"
:disabled="disabled"
v-model="formInline.description"
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="fileConnectId">
<a-button type="primary" class="button-text"
v-model='formInline.fileConnectId'
@click="clickButtonToUpload('fileTemplateConnectId')">
{{ (formInline.fileConnectId === 'null' || formInline.fileConnectId === '' ||
formInline.fileConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-form>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
<uploadFileChange ref="uploadFile" :accept="'.doc,.doxc,.xls,.xlsx'" @uploadSuccess="uploadSuccess"></uploadFileChange>
</div>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFileChange from '@/components/uploadFileChange/file'
export default {
name: 'addModel',
components: {
uploadFileChange,
PersonnelSelection
},
props: ['url'],
data() {
return {
formInline: {},
confirmLoading: false,
visible: 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' },
],
description:[
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
],
status: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' },
],
fileConnectId: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('attachmentTemplate'), trigger: 'change' },
],
},
disabled: false,
projectNameList: [],
title: ''
}
},
mounted() {
this.getNameList()
},
methods: {
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
this.$refs.uploadFile.visible = false
/** 赋值给当前对应的表单文件 */
this.formInline.fileConnectId = attIdList.join(',')
this.formInline = { ...this.formInline }
},
clickButtonToUpload(item) {
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: this.formInline.fileConnectId }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
},
addModel() {
this.visible = true
this.title = this.$t('CustomExport')
this.formInline = {}
this.formInline.state = '0'
this.formInline = {...this.formInline}
this.$nextTick(() => {
this.$refs['ruleForm'].clearValidate()
})
},
editModel(value) {
this.visible = true
this.title = '编辑'
this.$nextTick(() => {
this.formInline = value
})
},
handleCancel() {
this.visible = false
},
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 query = JSON.parse(JSON.stringify(this.formInline))
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
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
}
})
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
projectNameChange(value){
console.log(value)
},
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 100%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index:100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
/deep/.add-input{
min-height: 135px!important;
}
</style>
<style>
.ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>
@@ -4,7 +4,7 @@
<div class="Virtual-detail-header" style="top: 0">
<div class="Virtual-detail-title">
<span>
{{ $t('ParameteItemCollectionList') }}
{{ $t('ParameterViewPage') }}
</span>
</div>
</div>
@@ -12,6 +12,17 @@
<div class='Virtual-detail-content' style='margin-top: 15px'>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" style='margin-left: -90px;'>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('certificationCategory')">
<span>{{$t('certificationCategory')}}</span>
</div>
<j-multi-select-tag class="box-input" v-model="formInline.certCategory"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'select'"
:triggerChange="false" :dictCode="'cert_category'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('NiONumber')">
@@ -30,35 +41,24 @@
v-model="formInline.paramsName"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('certificationCategory')">
<span>{{$t('certificationCategory')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'select'"
:triggerChange="false" :dictCode="'cert_category'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('completedBy')">
<span>{{$t('completedBy')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('completedBy')"
v-model="formInline.dre"></a-input>
<a-input class="box-input" :placeholder="$t('PleaseSelect')+$t('completedBy')"
@input="getcompleteby($event)"
v-model="formInline.completedBy"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('engineeringInterfacePerson')">
<span>{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
@input="getcompleteby($event)"
v-model="formInline.completedBy"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
@@ -71,6 +71,16 @@
</a-form>
</div>
</div>
<div class="table-operator">
<div @click="ConventionalExport" class="operator-text" v-has="'params:template:add'">
<!-- <a-icon type="plus"/>-->
{{$t('ConventionalExport')}}
</div>
<div @click="CustomExport" class="operator-text" v-has="'params:template:delete'">
<!-- <a-icon type="delete"/>-->
{{$t('CustomExport')}}
</div>
</div>
<div>
<a-table
ref="table"
@@ -103,16 +113,24 @@
@showSizeChange="SizeChange"
/>
</div>
<conventionalModel :url="url" ref="conventionalModel"/>
<customelModel :url="url" ref="customelModel"/>
</a-card>
</template>
<script>
import { getAction,postAction } from '../../../api/manage'
import axios from 'axios'
import conventionalModel from './commponts/conventionalmodle'
import customelModel from './commponts/customexportmodle'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
export default {
name: 'managementdetails',
components: {
conventionalModel,
customelModel
},
data(){
return{
columns:[],
@@ -121,7 +139,7 @@ export default {
url: {
tableHeader: 'report/detail/getHeader',
tableList: 'report/detail/list',
// add: 'params/collectManifest/submit',
ConventionalExport: 'report/detail/exportNormal',
// getLoginUserType: 'params/collectManifest/getLoginUserType', // 获取当前登陆人
// getquerySdtList: 'params/collectManifest/querySdtList', // 获取工程接口人的列表
// updateSdt: 'params/collectManifest/updateSdt', // 提交工程接口人
@@ -237,18 +255,22 @@ export default {
}
})
},
getcompleteby(e){
console.log(e)
},
getTableList() {
// console.log('this.searchParmestable',this.searchParmes)
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
let params = {
...this.searchParmes,
...this.formInline,
paramsManifestId: this.$route.query.id,
pageNo: pageNo + '',
pageSize: pageSize + ''
}
// console.log('parmsss',params)
this.loading = true
getAction(this.url.tableList, {paramsManifestId: this.$route.query.id}).then((res) => {
getAction(this.url.tableList, params).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
@@ -281,17 +303,20 @@ export default {
listReset() {
this.formInline = {}
},
handleModule() {
ConventionalExport() {
this.$refs.conventionalModel.addModel()
},
handleCody() {
CustomExport() {
this.$refs.customelModel.addModel()
},
searchQuery() {
this.pageNo = 1
this.$refs.CollectionTabel.getTableList()
this.getTableList()
},
searchReset() {
this.$refs.CollectionTabel.getTableListReset()
this.pageNo = 1
this.formInline = {}
this.getTableList()
},
pageOnChange() {
@@ -49,6 +49,7 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
</div>
@@ -66,11 +67,13 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-form-model-item class="itemModel" prop="fileConnectId">
<a-button type="primary" class="button-text"
v-model='formInline.fileConnectId'
@click="clickButtonToUpload('fileTemplateConnectId')">
{{ (formInline.fileConnectId === 'null' || formInline.fileConnectId === '' ||
formInline.fileConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
@@ -87,7 +90,7 @@
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
<uploadFileChange ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFileChange>
<uploadFileChange ref="uploadFile" :accept="'.doc,.doxc,.xls,.xlsx'" @uploadSuccess="uploadSuccess"></uploadFileChange>
</div>
</template>
@@ -119,6 +122,9 @@ export default {
status: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' },
],
fileConnectId: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('attachmentTemplate'), trigger: 'change' },
],
},
disabled: false,
projectNameList: [],
@@ -143,7 +149,7 @@ export default {
},
clickButtonToUpload(item) {
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
getAction('sys/common/getFileInfos', { id: this.formInline.fileConnectId }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
@@ -190,7 +196,7 @@ export default {
let Action
if (this.formInline.id) {
url = this.url.edit
Action = putAction
Action = postAction
} else {
url = this.url.add
Action = postAction