|
@@ -97,6 +97,12 @@
|
|
|
@action-event="handleActionEvent"
|
|
@action-event="handleActionEvent"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <personal-code
|
|
|
|
|
+ v-if="qrcodeVisible"
|
|
|
|
|
+ :visible.sync="qrcodeVisible"
|
|
|
|
|
+ :content="personalInfo"
|
|
|
|
|
+ @close="visible => (qrcodeVisible = visible)"
|
|
|
|
|
+ />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -109,6 +115,7 @@ import OrgInfo from './org-info'
|
|
|
import PositionInfo from './position-info'
|
|
import PositionInfo from './position-info'
|
|
|
import RoleInfo from './role-info'
|
|
import RoleInfo from './role-info'
|
|
|
import GroupInfo from './group-info'
|
|
import GroupInfo from './group-info'
|
|
|
|
|
+import PersonalCode from './personal-qrcode'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -117,7 +124,8 @@ export default {
|
|
|
OrgInfo,
|
|
OrgInfo,
|
|
|
PositionInfo,
|
|
PositionInfo,
|
|
|
RoleInfo,
|
|
RoleInfo,
|
|
|
- GroupInfo
|
|
|
|
|
|
|
+ GroupInfo,
|
|
|
|
|
+ PersonalCode
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
visible: Boolean,
|
|
visible: Boolean,
|
|
@@ -168,11 +176,19 @@ export default {
|
|
|
jiNengZhiCheng: 'inside'
|
|
jiNengZhiCheng: 'inside'
|
|
|
},
|
|
},
|
|
|
employee: {},
|
|
employee: {},
|
|
|
|
|
+ qrcodeVisible: false,
|
|
|
|
|
+ personalInfo: '',
|
|
|
toolbars: [
|
|
toolbars: [
|
|
|
{
|
|
{
|
|
|
key: 'save',
|
|
key: 'save',
|
|
|
hidden: () => { return this.readonly && this.formType === 'detail' }
|
|
hidden: () => { return this.readonly && this.formType === 'detail' }
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ key: 'qrcode',
|
|
|
|
|
+ icon: 'ibps-icon-qrcode',
|
|
|
|
|
+ label: '个人二维码',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ },
|
|
|
{ key: 'cancel' }
|
|
{ key: 'cancel' }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
@@ -208,6 +224,9 @@ export default {
|
|
|
case 'save':
|
|
case 'save':
|
|
|
this.handleSave()
|
|
this.handleSave()
|
|
|
break
|
|
break
|
|
|
|
|
+ case 'qrcode':
|
|
|
|
|
+ this.handleQRCode()
|
|
|
|
|
+ break
|
|
|
case 'cancel':
|
|
case 'cancel':
|
|
|
this.closeDialog()
|
|
this.closeDialog()
|
|
|
break
|
|
break
|
|
@@ -230,6 +249,19 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ handleQRCode () {
|
|
|
|
|
+ this.personalInfo = JSON.stringify({
|
|
|
|
|
+ id: this.employee.id,
|
|
|
|
|
+ account: this.employee.account,
|
|
|
|
|
+ name: this.employee.name,
|
|
|
|
|
+ mobile: this.employee.mobile,
|
|
|
|
|
+ email: this.employee.email,
|
|
|
|
|
+ gender: this.employee.gender,
|
|
|
|
|
+ dept: this.employee.posItemList.map(i => i.name).join(','),
|
|
|
|
|
+ role: this.employee.roleItemList.map(i => i.name).join(',')
|
|
|
|
|
+ })
|
|
|
|
|
+ this.qrcodeVisible = true
|
|
|
|
|
+ },
|
|
|
checkPhone (value) {
|
|
checkPhone (value) {
|
|
|
const reg = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\d{8}$/
|
|
const reg = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\d{8}$/
|
|
|
if (!reg.test(value)) {
|
|
if (!reg.test(value)) {
|