commit
This commit is contained in:
@@ -169,6 +169,7 @@
|
||||
></Role-tree>
|
||||
<el-dialog width='400px' :visible.sync="fileMadel" title="上传文件">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
multiple
|
||||
drag
|
||||
:action="fileUrl"
|
||||
@@ -177,6 +178,7 @@
|
||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
|
||||
:before-upload="beginImportFile"
|
||||
:on-success="importFileSuccess"
|
||||
:on-progress="progressFile"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<div style="padding: 20px 0">
|
||||
@@ -184,6 +186,7 @@
|
||||
<p>点击或拖拽上传文件</p>
|
||||
</div>
|
||||
</el-upload>
|
||||
<el-progress style="width: 380px; margin-top: 5px;" v-show="progressType" :percentage="loadProgress"></el-progress>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -198,6 +201,8 @@ export default {
|
||||
name: "bzdyStep1",
|
||||
data() {
|
||||
return {
|
||||
progressType: false,
|
||||
loadProgress: 0,
|
||||
commentText: '',
|
||||
nodeList: [],
|
||||
nodeList2: [],
|
||||
@@ -310,6 +315,10 @@ export default {
|
||||
this.drawerTitle = title
|
||||
this.modalshowflag = true
|
||||
},
|
||||
progressFile (event, file, fileList) {
|
||||
let loadProgress = Math.floor(event.percent)
|
||||
this.loadProgress = loadProgress
|
||||
},
|
||||
// 导入按钮 上传之前的钩子
|
||||
beginImportFile (file) {
|
||||
var filename = file.name
|
||||
@@ -318,11 +327,13 @@ export default {
|
||||
var fileSuffix = filename.substring(index1, index2)
|
||||
// const fileSuffix = file.name.split('.')[1] // 后缀名
|
||||
// 判断上传文件格式
|
||||
this.progressType = true
|
||||
if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx') {
|
||||
return true
|
||||
} else {
|
||||
this.spinShow = false
|
||||
this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS文件')
|
||||
this.progressType = false
|
||||
return false
|
||||
}
|
||||
// 判断文件上传大小
|
||||
@@ -331,6 +342,7 @@ export default {
|
||||
return true
|
||||
} else {
|
||||
this.$message.error('文件' + file.name + '大小不超过200M')
|
||||
this.progressType = false
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@@ -339,6 +351,8 @@ export default {
|
||||
importFileSuccess (response, file) {
|
||||
if (response.ok) {
|
||||
this.fileMadel = false
|
||||
this.loadProgress = 0
|
||||
this.progressType = false
|
||||
this.form.model = response.data.id
|
||||
this.form.modelName = response.data.name
|
||||
this.$message({
|
||||
@@ -412,7 +426,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted () {}
|
||||
mounted () {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -102,12 +102,12 @@
|
||||
width="100"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="itemsTitle"
|
||||
label="条款内容"
|
||||
show-overflow-tooltip
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="itemsTitle"-->
|
||||
<!-- label="条款内容"-->
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- align="center">-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="technicalRequir"
|
||||
width="150"
|
||||
@@ -118,7 +118,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="sarType === 'INLAND'"
|
||||
prop="changePoint"
|
||||
width="150"
|
||||
label="基于上一版本差异"
|
||||
@@ -538,17 +537,17 @@
|
||||
}
|
||||
itemList.forEach(item => {
|
||||
item.unitDeptName = this.$store.getters.userInfo.orgName
|
||||
item.onlineData = ''
|
||||
item.newData = ''
|
||||
item.complianceState = ''
|
||||
item.oldNumber = ''
|
||||
item.complianceRequir = '1'
|
||||
item.changePoint = ''
|
||||
item.technicalRequir = ''
|
||||
item.onlineData = item.onlineData || ''
|
||||
item.newData = item.newData || ''
|
||||
item.complianceState = item.complianceState || ''
|
||||
item.oldNumber = item.oldNumber || ''
|
||||
item.complianceRequir = item.complianceRequir || '1'
|
||||
item.changePoint = item.changePoint || ''
|
||||
item.technicalRequir = item.technicalRequir || ''
|
||||
item.itemsTitle = item.itermsConditions
|
||||
})
|
||||
console.log(2);
|
||||
this.itemList = itemList
|
||||
console.log(this.itemList)
|
||||
this.loading = false
|
||||
}).catch(e => {
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user