first commit
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
const userInfo = {
|
||||
template: `
|
||||
<div class="home-user-info">
|
||||
<el-card shadow="never">
|
||||
<div class="card-title" slot="header">个人信息</div>
|
||||
<div class="info">
|
||||
<div>👨🏫我的姓名:${@shiro.getPrincipalProperty('username')}</div>
|
||||
<div>🆔我的工号:${@shiro.getPrincipalProperty('loginname')}</div>
|
||||
<div>⭕我的性别:${@shiro.getPrincipalProperty('sex')}</div>
|
||||
<div>🟢我的单位:${@shiro.getPrincipalProperty('unit').getName()}</div>
|
||||
<div>🟤我的工会:${@shiro.getPrincipalProperty('union').getUnionname()}</div>
|
||||
<div>📕系统角色:
|
||||
<!--#for(role in @shiro.getPrincipalProperty('roles')){#-->
|
||||
<span style="font-size: 14px;color: #666;">${@role.getName()}</span>
|
||||
<!--#}#-->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="signatureDialogVisible" title="我的签字" width="35%">
|
||||
<!-- <div class="flx">-->
|
||||
<!-- <div v-if="!showSignature" class="p10">-->
|
||||
<!-- <el-image style="width: 100%;border: 1px dashed #000" :src="userSignatureUrl" v-if="userSignatureUrl">-->
|
||||
<!-- <template slot="error">获取签名失败</template>-->
|
||||
<!-- </el-image>-->
|
||||
<!-- <el-empty v-else description="暂无签名"></el-empty>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="flx-center-center" style="flex-direction: column;">-->
|
||||
<!-- <qrcode :options="{ width: 126 }" :value="signatureAddress" class="signature-qrcode"></qrcode>-->
|
||||
<!-- <el-button icon="el-icon-refresh" size="small" type="primary" @click="getUserSignature(true)">刷新</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <el-alert title="扫描二维码可重新签名,手机上签名成功后可点击刷新查看。" type="success"></el-alert>-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
showSignature: false,
|
||||
userSignatureUrl: null,
|
||||
signatureDialogVisible: false,
|
||||
signatureAddress: window.location.origin + "/platform/signature/scanPcCode?origin=user",
|
||||
memberInfoDialogVisible:false
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
openSignature() {
|
||||
this.signatureDialogVisible = true
|
||||
this.getUserSignature()
|
||||
},
|
||||
getUserSignature(isRefresh = false) {
|
||||
$.post("/platform/signature/get").then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (isRefresh) {
|
||||
this.$message.success("刷新成功")
|
||||
} else {
|
||||
if (!res.data.signature) {
|
||||
this.$message.warning("未获取到签字信息")
|
||||
}
|
||||
}
|
||||
this.userSignatureUrl = res.data.signature
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user