ComponentDetails.ts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. import {HttpClient} from "/@/api/admin/http-client";
  2. export class ComponentDetails<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  3. /**
  4. * No description
  5. *
  6. * @tags data
  7. * @name getBasicInfo
  8. * @summary 获取产品详情基础信息
  9. * @request GET:
  10. * @secure
  11. */
  12. timer = 500
  13. getBasicInfo = (params : string) : any => {
  14. // eslint-disable-next-line no-console
  15. console.log(params)
  16. return new Promise((resolve) => {
  17. setTimeout(() => {
  18. resolve({
  19. basicInfo: [
  20. {
  21. goodsTitle: "部件名称",
  22. goodsValue: "TQC+主板12321312312311231231231231232312312312123"
  23. },
  24. {
  25. goodsTitle: "部件类型",
  26. goodsValue: "计控主板12312312311231231231231232323123112312312312312323231231231123123123123123232"
  27. },
  28. {
  29. goodsTitle: "物料号",
  30. goodsValue: "TOK-20021203"
  31. },
  32. {
  33. goodsTitle: "生产料号",
  34. goodsValue: "SC202307051"
  35. },
  36. {
  37. goodsTitle: "序列号",
  38. goodsValue: "20121221"
  39. },
  40. {
  41. goodsTitle: "软件版本",
  42. goodsValue: ""
  43. },
  44. {
  45. goodsTitle: "厂商名称",
  46. goodsValue: "托肯恒山"
  47. },
  48. {
  49. goodsTitle: "中化密钥状态",
  50. goodsValue: "已绑定"
  51. },
  52. {
  53. goodsTitle: "团标密钥状态",
  54. goodsValue: "已备案"
  55. },
  56. {
  57. goodsTitle: "状态",
  58. goodsValue: "正常"
  59. },
  60. {
  61. goodsTitle: "创建时间",
  62. goodsValue: "2023-07-05"
  63. },
  64. {
  65. goodsTitle: "生产时间",
  66. goodsValue: "2023-07-05"
  67. },
  68. {
  69. goodsTitle: "备注",
  70. goodsValue: ""
  71. },
  72. {
  73. goodsTitle: "检测时间",
  74. goodsValue: "2023-07-06"
  75. },
  76. {
  77. goodsTitle: "检测员",
  78. goodsValue: "生产员"
  79. }
  80. ],
  81. goodsImg: {
  82. imgUrl: "https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg",
  83. title: "哈哈"
  84. }
  85. })
  86. },this.timer)
  87. })
  88. }
  89. /**
  90. * No description
  91. *
  92. * @tags data
  93. * @name getProductionLog
  94. * @summary 获取产品详情生产日志
  95. * @request GET:
  96. * @secure
  97. */
  98. getProductionLog = ( params: string ) : any => {
  99. // eslint-disable-next-line no-console
  100. console.log(params)
  101. return new Promise((resolve) => {
  102. setTimeout(()=> {
  103. resolve([
  104. {
  105. dateOfManufacture:"2023-07-05",
  106. operator:"蒋工1",
  107. workingProcedure:"团标密钥灌注1",
  108. state:true,
  109. productionPictures:"111",
  110. remarks:"222"
  111. },
  112. {
  113. dateOfManufacture:"2023-07-05",
  114. operator:"蒋工2",
  115. workingProcedure:"团标密钥灌注2",
  116. state:true,
  117. productionPictures:"111",
  118. remarks:"222"
  119. },
  120. {
  121. dateOfManufacture:"2023-07-05",
  122. operator:"蒋工3",
  123. workingProcedure:"团标密钥灌3",
  124. state:true,
  125. productionPictures:"2323",
  126. remarks:"333"
  127. }
  128. ])
  129. },this.timer)
  130. })
  131. }
  132. /**
  133. * No description
  134. *
  135. * @tags
  136. * @name getAlarmLog
  137. * @summary 获取产品详情报警日志
  138. * @request GET:
  139. * @secure
  140. */
  141. getAlarmLog = ( params:string ) : any => {
  142. // eslint-disable-next-line no-console
  143. console.log(params)
  144. return new Promise((resolve) => {
  145. setTimeout(()=> {
  146. resolve([
  147. {
  148. alarmDate:"23-07-06 09:14",
  149. eventName:"通讯异常1",
  150. remarks:"",
  151. state:false
  152. },
  153. {
  154. alarmDate:"23-07-06 09:14",
  155. eventName:"通讯异常2",
  156. remarks:"",
  157. state:false
  158. },
  159. {
  160. alarmDate:"23-07-06 09:14",
  161. eventName:"通讯异常3",
  162. remarks:"",
  163. state:false
  164. }
  165. ])
  166. },this.timer)
  167. })
  168. }
  169. }