<template>
|
<el-dialog
|
width="40%"
|
title="报工密码框"
|
top="15vh"
|
:visible.sync="innerVisible"
|
append-to-body
|
@close="$emit('update:currshowlist', false)"
|
:show="currshowlist"
|
:close-on-click-modal="false"
|
class="part-dialog"
|
>
|
<div style="margin-bottom:10px;">
|
<span style="color:red;">{{ tipeInfo == null ? '' : tipeInfo }}</span>
|
</div>
|
<div style="display:flex;">
|
<div style="width:50px;line-height:32px;"><span>密码:</span></div>
|
<div>
|
<el-input
|
v-model="password"
|
placeholder="请输入密码"
|
show-password
|
></el-input>
|
</div>
|
</div>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="innerVisible = false">取 消</el-button>
|
<el-button type="primary" @click="confirmData">确定</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
<script>
|
import { checkSubmitPassword } from '@/api/product/personboard'
|
export default {
|
props: {
|
currshowlist: {
|
type: Boolean,
|
default: false
|
},
|
tackingList: {
|
type: Array,
|
default: () => {
|
return []
|
}
|
},
|
tipeInfo: {
|
type: String
|
}
|
},
|
data() {
|
return {
|
innerVisible: false,
|
password: null
|
}
|
},
|
watch: {
|
currshowlist() {
|
this.innerVisible = this.currshowlist
|
this.password = null
|
if (this.currshowlist) {
|
this.$nextTick(() => {})
|
}
|
}
|
},
|
methods: {
|
confirmData() {
|
if (this.password != null) {
|
checkSubmitPassword({ password: this.password }).then((response) => {
|
const resData = response.data
|
if (resData.code === 0) {
|
if (resData.data) {
|
this.$emit('confirmSecret', this.tackingList)
|
this.innerVisible = false
|
} else {
|
this.$message.error('密码错误')
|
}
|
}
|
})
|
} else {
|
this.$message.error('请输入密码')
|
}
|
}
|
}
|
}
|
</script>
|
<style scoped></style>
|