translation.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div class="table-box">
  3. <div style="display: flex;flex-direction: column;">
  4. <div style="flex-grow: 1;height: 66vh;overflow-y: auto;overflow-x: hidden">
  5. <el-row :gutter="20">
  6. <el-col :span="10">
  7. <el-table stripe ref="tableRef" :border="true" :data="processTableData" size="small" @selection-change="handleSelectionChange">
  8. <el-table-column type="selection" width="40" align="center"/>
  9. <template v-for="item in columns" :key="item">
  10. <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'">
  11. <template #default="scope">
  12. <template v-if="item.prop === 'operation'">
  13. <el-tooltip
  14. class="box-item"
  15. effect="dark"
  16. content="编辑"
  17. placement="top"
  18. >
  19. <el-button type="primary" link @click="handleUpdate">
  20. <el-icon >
  21. <Edit />
  22. </el-icon>
  23. </el-button>
  24. </el-tooltip>
  25. </template>
  26. </template>
  27. </el-table-column>
  28. </template>
  29. <!-- 无数据 -->
  30. <template #empty>
  31. <div class="table-empty">
  32. <slot name="empty">
  33. <img src="@/assets/images/notData.png" alt="notData" />
  34. <div>暂无数据</div>
  35. </slot>
  36. </div>
  37. </template>
  38. </el-table>
  39. </el-col>
  40. <el-col :span="14">
  41. <div class="disposition-title" style="margin-top: 0px">其它</div>
  42. <div style="display: flex;align-items: center">
  43. <el-checkbox v-model="formInline.intervalSelected" label="风演变时间间隔【>m/s】"/>
  44. <el-input v-model="formInline.interval" style="width: 80px;margin-left: 5px"/>
  45. </div>
  46. <div style="display: flex;align-items: center;margin-top: 10px">
  47. <el-checkbox v-model="formInline.conditionSelected" label="毛发表启用条件【<℃】" />
  48. <el-input v-model="formInline.condition" style="width: 80px;margin-left: 16px"/>
  49. <div style="margin-left: 10px">系数1</div>
  50. <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
  51. <div style="margin-left: 10px">系数2</div>
  52. <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
  53. <div style="margin-left: 10px">系数3</div>
  54. <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
  55. <div style="margin-left: 10px">系数4</div>
  56. <el-input v-model="formInline.condition" style="width: 80px;margin-left: 5px"/>
  57. </div>
  58. <div style="display: flex;align-items: center;margin-top: 10px">
  59. <el-checkbox v-model="formInline.deviationSelected" label="风向传感器指北偏差" />
  60. <el-input v-model="formInline.deviation" style="width: 80px;margin-left: 38px"/>
  61. </div>
  62. <el-row :gutter="20" style="margin-top: 10px">
  63. <el-col :span="12">
  64. <el-checkbox v-model="formInline.intervalSelected" label="雷暴所在方向和去向" />
  65. </el-col>
  66. <el-col :span="12">
  67. <el-checkbox v-model="formInline.intervalSelected" label="积雨云所在方向和去向" />
  68. </el-col>
  69. </el-row>
  70. <el-row :gutter="20" style="margin-top: 10px">
  71. <el-col :span="12">
  72. <el-checkbox v-model="formInline.intervalSelected" label="龙卷所在方向和去向"/>
  73. </el-col>
  74. <el-col :span="12">
  75. <el-checkbox v-model="formInline.intervalSelected" label="不大于300米低云所在的方向和去向"/>
  76. </el-col>
  77. </el-row>
  78. <div class="disposition-title" style="margin-top: 20px">设置干湿表型号</div>
  79. <el-table stripe ref="tableRef" :border="true" :data="processTableData2" style="max-height: 315px" size="small" @selection-change="handleSelectionChange">
  80. <el-table-column type="selection" width="40" align="center"/>
  81. <template v-for="item in columns2" :key="item">
  82. <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'">
  83. <template #default="scope">
  84. <template v-if="item.prop === 'operation'">
  85. <el-tooltip
  86. class="box-item"
  87. effect="dark"
  88. content="编辑"
  89. placement="top"
  90. >
  91. <el-button type="primary" link @click="handleUpdate">
  92. <el-icon >
  93. <Edit />
  94. </el-icon>
  95. </el-button>
  96. </el-tooltip>
  97. </template>
  98. </template>
  99. </el-table-column>
  100. </template>
  101. <!-- 无数据 -->
  102. <template #empty>
  103. <div class="table-empty">
  104. <slot name="empty">
  105. <img src="@/assets/images/notData.png" alt="notData" />
  106. <div>暂无数据</div>
  107. </slot>
  108. </div>
  109. </template>
  110. </el-table>
  111. </el-col>
  112. </el-row>
  113. </div>
  114. <div class="disposition-bottom">
  115. <el-button > 取消 </el-button>
  116. <el-button type="primary" plain> 上一步 </el-button>
  117. <el-button type="primary"> 下一步 </el-button>
  118. </div>
  119. </div>
  120. </div>
  121. </template>
  122. <script setup lang="tsx">
  123. import {reactive, ref} from "vue";
  124. import {ColumnProps} from "@/components/ProTable/interface";
  125. const formRef = ref<any>();
  126. const formInline = ref<any>({
  127. intervalSelected: false,
  128. interval:'',
  129. deviationSelected: false,
  130. deviation:'',
  131. conditionSelected: false,
  132. condition:''
  133. })
  134. const multipleSelection = ref<[]>([])
  135. const handleSelectionChange = (val: []) => {
  136. multipleSelection.value = val
  137. }
  138. const processTableData = ref([
  139. {
  140. a: "风向",
  141. b: "",
  142. c: ""
  143. },
  144. {
  145. a: "风速",
  146. b: "",
  147. c: ""
  148. },
  149. {
  150. a: "温度",
  151. b: "",
  152. c: ""
  153. },
  154. {
  155. a: "湿度",
  156. b: "",
  157. c: ""
  158. },
  159. {
  160. a: "气压",
  161. b: "",
  162. c: ""
  163. },
  164. {
  165. a: "降水",
  166. b: "",
  167. c: ""
  168. },
  169. {
  170. a: "云",
  171. b: "",
  172. c: ""
  173. },{
  174. a: "能见度",
  175. b: "",
  176. c: ""
  177. },
  178. {
  179. a: "天气现象",
  180. b: "",
  181. c: ""
  182. },{
  183. a: "积雪",
  184. b: "",
  185. c: ""
  186. },{
  187. a: "地面温度",
  188. b: "",
  189. c: ""
  190. },{
  191. a: "大气电场",
  192. b: "",
  193. c: ""
  194. },{
  195. a: "闪电",
  196. b: "",
  197. c: ""
  198. },{
  199. a: "日照",
  200. b: "",
  201. c: ""
  202. },{
  203. a: "总辐射",
  204. b: "",
  205. c: ""
  206. },{
  207. a: "光照度",
  208. b: "",
  209. c: ""
  210. }
  211. ]);
  212. // 表格配置项
  213. const columns = reactive<ColumnProps[]>([
  214. { prop: "a", label: "项目",width:200 },
  215. { prop: "b", label: "观测模式",width:150 },
  216. { prop: "c", label: "传感器名称" }
  217. ]);
  218. const processTableData2 = ref([
  219. {
  220. a: "球状干湿表(自然通风速度)",
  221. b: "0.7947",
  222. c: "0.79765"
  223. },
  224. {
  225. a: "通风干湿表(通风速度0.8m/s)",
  226. b: "0.7947",
  227. c: "0.79765"
  228. },
  229. {
  230. a: "通风干湿表(通风速度0.5m/s)",
  231. b: "0.7947",
  232. c: "0.79765"
  233. },
  234. {
  235. a: "球状干湿表(自然通风)*",
  236. b: "0.7947",
  237. c: "0.79765"
  238. },
  239. {
  240. a: "柱状干湿表(自然通风)*",
  241. b: "0.7947",
  242. c: "0.79765"
  243. }
  244. ]);
  245. // 表格配置项
  246. const columns2 = reactive<ColumnProps[]>([
  247. { prop: "a", label: "干湿表型号"},
  248. { prop: "b", label: "未结冰", width:200},
  249. { prop: "c", label: "结冰", width:200 }
  250. ]);
  251. </script>
  252. <style scoped>
  253. .table-box{
  254. height: 100%;
  255. }
  256. </style>