analysisEvent.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <!--
  2. * @Author: your name
  3. * @Date: 2024-05-29 09:13:51
  4. * @LastEditTime: 2024-05-31 10:04:52
  5. * @LastEditors: bogon
  6. * @Description: In User Settings Edit
  7. * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
  8. -->
  9. <template>
  10. <div>
  11. <el-card shadow="always" class="box-card">
  12. <el-form ref="form" :model="form" label-width="80px">
  13. <el-row>
  14. <el-col :span="5">
  15. <el-form-item label="分析类型">
  16. <el-select
  17. v-model="form.region"
  18. placeholder="请选择分析类型"
  19. size="small"
  20. >
  21. <el-option label="类型一" value="shanghai"></el-option>
  22. <el-option label="类型二" value="beijing"></el-option>
  23. </el-select> </el-form-item
  24. ></el-col>
  25. <el-col :span="9">
  26. <el-form-item label="分析时间">
  27. <el-date-picker
  28. size="small"
  29. v-model="value1"
  30. type="daterange"
  31. range-separator="至"
  32. start-placeholder="开始日期"
  33. end-placeholder="结束日期"
  34. >
  35. </el-date-picker> </el-form-item
  36. ></el-col>
  37. <el-col :span="5">
  38. <el-form-item label="滤除月份">
  39. <el-date-picker
  40. width="200"
  41. size="small"
  42. type="dates"
  43. v-model="value4"
  44. placeholder="选择一个或多个日期"
  45. >
  46. </el-date-picker>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="5">
  50. <el-form-item class="searchFrom">
  51. <el-button type="primary" @click="onSubmit" size="small"
  52. >查询</el-button
  53. >
  54. <el-button size="small">重置</el-button>
  55. <i @click="drawer = true" class="el-icon-setting"></i>
  56. </el-form-item>
  57. </el-col>
  58. </el-row>
  59. </el-form>
  60. </el-card>
  61. <el-card shadow="always" class="box-card">
  62. <el-row>
  63. <el-col :span="12"
  64. ><div class="left">
  65. <div>
  66. <span>机组编号:</span>
  67. <el-select v-model="value" placeholder="请选择" size="small">
  68. <el-option
  69. v-for="item in options"
  70. :key="item.value"
  71. :label="item.label"
  72. :value="item.value"
  73. >
  74. </el-option>
  75. </el-select>
  76. </div>
  77. <div>1.额定功率(Rated Power):指发电机组在标准工况下</div>
  78. <div>2.发电机类型(Generator Type):</div>
  79. <div>3.经度(Longitude):</div>
  80. <div>4.维度(Dimensionality):</div>
  81. <div>5.海拔高度(Altitude):</div>
  82. <div>6.并网时间(Grid connection time):</div>
  83. <div>7.是否标杆(Benchmarking or not):</div>
  84. <div>8.地理位置(Location):不同地理位置的气候条件</div>
  85. <div>
  86. 9.供应商信息(Manufacturer
  87. Information):制造商的信誉、技术水平和售后
  88. </div>
  89. <div>
  90. 10.维护需求(Maintenance Requirements):风力发电机组需要定期
  91. </div>
  92. <div>11.预期寿命(Expected Lifetime):风力发电机组的设计寿命</div>
  93. </div>
  94. </el-col>
  95. <el-col :span="12"><div class="right">右</div></el-col>
  96. </el-row>
  97. </el-card>
  98. <el-drawer
  99. title="我是标题"
  100. :visible.sync="drawer"
  101. :direction="direction"
  102. :before-close="handleClose"
  103. >
  104. <div class="drawerLeft">
  105. <div>常用功能设置</div>
  106. <el-checkbox
  107. :indeterminate="isIndeterminate"
  108. v-model="checkAll"
  109. @change="handleCheckAllChange"
  110. >全选</el-checkbox
  111. >
  112. <div style="margin: 15px 0"></div>
  113. <el-checkbox-group
  114. v-model="checkedCities"
  115. @change="handleCheckedCitiesChange"
  116. >
  117. <el-checkbox v-for="city in cities" :label="city" :key="city">{{
  118. city
  119. }}</el-checkbox>
  120. </el-checkbox-group>
  121. </div>
  122. <div class="drawerRight">
  123. <div>已选中功能</div>
  124. </div>
  125. </el-drawer>
  126. </div>
  127. </template>
  128. <script>
  129. import TinymceEditor from "@/components/Tinymce.vue";
  130. export default {
  131. components: {
  132. TinymceEditor,
  133. },
  134. data() {
  135. return {
  136. checkAll: false,
  137. checkedCities: [],
  138. cities: ["上海", "北京", "广州", "深圳"],
  139. isIndeterminate: true,
  140. drawer: false,
  141. direction: "rtl",
  142. value: "",
  143. options: [],
  144. editableTabsValue: "2",
  145. editableTabs: [
  146. {
  147. title: "Tab 1",
  148. name: "1",
  149. content: "Tab 1 content",
  150. },
  151. {
  152. title: "Tab 2",
  153. name: "2",
  154. content: "Tab 2 content",
  155. },
  156. ],
  157. form: {
  158. name: "",
  159. region: "",
  160. date1: "",
  161. date2: "",
  162. delivery: false,
  163. type: [],
  164. resource: "",
  165. desc: "",
  166. },
  167. formData: { content: "<p>Hello, Tinymce!</p>" },
  168. tabIndex: 2,
  169. };
  170. },
  171. methods: {
  172. handleCheckAllChange(val) {
  173. this.checkedCities = val ? cityOptions : [];
  174. this.isIndeterminate = false;
  175. },
  176. handleCheckedCitiesChange(value) {
  177. let checkedCount = value.length;
  178. this.checkAll = checkedCount === this.cities.length;
  179. this.isIndeterminate =
  180. checkedCount > 0 && checkedCount < this.cities.length;
  181. },
  182. handleClose(done) {
  183. this.$confirm("确认关闭?")
  184. .then((_) => {
  185. done();
  186. })
  187. .catch((_) => {});
  188. },
  189. // 鼠标单击的事件
  190. onClick(e, editor) {
  191. console.log("Element clicked");
  192. console.log(e);
  193. console.log(editor);
  194. },
  195. onSubmit() {
  196. console.log("submit!");
  197. },
  198. // 清空内容
  199. clear() {
  200. this.$refs.editor.clear();
  201. },
  202. handleTabsEdit(targetName, action) {
  203. if (action === "add") {
  204. let newTabName = ++this.tabIndex + "";
  205. this.editableTabs.push({
  206. title: "New Tab",
  207. name: newTabName,
  208. content: "New Tab content",
  209. });
  210. this.editableTabsValue = newTabName;
  211. }
  212. if (action === "remove") {
  213. let tabs = this.editableTabs;
  214. let activeName = this.editableTabsValue;
  215. if (activeName === targetName) {
  216. tabs.forEach((tab, index) => {
  217. if (tab.name === targetName) {
  218. let nextTab = tabs[index + 1] || tabs[index - 1];
  219. if (nextTab) {
  220. activeName = nextTab.name;
  221. }
  222. }
  223. });
  224. }
  225. this.editableTabsValue = activeName;
  226. this.editableTabs = tabs.filter((tab) => tab.name !== targetName);
  227. }
  228. },
  229. },
  230. };
  231. </script>
  232. <style scoped lang="scss">
  233. .box-card {
  234. margin: 10px 0;
  235. // box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
  236. width: 100%;
  237. font-size: 14px;
  238. .el-card__body {
  239. width: 100%;
  240. .left {
  241. > div {
  242. line-height: 3;
  243. }
  244. }
  245. }
  246. ::v-deep .searchFrom {
  247. .el-form-item__content {
  248. display: flex !important;
  249. justify-content: space-between !important;
  250. align-items: center !important;
  251. i {
  252. margin-left: 10px;
  253. font-size: 20px;
  254. }
  255. }
  256. }
  257. }
  258. ::v-deep.el-input--small .el-input__inner {
  259. width: 180px !important;
  260. }
  261. .abalysisType {
  262. margin-top: 30px;
  263. }
  264. </style>