|
@@ -2,17 +2,20 @@
|
|
|
<div :loading="loading">
|
|
|
<el-row>
|
|
|
<span>
|
|
|
- <el-col :span="6" class="center-span">
|
|
|
- <el-button v-show="!readonly" type="primary" plain icon="el-icon-plus" size="mini" @click="createPage()">新建页</el-button>
|
|
|
+ <el-col :span="5" class="center-span">
|
|
|
+ <el-button v-show="!readonly" type="primary" plain icon="el-icon-plus" size="mini" @click="createPage()" :loading="loading">新建页</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="readonly?12:6" class="center-span">
|
|
|
- <el-button type="primary" plain icon="el-icon-back" size="mini" @click="previousPage()">上一页</el-button>
|
|
|
+ <el-col :span="readonly?12:5" class="center-span">
|
|
|
+ <el-button type="primary" plain icon="el-icon-back" size="mini" @click="previousPage()" :loading="loading">上一页</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="readonly?12:6" class="center-span">
|
|
|
- <el-button type="primary" plain icon="el-icon-right" size="mini" @click="nextPage()">下一页</el-button>
|
|
|
+ <el-col :span="readonly?12:5" class="center-span">
|
|
|
+ <el-button type="primary" plain icon="el-icon-right" size="mini" @click="nextPage()" :loading="loading">下一页</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="6" class="center-span">
|
|
|
- <el-button v-show="!readonly" type="primary" plain icon="el-icon-check" size="mini" @click="handleApprove()" :loading="loading">提交</el-button>
|
|
|
+ <el-col :span="4" class="center-span">
|
|
|
+ <el-button v-show="!readonly" type="primary" plain icon="el-icon-check" size="mini" @click="handleApprove(0)" :loading="loading">保存</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" class="center-span">
|
|
|
+ <el-button v-show="!readonly" type="primary" plain icon="el-icon-check" size="mini" @click="handleApprove(1)" :loading="loading">提交</el-button>
|
|
|
</el-col>
|
|
|
</span>
|
|
|
</el-row>
|
|
@@ -23,8 +26,8 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-card style="margin: 10px; max-height: calc(100vh - 220px);overflow: auto;">
|
|
|
- <el-form ref="form" :model="extractByHands[pageNum]" label-width="80px">
|
|
|
+ <el-card style="margin: 10px; max-height: calc(100vh - 220px);overflow: auto;" :loading="loading">
|
|
|
+ <el-form ref="form" :model="extractByHands[pageNum]" label-width="80px" >
|
|
|
<div v-for="(entityClass, detailIndex) in extractByHands[pageNum].details" :key="'entityClass'+pageNum+detailIndex" style="margin:5px">
|
|
|
<el-row>{{ entityClass.entityClassName }}</el-row>
|
|
|
<el-row v-for="(entity, index) in entityClass.entityList" :key="'entity'+pageNum+index" style="margin:5px">
|
|
@@ -94,12 +97,18 @@ export default {
|
|
|
getResult(){
|
|
|
this.loading = true
|
|
|
getExtractByHandBySubtaskId(this.subTask.id).then(resp =>{
|
|
|
- this.extractByHands = resp.data
|
|
|
- for(let extractByHand of this.extractByHands) {
|
|
|
- for(let detail of extractByHand.details) {
|
|
|
- detail.entityClassName = this.classMap.get(detail.entityClassId)
|
|
|
+
|
|
|
+ if(resp.data){
|
|
|
+ this.extractByHands = resp.data
|
|
|
+ for(let extractByHand of this.extractByHands) {
|
|
|
+ for(let detail of extractByHand.details) {
|
|
|
+ detail.entityClassName = this.classMap.get(detail.entityClassId)
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.extractByHands[this.pageNum].details = this.getNewDetails();
|
|
|
}
|
|
|
+
|
|
|
this.loading = false
|
|
|
}
|
|
|
)
|
|
@@ -112,11 +121,7 @@ export default {
|
|
|
classMap.set(clazz.id,clazz.name)
|
|
|
}
|
|
|
this.classMap = classMap
|
|
|
- if(this.readonly){
|
|
|
- this.getResult()
|
|
|
- } else {
|
|
|
- this.extractByHands[this.pageNum].details = this.getNewDetails();
|
|
|
- }
|
|
|
+ this.getResult()
|
|
|
})
|
|
|
},
|
|
|
getNewDetails() {
|
|
@@ -139,16 +144,31 @@ export default {
|
|
|
this.showPdfPath = process.env.VUE_APP_BASE_API + resp.data
|
|
|
})
|
|
|
},
|
|
|
- handleApprove() {
|
|
|
+ handleApprove(isApprove) {
|
|
|
this.loading = true
|
|
|
- submitBySubTask(this.extractByHands).then(resp => {
|
|
|
- let message ='提交成功'
|
|
|
- this.$message({
|
|
|
- message,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.loading = false
|
|
|
- this.$emit("closeInfo")
|
|
|
+ submitBySubTask(this.extractByHands, isApprove).then(resp => {
|
|
|
+ if(isApprove){
|
|
|
+ let message ='提交成功'
|
|
|
+ this.$message({
|
|
|
+ message,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.loading = false
|
|
|
+ this.$emit("closeInfo")
|
|
|
+ } else {
|
|
|
+ this.extractByHands=resp.data
|
|
|
+ for(let extractByHand of this.extractByHands) {
|
|
|
+ for(let detail of extractByHand.details) {
|
|
|
+ detail.entityClassName = this.classMap.get(detail.entityClassId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let message ='保存成功'
|
|
|
+ this.$message({
|
|
|
+ message,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
|