softWorks.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. import { downloadFileByUrl } from "@/util/util";
  2. export default {
  3. height: "auto",
  4. calcHeight: 30,
  5. tip: false,
  6. searchShow: true,
  7. searchMenuSpan: 6,
  8. border: true,
  9. index: true,
  10. selection: true,
  11. addBtn: true,
  12. delBtn: true,
  13. labelWidth: 110,
  14. menuWidth: 140,
  15. dialogClickModal: false,
  16. dialogWidth: 520,
  17. dialogType: "drawer",
  18. column: [
  19. {
  20. label: "软件名称",
  21. prop: "rjmc",
  22. span: 24,
  23. minWidth: 160,
  24. search: true,
  25. showOverflowTooltip: true,
  26. rules: [
  27. {
  28. required: true,
  29. message: "请输入软件名称",
  30. trigger: "blur",
  31. },
  32. ],
  33. },
  34. {
  35. label: "软件简称",
  36. prop: "rjjc",
  37. span: 24,
  38. search: true,
  39. width: 120,
  40. align: "center",
  41. showOverflowTooltip: true,
  42. },
  43. {
  44. label: "版本号",
  45. prop: "bbh",
  46. span: 24,
  47. search: true,
  48. width: 80,
  49. align: "center",
  50. showOverflowTooltip: true,
  51. },
  52. {
  53. label: "登记号",
  54. prop: "djh",
  55. span: 24,
  56. width: 100,
  57. search: true,
  58. align: "center",
  59. showOverflowTooltip: true,
  60. },
  61. {
  62. label: "开发完成日期",
  63. prop: "kfwcrq",
  64. type: "date",
  65. valueFormat: 'yyyy-MM-dd',
  66. span: 24,
  67. width: 100,
  68. search: true,
  69. align: "center",
  70. showOverflowTooltip: true,
  71. rules: [
  72. {
  73. required: true,
  74. message: "请选择开发完成时间",
  75. trigger: "blur",
  76. },
  77. ],
  78. },
  79. {
  80. label: "首次发布日期",
  81. prop: "scfbrq",
  82. type: "date",
  83. valueFormat: 'yyyy-MM-dd',
  84. span: 24,
  85. width: 95,
  86. align: "center",
  87. search: true,
  88. showOverflowTooltip: true,
  89. rules: [
  90. {
  91. required: true,
  92. message: "请选择首次发布日期",
  93. trigger: "blur",
  94. },
  95. ],
  96. },
  97. {
  98. label: "登记批准日期",
  99. prop: "djpzrq",
  100. type: "date",
  101. valueFormat: 'yyyy-MM-dd',
  102. align: "center",
  103. span: 24,
  104. width: 95,
  105. search: true,
  106. showOverflowTooltip: true,
  107. },
  108. {
  109. label: "取得方式",
  110. prop: "qdfs",
  111. type: "select",
  112. span: 24,
  113. width: 75,
  114. align: "center",
  115. search: true,
  116. dicUrl: "/api/kd-system/dict/dictionary?code=rjzzqdfs",
  117. props: {
  118. label: "dictValue",
  119. value: "dictKey",
  120. },
  121. showOverflowTooltip: true,
  122. rules: [
  123. {
  124. required: true,
  125. message: "请选择取得方式",
  126. trigger: "change",
  127. },
  128. ],
  129. },
  130. {
  131. label: "关联研发项目情况",
  132. prop: "canyunZhuchi",
  133. align: 'center',
  134. children: [
  135. {
  136. label: "研发项目名称",
  137. prop: 'xmId',
  138. width: 120,
  139. span: 24,
  140. hide: true,
  141. // rules: [
  142. // {
  143. // required: true,
  144. // message: "请选择项目",
  145. // trigger: "blur",
  146. // },
  147. // ],
  148. },
  149. {
  150. label: "研发项目名称",
  151. prop: 'xmmc',
  152. width: 120,
  153. search: true,
  154. showOverflowTooltip: true,
  155. display: false
  156. },
  157. {
  158. label: "研发项目编号",
  159. prop: 'xmbh',
  160. width: 100,
  161. align: 'center',
  162. search: true,
  163. showOverflowTooltip: true,
  164. display: false
  165. },
  166. ],
  167. },
  168. {
  169. label: "附件信息",
  170. prop: "attachment",
  171. minWidth: 200,
  172. type: "upload",
  173. multiple: true,
  174. span: 24,
  175. dataType: "object",
  176. action: '/api/kd-resource/oss/endpoint/put-file',
  177. uploadPreview: (file, column, done) => {
  178. downloadFileByUrl(file.url, file.name);
  179. return;
  180. },
  181. propsHttp: {
  182. url: "link",
  183. name: "originalName",
  184. res: "data",
  185. },
  186. showOverflowTooltip: true,
  187. },
  188. ],
  189. };