储能智慧云平台web端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <div>
  3. <div class="title">
  4. 电站管理
  5. <div class="title_time">{{ currentDate }}</div>
  6. </div>
  7. <!-- -->
  8. <el-card>
  9. <div class="selectsite">
  10. <el-button v-if="BUTTONS.powerStationadd" type="primary" size="large" color="#0052d9" @click="newaddition">
  11. 新增
  12. </el-button>
  13. <div class="selectsite_right">
  14. <div class="tabpane_1">电站状态:</div>
  15. <el-select v-model="Singlevalue" placeholder="电站状态" size="large" style="width: 240px" @change="postemsDevice">
  16. <el-option v-for="item in cities" :key="item.id" :label="item.name" :value="item.id" />
  17. </el-select>
  18. &ensp;&ensp;&ensp;
  19. <el-input v-model="stationinput" style="width: 340px" size="large" placeholder="输入电站名称" />
  20. &ensp;&ensp;&ensp;
  21. <!-- newition -->
  22. <el-button type="primary" size="large" color="#0052d9" @click="getstationmanage">查询</el-button>
  23. <el-button size="large" @click="onselectreset">重置</el-button>
  24. </div>
  25. </div>
  26. <el-table :data="tableData.records" style="width: 100%" border>
  27. <el-table-column type="index" prop="date" label="序号" width="60" />
  28. <el-table-column prop="powerName" label="电站名称" width="180" />
  29. <el-table-column prop="stationName" label="安装人" :show-overflow-tooltip="true" />
  30. <el-table-column prop="contactPhone" label="客户电话">
  31. <!-- <template #default="scope">
  32. {{ scope.row.pcsStatus == "" ? "-" : scope.row.pcsStatus }}
  33. </template> -->
  34. </el-table-column>
  35. <el-table-column prop="installedPower" label="装机功率(MW)" />
  36. <el-table-column prop="installedCap" label="装机容量(kWh)" />
  37. <el-table-column prop="country" label="电站地址">
  38. <template #default="scope"> {{ scope.row.address }} </template>
  39. </el-table-column>
  40. <el-table-column prop="operationDate" label="投运时间" />
  41. <el-table-column prop="url" label="电站图片" width="200">
  42. <template #default="scope">
  43. <div class="elimageurl">
  44. <div v-for="(item, index) in scope.row.url" :key="index">
  45. <el-image
  46. style="width: 60px; height: 60px; margin-right: 10px"
  47. :src="item"
  48. :zoom-rate="1.2"
  49. :max-scale="7"
  50. :min-scale="0.2"
  51. :preview-teleported="true"
  52. :preview-src-list="scope.row.url"
  53. :initial-index="index"
  54. fit="cover"
  55. />
  56. </div>
  57. </div>
  58. </template>
  59. </el-table-column>
  60. <el-table-column prop="arrangementurl" label="设备布局图" width="200">
  61. <template #default="scope">
  62. <div class="elimageurl">
  63. <div v-for="(item, index) in scope.row.arrangementurl" :key="index">
  64. <el-image
  65. style="width: 60px; height: 60px; margin-right: 10px"
  66. :src="item"
  67. :zoom-rate="1.2"
  68. :max-scale="7"
  69. :min-scale="0.2"
  70. :preview-teleported="true"
  71. :preview-src-list="scope.row.url"
  72. :initial-index="index"
  73. fit="cover"
  74. />
  75. </div>
  76. </div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="操作" align="center" width="180">
  80. <template #default="scope">
  81. <el-button @click="details(scope.row)">查看</el-button>
  82. <el-button v-if="BUTTONS.powerStationedit" type="primary" color="#0052d9" @click="newition(scope.row)">
  83. 编辑
  84. </el-button>
  85. </template>
  86. </el-table-column>
  87. </el-table>
  88. <div class="example_block">
  89. <!-- 共&ensp;{{ tableData.records.length }}&ensp;<el-pagination
  90. layout="prev, pager, next"
  91. :total="tableData.records.length"
  92. @change="changemultiStationpagebase"
  93. /> -->
  94. <Pagination :pageable="pageable" :handle-size-change="handleSizeChange" :handle-current-change="handleCurrentChange" />
  95. </div>
  96. </el-card>
  97. <el-dialog v-model="dialogVisible" title="查看电站" width="800" :before-close="handleClose">
  98. <div class="dialog">
  99. <div :class="informationtype == 1 ? 'information' : 'more'" @click="nonformation">基础信息</div>
  100. <div :class="informationtype == 2 ? 'information' : 'more'" @click="onmoreinformation">更多信息</div>
  101. </div>
  102. <div v-if="informationtype == 1">
  103. <div class="more_img">
  104. <div class="more_name">电站图片:</div>
  105. <!-- <img class="dialogimg" :src="carditem.absoluteStationPicUrl" alt="" /> -->
  106. <div class="elimageurl">
  107. <div v-for="(item, index) in carditem.url" :key="index">
  108. <el-image
  109. style="width: 120px; height: 120px; margin-right: 10px"
  110. :src="item"
  111. :zoom-rate="1.2"
  112. :max-scale="7"
  113. :min-scale="0.2"
  114. :preview-teleported="true"
  115. :preview-src-list="carditem.url"
  116. :initial-index="index"
  117. fit="cover"
  118. />
  119. </div>
  120. </div>
  121. </div>
  122. <div class="dialog_title">
  123. <div class="more_name">电站名称:</div>
  124. <div class="more_theme">{{ carditem.powerName }}</div>
  125. </div>
  126. <div class="dialog_title">
  127. <div class="more_name">装机功率:</div>
  128. <div class="more_theme">{{ carditem.installedPower }}MW</div>
  129. </div>
  130. <div class="dialog_title">
  131. <div class="more_name">装机容量:</div>
  132. <div class="more_theme">{{ carditem.installedCap }}kWh</div>
  133. </div>
  134. <div class="dialog_title">
  135. <div class="more_name">电站地址:</div>
  136. <div class="more_theme">{{ carditem.province }}</div>
  137. </div>
  138. <div class="dialog_title">
  139. <div class="more_name">投运时间:</div>
  140. <div class="more_theme">{{ carditem.operationDate }}</div>
  141. </div>
  142. <div class="dialog_title">
  143. <div class="more_name">电站联系电话:</div>
  144. <div class="more_theme">-</div>
  145. </div>
  146. </div>
  147. <div v-if="informationtype == 2">
  148. <div class="dialog_title">
  149. <div class="more_name">安装布局图片:</div>
  150. <div class="elimageurl">
  151. <div v-for="(item, index) in carditem.arrangementurl" :key="index">
  152. <el-image
  153. style="width: 120px; height: 120px; margin-right: 10px"
  154. :src="item"
  155. :zoom-rate="1.2"
  156. :max-scale="7"
  157. :min-scale="0.2"
  158. :preview-teleported="true"
  159. :preview-src-list="carditem.arrangementurl"
  160. :initial-index="index"
  161. fit="cover"
  162. />
  163. </div>
  164. </div>
  165. </div>
  166. <div class="dialog_title">
  167. <div class="more_name">并网点信息:</div>
  168. <div class="more_theme">-</div>
  169. </div>
  170. <div class="dialog_title">
  171. <div class="more_name">变压器信息:</div>
  172. <div class="more_theme">-</div>
  173. </div>
  174. <div class="dialog_title">
  175. <div class="more_name">站点变压器容量:</div>
  176. <div class="more_theme">-</div>
  177. </div>
  178. <div class="dialog_title">
  179. <div class="more_name">安装人:</div>
  180. <div class="more_theme">-</div>
  181. </div>
  182. <div class="dialog_title">
  183. <div class="more_name">安装人联系号码:</div>
  184. <div class="more_theme">-</div>
  185. </div>
  186. </div>
  187. <div class="dialog_footer">
  188. <el-button @click="dialogVisible = false" size="large">关闭</el-button>
  189. </div>
  190. </el-dialog>
  191. </div>
  192. </template>
  193. <!-- -->
  194. <script setup lang="ts">
  195. import { onMounted, ref } from "vue";
  196. import { stationmanage } from "@/api/home/Multisite";
  197. import Pagination from "@/components/ProTable/components/Pagination.vue";
  198. import { useRouter } from "vue-router";
  199. import { useAuthButtons } from "@/hooks/useAuthButtons";
  200. const { BUTTONS } = useAuthButtons();
  201. const router = useRouter();
  202. const currentDate = ref();
  203. const Singlevalue = ref("");
  204. const onlineStatus = ref("");
  205. const stationinput = ref("");
  206. const cities = ref([
  207. {
  208. name: "全部",
  209. id: ""
  210. },
  211. {
  212. name: "在线",
  213. id: "0"
  214. },
  215. {
  216. name: "离线",
  217. id: "1"
  218. }
  219. ]);
  220. const tableData = ref();
  221. const getstationmanage = async () => {
  222. let params = {
  223. onlineStatus: onlineStatus.value,
  224. keyword: stationinput.value,
  225. pn: pageable.value.pn,
  226. ps: pageable.value.ps
  227. };
  228. const { data } = await stationmanage(params);
  229. tableData.value = data;
  230. pageable.value.total = tableData.value.total;
  231. };
  232. const postemsDevice = async (value: any) => {
  233. onlineStatus.value = value;
  234. };
  235. const onselectreset = () => {
  236. onlineStatus.value = "";
  237. stationinput.value = "";
  238. pageable.value.pn = 1;
  239. getstationmanage();
  240. };
  241. const pageable = ref({
  242. ps: 10,
  243. pn: 1,
  244. total: 0
  245. });
  246. const handleSizeChange = async (e: any) => {
  247. pageable.value.ps = e;
  248. getstationmanage();
  249. };
  250. const handleCurrentChange = async (e: any) => {
  251. pageable.value.pn = e;
  252. getstationmanage();
  253. };
  254. // const changemultiStationpagebase = async (value: any) => {
  255. // pageSize.value = value;
  256. // getstationmanage();
  257. // };
  258. // 卡片详情对话框
  259. const dialogVisible = ref(false);
  260. const carditem = ref();
  261. const details = (item: any) => {
  262. carditem.value = item;
  263. console.log(carditem);
  264. dialogVisible.value = true;
  265. };
  266. const informationtype = ref(1);
  267. const nonformation = () => {
  268. informationtype.value = 1;
  269. };
  270. const onmoreinformation = () => {
  271. informationtype.value = 2;
  272. };
  273. const handleClose = () => {
  274. dialogVisible.value = false;
  275. };
  276. // 新增
  277. const newaddition = () => {
  278. router.push({
  279. path: "/powerStation/addition",
  280. query: {
  281. type: "电站新增", // 传递的参数
  282. id: null
  283. }
  284. });
  285. };
  286. // 编辑
  287. const newition = (row: any) => {
  288. router.push({
  289. path: "/powerStation/addition",
  290. query: {
  291. type: "电站编辑", // 传递的参数
  292. id: row.powerId
  293. }
  294. });
  295. };
  296. onMounted(() => {
  297. const current = localStorage.getItem("currentDate");
  298. if (current) {
  299. currentDate.value = current;
  300. }
  301. getstationmanage();
  302. });
  303. </script>
  304. <style scoped lang="scss">
  305. @import "./index.scss";
  306. </style>
  307. <!--
  308. --->