修改导入的默认显示文件
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
class="upload-text"
|
||||
:multiple="false" :headers="tokenHeader"
|
||||
:action="importUrl+'?cut='+cut"
|
||||
@change="handleImportZip"
|
||||
accept=".zip">
|
||||
@change="handleImport"
|
||||
:accept="accept">
|
||||
<a-icon type="import" :rotate="270"/>
|
||||
{{$t('import')}}
|
||||
</a-upload>
|
||||
@@ -28,7 +28,11 @@
|
||||
isTrue:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
accept:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -47,7 +51,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleImportZip(info) {
|
||||
handleImport(info) {
|
||||
this.spinning = true
|
||||
if (info.file.status !== 'uploading') {
|
||||
console.log(info.file, info.fileList)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="false" :accept="'.zip'"/>
|
||||
</div>
|
||||
<div @click="handleAdd" class="operator-text" v-has="'document:getInfoById'">
|
||||
<a-icon type="plus"/>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
{{$t('DocumentStandard')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'" v-if="isTrue">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
||||
</div>
|
||||
<!-- 模板下载-->
|
||||
<div @click="handleModule" class="operator-text" v-if="isTrue">
|
||||
@@ -304,7 +304,7 @@
|
||||
title: this.$t('correspondingStandard'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'correspondingStandard_dictText'
|
||||
dataIndex: 'correspondingStandardName'
|
||||
},
|
||||
{
|
||||
title: this.$t('zoneOfApplication'),
|
||||
@@ -622,6 +622,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getPersonnelList(){
|
||||
this.getList()
|
||||
},
|
||||
batSettingList() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
</a-tabs>
|
||||
<listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<settingList :url="url" ref="settingListRef"/>
|
||||
<settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -148,7 +148,9 @@
|
||||
queryById: 'project/projectLibraryBase/queryById',
|
||||
add: 'project/projectLibraryBase/add',
|
||||
edit: 'project/projectLibraryBase/edit',
|
||||
queryByProjectId: 'project/projectTaskPlanning/queryByProjectId'
|
||||
queryByProjectId: 'project/projectTaskPlanning/queryByProjectId',
|
||||
addSettingUrl:'project/projectTaskPlanning/add',
|
||||
editSettingUrl:'project/projectTaskPlanning/edit',
|
||||
},
|
||||
regulatoryCertificationTaskPlanList: []
|
||||
}
|
||||
@@ -177,6 +179,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
settingListForm(){
|
||||
this.getSetting()
|
||||
},
|
||||
mainEcharts() {
|
||||
var myChart = echarts.init(document.getElementById('main'))
|
||||
myChart.setOption({
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
||||
</div>
|
||||
<div @click="handleDel" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
@@ -145,6 +145,9 @@
|
||||
},
|
||||
handleDel(){
|
||||
|
||||
},
|
||||
getPersonnelList(){
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div style="float: right;margin-top: 1px" v-if="isDisplay">
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="true" :accept="'.xls'" @getList="getPersonnelList"/>
|
||||
</div>
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="download"/>
|
||||
@@ -701,6 +701,9 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getPersonnelList(){
|
||||
this.getList()
|
||||
},
|
||||
initiateListConfirmationcClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList"/>
|
||||
<ImportFile :url="url" :isTrue="true" :accept="'.xls'" @getList="getPersonnelList"/>
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
@@ -245,7 +245,8 @@
|
||||
url: {
|
||||
list: '/project/projectRelatedPersonnel/list',
|
||||
edit: '/project/projectRelatedPersonnel/edit',
|
||||
exportData: '/project/projectRelatedPersonnel/exportXls'
|
||||
exportData: '/project/projectRelatedPersonnel/exportXls',
|
||||
importZipUrl:'project/projectRelatedPersonnel/importExcel',
|
||||
},
|
||||
selectedRowKeys: []
|
||||
}
|
||||
@@ -331,8 +332,8 @@
|
||||
handleExport() {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let query = {
|
||||
ids: selectedRowKeys.join(','),
|
||||
projectId: this.$route.query.id
|
||||
id: selectedRowKeys.join(','),
|
||||
// projectId: this.$route.query.id
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$t('ListOfRelevantPersonnel') + '.xls', query, this.Deselect)
|
||||
},
|
||||
|
||||
@@ -161,18 +161,16 @@
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...this.formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.setBatch, query).then((res) => {
|
||||
postAction(this.url.editSettingUrl, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
this.$emit('settingListForm')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
@@ -183,12 +181,6 @@
|
||||
this.formInline = {}
|
||||
this.visible = false
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user