workingFace.data.ts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { list, modalList, huifengids, xufengids, getDeviceIds } from './workingFace.api';
  4. export const columns: BasicColumn[] = [
  5. {
  6. title: '系统名称',
  7. dataIndex: 'strname',
  8. width: 120,
  9. },
  10. // {
  11. // title: '系统型号',
  12. // dataIndex: 'strinstallpos',
  13. // width: 100,
  14. // },
  15. {
  16. title: '系统Code',
  17. dataIndex: 'nwindowtype_dictText',
  18. width: 100,
  19. },
  20. {
  21. title: '类型',
  22. dataIndex: 'strtype',
  23. width: 80,
  24. },
  25. {
  26. title: '模型ID',
  27. dataIndex: 'fperheight',
  28. width: 100,
  29. },
  30. {
  31. title: '控制策略',
  32. dataIndex: 'nwindow',
  33. width: 100,
  34. },
  35. {
  36. title: '风向',
  37. width: 150,
  38. dataIndex: 'stationname',
  39. },
  40. ];
  41. export const recycleColumns: BasicColumn[] = [
  42. {
  43. title: '名称',
  44. dataIndex: 'strname',
  45. width: 100,
  46. },
  47. {
  48. title: '是否为常闭型',
  49. dataIndex: 'bnormalclose',
  50. width: 100,
  51. },
  52. ];
  53. export const searchFormSchema: FormSchema[] = [
  54. {
  55. label: '系统名称',
  56. field: 'systemname',
  57. component: 'Input',
  58. colProps: { span: 6 },
  59. },
  60. {
  61. label: '系统类型',
  62. field: 'strtype',
  63. component: 'JDictSelectTag',
  64. colProps: { span: 6 },
  65. componentProps: {
  66. dictCode: 'syskind',
  67. placeholder: '请选择系统型号',
  68. },
  69. },
  70. ];
  71. export const formSchema: FormSchema[] = [
  72. {
  73. label: '',
  74. field: 'id',
  75. component: 'Input',
  76. show: false,
  77. },
  78. {
  79. label: '系统名称',
  80. field: 'systemname',
  81. component: 'Input',
  82. },
  83. {
  84. label: '系统Code',
  85. field: 'code',
  86. component: 'Input',
  87. },
  88. {
  89. label: '系统类型',
  90. field: 'strtype',
  91. component: 'JDictSelectTag',
  92. componentProps: {
  93. dictCode: 'syskind',
  94. placeholder: '请选择系统型号',
  95. },
  96. },
  97. {
  98. label: '模型ID',
  99. field: 'nmodelid',
  100. component: 'ApiSelect',
  101. componentProps: () => {
  102. return {
  103. api: modalList,
  104. resultField: 'records',
  105. labelField: 'strmodelname',
  106. valueField: 'nmodelid',
  107. };
  108. },
  109. },
  110. {
  111. label: '控制策略',
  112. field: 'workmode',
  113. component: 'JDictSelectTag',
  114. componentProps: {
  115. dictCode: 'workmode',
  116. placeholder: '请选择控制策略',
  117. stringToNumber: true,
  118. },
  119. },
  120. {
  121. label: '点表',
  122. field: 'strtype',
  123. component: 'JDictSelectTag',
  124. componentProps: () => {
  125. return {
  126. dictCode: 'syskind',
  127. placeholder: '请选择状态',
  128. };
  129. },
  130. },
  131. {
  132. label: '监测类型',
  133. field: 'monitorflag_dictText',
  134. component: 'JDictSelectTag',
  135. componentProps: {
  136. dictCode: 'monitorflag',
  137. placeholder: '请选择状态',
  138. },
  139. },
  140. {
  141. label: '风向',
  142. field: 'windkind',
  143. component: 'JDictSelectTag',
  144. componentProps: {
  145. dictCode: 'winddir',
  146. placeholder: '请选择风向',
  147. stringToNumber: true,
  148. },
  149. },
  150. {
  151. label: '所属回风系统',
  152. field: 'huifengid',
  153. component: 'ApiSelect',
  154. componentProps: () => {
  155. return {
  156. api: huifengids,
  157. labelField: 'huifengName',
  158. valueField: 'id',
  159. };
  160. },
  161. },
  162. {
  163. label: '关联需风量地点',
  164. field: 'xufengliangid',
  165. component: 'ApiSelect',
  166. componentProps: () => {
  167. return {
  168. api: xufengids,
  169. labelField: 'strmodelname',
  170. valueField: 'nmodelid',
  171. };
  172. },
  173. },
  174. {
  175. label: '模型类型',
  176. field: 'strsystype',
  177. component: 'JDictSelectTag',
  178. componentProps: ({ formModel }) => {
  179. if (formModel['strtype']) {
  180. return {
  181. dictCode: `${formModel['strtype']}_modal`,
  182. placeholder: '请选择模型类型',
  183. };
  184. }
  185. return {
  186. options: [],
  187. };
  188. },
  189. },
  190. {
  191. label: '是否绑定采空区',
  192. field: 'linkEmptyFlag',
  193. component: 'RadioGroup',
  194. defaultValue: 0,
  195. componentProps: ({ formActionType }) => {
  196. return {
  197. options: [
  198. { label: '绑定采空区', value: 1, key: '1' },
  199. { label: '不绑定', value: 0, key: '2' },
  200. ],
  201. onChange: (e: any) => {
  202. const { updateSchema } = formActionType;
  203. updateSchema({
  204. field: 'linkEmpty',
  205. label: '绑定采空区ID',
  206. component: 'ApiSelect',
  207. show: e.target.value == 1 ? true : false,
  208. componentProps: () => {
  209. return {
  210. api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
  211. labelField: 'systemname',
  212. valueField: 'id',
  213. resultField: 'records',
  214. };
  215. },
  216. });
  217. },
  218. };
  219. },
  220. },
  221. {
  222. label: '绑定采空区ID',
  223. field: 'linkEmpty',
  224. component: 'ApiSelect',
  225. show: false,
  226. componentProps: () => {
  227. return {
  228. api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
  229. labelField: 'systemname',
  230. valueField: 'id',
  231. resultField: 'records',
  232. };
  233. },
  234. },
  235. ];