payroll/components/card/index.js

60 lines
1.4 KiB
JavaScript

// components/payroll-manage/index.js
import Dialog from 'tdesign-miniprogram/dialog/index';
Component({
/**
* 组件的属性列表
*/
properties: {
cardName: {
type: String,
value: "",
},
icons: {
type: Array,
value: [],
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
showDialog(e) {
const {value} = e.target.dataset;
let content;
if (value == "oa-shenpi" || value == "zhanghuyue") {
content = "您当前没有操作权限"
}else if(value == "baoxian" || value == "baoxianzhanghu") {
content = "未开通保险账号,请联系您的客户经理"
} else {
content = "功能升级中, 敬请期待"
}
const dialogConfig = {
context: this,
title: '提示',
content: content,
closeBtn: true,
cancelBtn: null,
closeOnOverlayClick: true,
confirmBtn:'确定'
};
Dialog.confirm(dialogConfig)
.then(() => {
console.log('点击确定');
})
.catch(() => {
console.log('点击取消');
});
},
}
})