parent
a3c1212620
commit
71c2166707
15 changed files with 6729 additions and 921 deletions
After Width: | Height: | Size: 4.6 MiB |
After Width: | Height: | Size: 1.5 MiB |
@ -0,0 +1,32 @@ |
||||
<el-dialog |
||||
style="margin-top:10vh" |
||||
:visible.sync="visible" |
||||
:modal="false" |
||||
width="40%" |
||||
:close-on-click-modal="false" |
||||
:show-close="false" |
||||
custom-class="data-dia"> |
||||
<div slot="title" class="dia-header"> |
||||
<div class="data-title">提交</div> |
||||
</div> |
||||
<div class="popBody" v-if="!authorization&&!success"> |
||||
<h2>本业务需要授权</h2> |
||||
</div> |
||||
<div class="popBody" v-if="authorization&&!success"> |
||||
<el-form ref="form2" :model="disForm" label-width="80px"> |
||||
<el-form-item label="授权柜员"> |
||||
<el-input disabled v-model="disForm.name"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="授权柜员"> |
||||
<el-input type="password" disabled v-model="disForm.pass"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
<div class="popBody" v-if="success"> |
||||
<h2>完成表单form</h2> |
||||
</div> |
||||
<div class="popBtns"> |
||||
<el-button class="close btn" @click="[visible = false,authorization=false,success=false]">取 消</el-button> |
||||
<el-button class="sure btn" type="primary" @click="popSure">确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
@ -0,0 +1,125 @@ |
||||
<template> |
||||
<el-dialog |
||||
style="margin-top:10vh" |
||||
:visible="visible" |
||||
:modal="false" |
||||
width="50%" |
||||
:close-on-click-modal="false" |
||||
:show-close="false" |
||||
custom-class="data-dia"> |
||||
<div slot="title" class="dia-header"> |
||||
<div class="data-title">提交</div> |
||||
</div> |
||||
<div class="popBody" v-if="flow === 1"> |
||||
<h2>本业务需要授权</h2> |
||||
</div> |
||||
<div class="popBody" v-else-if="flow === 2"> |
||||
<el-form ref="form2" :model="disForm" label-width="80px"> |
||||
<el-form-item label="授权柜员"> |
||||
<el-input disabled v-model="disForm.name"></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="授权柜员"> |
||||
<el-input type="password" disabled v-model="disForm.pass"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
<div class="popBody" v-else> |
||||
<el-row :gutter="20"> |
||||
<el-form label-width="100px"> |
||||
<el-col :span="10" :offset="1"> |
||||
<el-form-item v-for="(val, key) in leftObj" :key="key" :label="key + ':'"> |
||||
<div>{{ val? val: '未填写' }}</div> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="10" :offset="1"> |
||||
<el-form-item v-for="(val, key) in rightObj" :key="key" :label="key + ':'"> |
||||
<div>{{ val? val: '未填写' }}</div> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-form> |
||||
</el-row> |
||||
</div> |
||||
<div class="popBtns"> |
||||
<el-button class="close btn" @click="cancelIt">取 消</el-button> |
||||
<el-button class="sure btn" type="primary" @click="sureIt">确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
props: { |
||||
visible: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
showForm: { |
||||
type: Object, |
||||
default: () => ({}) |
||||
} |
||||
}, |
||||
created() { |
||||
console.log('this.showForm') |
||||
console.log(this.showForm) |
||||
console.log('kao?') |
||||
let num = 0; |
||||
for(const key in this.showForm) { |
||||
// if(key === 'birthday') { |
||||
// console.log(Date.format(this.showForm[key])) |
||||
// } |
||||
if(num%2 === 0) { |
||||
this.leftObj[key] = this.showForm[key] |
||||
}else { |
||||
this.rightObj[key] = this.showForm[key] |
||||
} |
||||
num++; |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
flow: 1, |
||||
disForm:{ |
||||
name:'002009', |
||||
pass:'123456' |
||||
}, |
||||
leftObj: {}, |
||||
rightObj: {} |
||||
} |
||||
|
||||
}, |
||||
methods: { |
||||
cancel() { |
||||
this.visible = false; |
||||
}, |
||||
sureIt() { |
||||
console.log(this.flow) |
||||
if(this.flow === 1) { |
||||
this.flow = 2 |
||||
}else if(this.flow === 2) { |
||||
this.flow = 3 |
||||
}else { |
||||
// 调用父函数 |
||||
// 然后关掉 |
||||
this.$emit('submitIt') |
||||
this.cancelIt() |
||||
} |
||||
}, |
||||
cancelIt() { |
||||
this.$emit('update:visible', false) // 那边写 :visible.sync="visible" |
||||
} |
||||
}, |
||||
computed: { |
||||
showItem() { |
||||
return (val, key) => { |
||||
return key + ': ' + val |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
/deep/ .el-row { |
||||
width: 100%; |
||||
} |
||||
</style> |
@ -1,43 +0,0 @@ |
||||
<template> |
||||
<el-dialog |
||||
style="margin-top:10vh" |
||||
:visible.sync="visible" |
||||
:modal="false" |
||||
width="40%" |
||||
:close-on-click-modal="false" |
||||
:show-close="false" |
||||
custom-class="data-dia" |
||||
> |
||||
<div slot="title" class="dia-header"> |
||||
<div class="data-title">提交</div> |
||||
</div> |
||||
<div class="popBody"> |
||||
<h2 v-if='dialogChange'>本业务需要授权</h2> |
||||
</div> |
||||
<div class="popBtns"> |
||||
<el-button class="close btn" @click="visible = false">取 消</el-button> |
||||
<el-button class="sure btn" type="primary" @click="visible = false">确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
props: { |
||||
text: String, |
||||
default: '本业务需要授权' |
||||
}, |
||||
data() { |
||||
visible: false |
||||
}, |
||||
methods: { |
||||
cancel() { |
||||
this.visible = false; |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
|
||||
</style> |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue