configs.ts 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. import { useDictionaryStore } from "@/store";
  2. const { dicts } = useDictionaryStore();
  3. export const getTableConfig = (id: string) => {
  4. return {
  5. // 获取工序记录项信息信息
  6. jiluxiang: {
  7. url: `/api/v1/op/operationRecord`,
  8. column: [
  9. {
  10. label: "工序id",
  11. prop: "operationId",
  12. display: false,
  13. hide: true,
  14. value: id,
  15. },
  16. { label: "记录项", prop: "thName" },
  17. {
  18. label: "单位",
  19. prop: "unit",
  20. search: true,
  21. filterable: true,
  22. type: "select",
  23. dataType: "string",
  24. dicData: dicts.danwei_type,
  25. props: { label: "dictLabel", value: "dictValue" },
  26. },
  27. { label: "标准值", prop: "standard" },
  28. { label: "上限值", prop: "upper" },
  29. { label: "下限值", prop: "lower" },
  30. ],
  31. },
  32. //工序物料
  33. wuliaocaiji: {
  34. url: "/api/v1/op/operationItem",
  35. column: [
  36. {
  37. label: "工序id",
  38. prop: "operationId",
  39. display: false,
  40. hide: true,
  41. value: id,
  42. },
  43. {
  44. label: "物料名称",
  45. prop: "itemName",
  46. addDisabled: true,
  47. editDisabled: true,
  48. },
  49. {
  50. label: "物料版本号",
  51. prop: "recordVersion",
  52. addDisabled: true,
  53. editDisabled: true,
  54. },
  55. {
  56. label: "物料编码",
  57. prop: "itemCode",
  58. addDisabled: true,
  59. editDisabled: true,
  60. },
  61. {
  62. label: "物料规格",
  63. prop: "itemModel",
  64. addDisabled: true,
  65. editDisabled: true,
  66. },
  67. { label: "所需数量", prop: "num" },
  68. {
  69. label: "追溯类型",
  70. prop: "traceType",
  71. search: true,
  72. filterable: true,
  73. type: "select",
  74. dataType: "string",
  75. dicData: dicts.trace_type,
  76. props: { label: "dictLabel", value: "dictValue" },
  77. },
  78. {
  79. label: "单位",
  80. prop: "unit",
  81. search: true,
  82. filterable: true,
  83. type: "select",
  84. dataType: "string",
  85. dicData: dicts.danwei_type,
  86. props: { label: "dictLabel", value: "dictValue" },
  87. },
  88. {
  89. label: "是否需要",
  90. prop: "isTrace",
  91. type: "radio", //类型为单选框
  92. dicData: [
  93. {
  94. label: "需采集物料",
  95. value: 1,
  96. },
  97. {
  98. label: "非必须采集物料",
  99. value: 0,
  100. },
  101. ],
  102. value: 1,
  103. rules: [
  104. {
  105. required: true,
  106. message: "是否需要",
  107. trigger: "blur",
  108. },
  109. ],
  110. },
  111. ],
  112. },
  113. dianjian: {
  114. url: `/api/v1/op/operationCheck`,
  115. column: [
  116. {
  117. label: "工序id",
  118. prop: "operationId",
  119. display: false,
  120. hide: true,
  121. value: id,
  122. },
  123. {
  124. label: "点检名称",
  125. prop: "checkName",
  126. addDisabled: true,
  127. editDisabled: true,
  128. },
  129. {
  130. label: "点检编码",
  131. prop: "checkCode",
  132. addDisabled: true,
  133. editDisabled: true,
  134. },
  135. { label: "内容", prop: "content" },
  136. {
  137. label: "单位",
  138. prop: "unit",
  139. search: true,
  140. filterable: true,
  141. type: "select",
  142. dataType: "string",
  143. dicData: dicts.danwei_type,
  144. props: { label: "dictLabel", value: "dictValue" },
  145. },
  146. { label: "标准值", prop: "standard" },
  147. { label: "上限值", prop: "upper" },
  148. { label: "下限值", prop: "lower" },
  149. ],
  150. },
  151. shebeijilu: {
  152. url: "/api/v1/op/operationEquit",
  153. column: [
  154. {
  155. label: "工序id",
  156. prop: "operationId",
  157. display: false,
  158. hide: true,
  159. value: id,
  160. },
  161. { label: "精度要求", prop: "accuracy" },
  162. { label: "所需数量", prop: "num", display: false, hide: true },
  163. {
  164. label: "设备类型",
  165. prop: "equitType",
  166. search: true,
  167. filterable: true,
  168. type: "select",
  169. dataType: "string",
  170. dicData: dicts.device_type,
  171. props: { label: "dictLabel", value: "dictValue" },
  172. },
  173. {
  174. label: "必须采集",
  175. prop: "collection",
  176. type: "radio", //类型为单选框
  177. dicData: [
  178. {
  179. label: "必须",
  180. value: 1,
  181. },
  182. {
  183. label: "非必须",
  184. value: 0,
  185. },
  186. ],
  187. value: 1,
  188. rules: [
  189. {
  190. required: true,
  191. message: "是否必须采集",
  192. trigger: "blur",
  193. },
  194. ],
  195. },
  196. ],
  197. },
  198. ESOP: {
  199. url: "/api/v1/op/esop",
  200. column: [
  201. {
  202. label: "工序id",
  203. prop: "operationId",
  204. display: false,
  205. hide: true,
  206. value: id,
  207. },
  208. { label: "标题", prop: "title", addDisabled: true, editDisabled: true },
  209. {
  210. label: "展示页数",
  211. prop: "showAppointPageNum",
  212. type: "number",
  213. min: 1,
  214. },
  215. {
  216. label: "总页数",
  217. prop: "pageNum",
  218. type: "number",
  219. hide: true,
  220. display: false,
  221. },
  222. {
  223. label: "版本号",
  224. prop: "recordVersion",
  225. type: "number",
  226. addDisabled: true,
  227. editDisabled: true,
  228. rules: [
  229. {
  230. required: true,
  231. message: "版本号",
  232. trigger: "blur",
  233. },
  234. ],
  235. },
  236. {
  237. label: "图纸编码",
  238. prop: "drawingCode",
  239. hide: true,
  240. addDisabled: true,
  241. editDisabled: true,
  242. },
  243. // {
  244. // label: "内容",
  245. // prop: "content",
  246. // hide: true,
  247. // addDisabled: true,
  248. // editDisabled: true,
  249. // },
  250. // {
  251. // label: "排序",
  252. // prop: "sortNum",
  253. // hide: true,
  254. // addDisabled: true,
  255. // editDisabled: true,
  256. // },
  257. {
  258. label: "文件",
  259. prop: "filePath",
  260. span: 24,
  261. type: "img",
  262. slot: true,
  263. viewDisplay: false,
  264. addDisabled: true,
  265. editDisabled: true,
  266. },
  267. ],
  268. },
  269. operationExcel: {
  270. url: "/api/v1/opExcelForm",
  271. column: [
  272. {
  273. label: "工序id",
  274. prop: "operationId",
  275. display: false,
  276. hide: true,
  277. value: id,
  278. },
  279. {
  280. label: "模版名称",
  281. prop: "formName",
  282. addDisabled: true,
  283. editDisabled: true,
  284. },
  285. {
  286. label: "模版类型",
  287. prop: "formType",
  288. addDisabled: true,
  289. editDisabled: true,
  290. dicData: dicts.excel_type,
  291. props: { label: "dictLabel", value: "dictValue" },
  292. },
  293. {
  294. label: "模版数据",
  295. prop: "pageNum",
  296. addDisabled: true,
  297. editDisabled: true,
  298. },
  299. {
  300. label: "修改时间",
  301. prop: "updated",
  302. addDisabled: true,
  303. editDisabled: true,
  304. },
  305. {
  306. label: "操作人",
  307. prop: "updator",
  308. addDisabled: true,
  309. editDisabled: true,
  310. },
  311. ],
  312. },
  313. };
  314. };
  315. // 工艺工序组件路径的组件类别
  316. interface comType {
  317. compentName: string;
  318. compentType: string;
  319. }
  320. export const comTypes: comType[] = [
  321. {
  322. compentName: "记录项",
  323. compentType: "jiluxiang",
  324. },
  325. {
  326. compentName: "物料采集",
  327. compentType: "wuliaocaiji",
  328. },
  329. {
  330. compentName: "ESOP",
  331. compentType: "ESOP",
  332. },
  333. {
  334. compentName: "点检",
  335. compentType: "dianjian",
  336. },
  337. {
  338. compentName: "设备记录",
  339. compentType: "shebeijilu",
  340. },
  341. {
  342. compentName: "紧固",
  343. compentType: "jingu",
  344. },
  345. {
  346. compentName: "调试配对",
  347. compentType: "tiaoshipipei",
  348. },
  349. /*{
  350. compentName: "铭牌绑定",
  351. compentType: "mingpai",
  352. },*/
  353. {
  354. compentName: "多媒体采集",
  355. compentType: "duomeiticaiji",
  356. },
  357. {
  358. compentName: "工序表格",
  359. compentType: "operationExcel",
  360. },
  361. ];