<!--
|
* @Descripttion:
|
* @version:
|
* @Author: zt_lc
|
* @Date: 2022-06-08 15:49:37
|
* @LastEditors: zt_lc
|
* @LastEditTime: 2022-08-18 14:07:40
|
-->
|
<template>
|
<el-dialog
|
width="30%"
|
title="打印密码"
|
:visible.sync="innerVisible"
|
append-to-body
|
@close="$emit('update:currshowlist', false)"
|
:show="currshowlist"
|
:close-on-click-modal="false"
|
class="secrest-form-dialog"
|
>
|
<div
|
style="width: 100%;box-sizing: border-box;display:flex;margin-bottom:10px;"
|
>
|
<el-row
|
><el-col :span="6">密码:</el-col
|
><el-col :span="16"><el-input v-model="password"></el-input></el-col
|
></el-row>
|
</div>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="innerVisible = false">取 消</el-button>
|
<el-button type="primary" v-thinclick="`dataFormSubmit`">确 定</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
<style>
|
.secrest-form-dialog .el-dialog__body {
|
padding-bottom: 0px;
|
}
|
|
.secrest-form-dialog .el-dialog__body:after {
|
content: '';
|
clear: both;
|
overflow: hidden;
|
display: block;
|
visibility: hidden;
|
}
|
|
.secrest-form-dialog .el-dialog__body .el-table__header th {
|
padding-top: 0px;
|
}
|
|
.secrest-form-dialog .el-dialog__body .el-table__body-wrapper {
|
height: 260px;
|
overflow-y: auto;
|
}
|
|
.secrest-form-dialog .el-dialog__body .el-table::before {
|
height: 0px;
|
}
|
|
/*
|
字符串过长时,隐藏显示省略号
|
*/
|
.inline-el-hidden {
|
display: block;
|
width: 93%;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
margin: 0 auto;
|
}
|
</style>
|
<script>
|
import { checkPrintNumPassword } from '@/api/certificate/feedercertificate'
|
import { mapGetters } from 'vuex'
|
export default {
|
components: {},
|
props: {
|
currshowlist: {
|
type: Boolean,
|
default: false
|
},
|
formPageType: {
|
type: String
|
}
|
},
|
data() {
|
return {
|
innerVisible: false,
|
password: null
|
}
|
},
|
computed: {
|
...mapGetters(['permissions', 'userInfo'])
|
},
|
methods: {
|
dataFormSubmit() {
|
if (this.formPageType == '1') {
|
this.$emit('goOnPrint', true)
|
} else {
|
this.$emit('goOnListPrint', true)
|
}
|
return
|
if (this.password != null && this.password != '') {
|
checkPrintNumPassword({ password: this.password }).then((response) => {
|
const resData = response.data
|
if (resData.data) {
|
if (this.formPageType == '1') {
|
this.$emit('goOnPrint', true)
|
} else {
|
this.$emit('goOnListPrint', true)
|
}
|
} else {
|
if (this.formPageType == '1') {
|
this.$emit('goOnPrint', false)
|
} else {
|
this.$emit('goOnListPrint', false)
|
}
|
}
|
this.innerVisible = false
|
})
|
} else {
|
this.$message.error('请输入密码')
|
}
|
}
|
},
|
watch: {
|
currshowlist() {
|
this.innerVisible = this.currshowlist
|
if (this.currshowlist) {
|
this.password = null
|
this.$nextTick(() => {})
|
}
|
}
|
}
|
}
|
</script>
|