前端转vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PrintDataLimit.ts 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // 定义 PropertyChangedEventHandler 类型
  2. type PropertyChangedEventHandler = (sender: any, event: { propertyName: string }) => void;
  3. // 模拟 IEntity 接口,由于未提供具体定义,这里留空
  4. interface IEntity {}
  5. // 定义 PrintDataLimit 类
  6. class PrintDataLimit implements IEntity {
  7. // 定义 PropertyChanged 事件
  8. private _propertyChanged?: PropertyChangedEventHandler;
  9. public get PropertyChanged(): PropertyChangedEventHandler | undefined {
  10. return this._propertyChanged;
  11. }
  12. public set PropertyChanged(value: PropertyChangedEventHandler | undefined) {
  13. this._propertyChanged = value;
  14. }
  15. // 表单id
  16. private formid: string = '';
  17. // 表单名称
  18. private formname: string = '';
  19. // 交易号
  20. private tradeno: string = '';
  21. // 表单索引
  22. private formindex: string = '';
  23. // 授权级别
  24. private authlvl: string = '';
  25. // 打印控制标志
  26. private printflag: string = '';
  27. public get Formid(): string {
  28. return this.formid;
  29. }
  30. public set Formid(value: string) {
  31. this.formid = value;
  32. if (this._propertyChanged) {
  33. this._propertyChanged(this, { propertyName: 'Formid' });
  34. }
  35. }
  36. public get Formname(): string {
  37. return this.formname;
  38. }
  39. public set Formname(value: string) {
  40. this.formname = value;
  41. if (this._propertyChanged) {
  42. this._propertyChanged(this, { propertyName: 'Formname' });
  43. }
  44. }
  45. public get Tradeno(): string {
  46. return this.tradeno;
  47. }
  48. public set Tradeno(value: string) {
  49. this.tradeno = value;
  50. if (this._propertyChanged) {
  51. this._propertyChanged(this, { propertyName: 'Tradeno' });
  52. }
  53. }
  54. public get Formindex(): string {
  55. return this.formindex;
  56. }
  57. public set Formindex(value: string) {
  58. this.formindex = value;
  59. if (this._propertyChanged) {
  60. this._propertyChanged(this, { propertyName: 'Formindex' });
  61. }
  62. }
  63. public get Authlvl(): string {
  64. return this.authlvl;
  65. }
  66. public set Authlvl(value: string) {
  67. this.authlvl = value;
  68. if (this._propertyChanged) {
  69. this._propertyChanged(this, { propertyName: 'Authlvl' });
  70. }
  71. }
  72. public get Printflag(): string {
  73. return this.printflag;
  74. }
  75. public set Printflag(value: string) {
  76. this.printflag = value;
  77. if (this._propertyChanged) {
  78. this._propertyChanged(this, { propertyName: 'Printflag' });
  79. }
  80. }
  81. public ChangeFromTable(parms: any[]): void {
  82. this.Formid = parms[0].toString();
  83. this.Formname = parms[1].toString();
  84. this.Tradeno = parms[2].toString();
  85. this.Formindex = parms[3].toString();
  86. this.Authlvl = parms[4].toString();
  87. this.Printflag = parms[5].toString();
  88. }
  89. public ChangeToTable(): string[] {
  90. return [this.Formid, this.Formname, this.Tradeno, this.Formindex, this.Authlvl, this.Printflag];
  91. }
  92. }
  93. export { PrintDataLimit };