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