widget.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. <template>
  2. <div class="page-panel">
  3. <div class="left-panel">
  4. <mini-map layerControl projectList partsCheck>
  5. <template slot="topBar">
  6. <div @click="viewCurve()">监测查看</div>
  7. <thematic-map></thematic-map>
  8. </template>
  9. </mini-map>
  10. <!-- <transition name="el-zoom-in-bottom">
  11. <moniter-see ref="moniterSee" v-show="moniterVisible" @close="moniterClose()"></moniter-see>
  12. </transition> -->
  13. </div>
  14. <div class="right-panel">
  15. <div class="top-box">
  16. <div class="head-title">分析设置</div>
  17. <el-form ref="form" :model="form" size="small" label-width="100px">
  18. <el-row>
  19. <el-form-item label="工程名称">
  20. <el-select v-model="currentProject" filterable placeholder="选择方案" clearable style="width: 350px" @change="getProjectSchemeById" @clear="clearPlan()">
  21. <el-option v-for="(item, index) in projectScheme" :key="index" :label="item.projectName" :value="item.id">
  22. </el-option>
  23. </el-select>
  24. </el-form-item>
  25. </el-row>
  26. <el-row style="padding: 15px 10px 0 10px; background-color: #f1f2f6">
  27. <el-row>
  28. <el-col :span="12">
  29. <el-form-item label="工程名称">
  30. <el-input v-model="form.projectName" placeholder="工程名称" style="width: 100%"></el-input>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="12">
  34. <el-form-item label="工程改造目标">
  35. <el-input v-model="form.projectRemouldTarget" placeholder="改造目标" style="width: 100%"></el-input>
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <!-- 监测点选择 -->
  40. <el-row style="position: relative" v-for="(item, index) in siteGroups" :key="index">
  41. <el-button v-if="index == siteGroups.length - 1" type="text" class="row-btn" icon="el-icon-circle-plus-outline" @click="addSiteItem()"></el-button>
  42. <el-button v-else type="text" class="row-btn" style="color: #f40" icon="el-icon-remove-outline" @click="romoveSiteItem(index)"></el-button>
  43. <el-col :span="12">
  44. <el-form-item label="监测点">
  45. <el-select v-model="item.site" filterable placeholder="选择站点" value-key="id" clearable style="width: 100%" @change="selectSite(item.site, index)">
  46. <el-option v-for="(site, index) in siteOption" :key="index" :label="site.siteName" :value="site">
  47. </el-option>
  48. </el-select>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="12">
  52. <el-form-item label="监测目标">
  53. <el-select v-model="item.target" filterable placeholder="选择指标" value-key="targetCode" clearable style="width: calc(100% - 217px)" @change="
  54. (val) => {
  55. targetChange(val, index)
  56. }
  57. ">
  58. <el-option v-for="(target, index) in item.targets" :key="index" :label="target.targetName" :value="target">
  59. </el-option>
  60. </el-select>
  61. <el-select v-model="item.symbol" filterable clearable style="width: 100px">
  62. <el-option label="大于" value="大于"></el-option>
  63. <el-option label="小于" value="小于"></el-option>
  64. </el-select>
  65. <el-input v-model="item.value" placeholder="目标值" style="width: 110px">
  66. <span slot="suffix" style="color: #000">{{ item.targetUnit }}</span>
  67. </el-input>
  68. </el-form-item>
  69. </el-col>
  70. </el-row>
  71. <el-row>
  72. <el-col :span="12">
  73. <el-form-item label="改造前计算">
  74. <el-date-picker v-model="form.beforeRemouldDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 100%" value-format="yyyy-MM-dd">
  75. </el-date-picker>
  76. </el-form-item>
  77. </el-col>
  78. <el-col :span="12">
  79. <el-form-item label="改造后计算">
  80. <el-date-picker v-model="form.afterRemouldDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 100%" value-format="yyyy-MM-dd">
  81. </el-date-picker>
  82. </el-form-item>
  83. </el-col>
  84. </el-row>
  85. </el-row>
  86. <el-row style="margin-top: 15px">
  87. <el-button type="primary" @click="saveProject()" size="small" style="float: right; margin-left: 10px">方案保存</el-button>
  88. <el-button type="primary" @click="getRemouldConclusion()" size="small" style="float: right; margin-left: 10px">开始评估</el-button>
  89. <el-button type="warning" @click="clearPlan()" size="small" style="float: left; margin-left: 10px">清 空</el-button>
  90. <el-button type="danger" @click="removePlan()" size="small" style="float: left; margin-left: 10px">删 除</el-button>
  91. </el-row>
  92. </el-form>
  93. </div>
  94. <div class="middle-box">
  95. <div class="head-title">评估结果</div>
  96. <el-table :data="tableData" style="width: 100%" stripe :header-cell-style="{
  97. background: 'rgba(45, 116, 231,0.2)',
  98. color: '#333333',
  99. height: '40px',
  100. textAlign: 'center'
  101. }" max-height="400px">
  102. <template slot="empty">
  103. <img src="@/assets/icon/null.png" alt="暂无数据" style="width: 100px" />
  104. </template>
  105. <el-table-column prop="monitorName" label="站点名称" align="center" show-overflow-tooltip></el-table-column>
  106. <el-table-column prop="waterQualityIndex" label="水质指标" align="center" show-overflow-tooltip></el-table-column>
  107. <el-table-column prop="remouldAfter" label="改造后" align="center"></el-table-column>
  108. <el-table-column prop="remouldBefore" label="改造前" align="center"></el-table-column>
  109. <el-table-column prop="compareRemouldBefore" label="较改造前" align="center">
  110. <template slot-scope="{ row }">
  111. <span style="color: #36c46e">{{ row.compareRemouldBefore }}</span>
  112. </template>
  113. </el-table-column>
  114. <el-table-column prop="remouldAfterTarget" label="改造后目标值" align="center"></el-table-column>
  115. <el-table-column prop="compareTarget" label="较目标值" align="center">
  116. <template slot-scope="{ row }">
  117. <span :style="{ color: row.result == '达标' ? '#36c46e' : '#f33d48' }">
  118. {{ row.result == '达标' ? `+${row.compareTarget}` : row.compareTarget }}
  119. </span>
  120. </template>
  121. </el-table-column>
  122. <el-table-column prop="result" label="结论" align="center">
  123. <template slot-scope="{ row }">
  124. <span :style="{ color: row.result == '达标' ? '#36c46e' : '#f33d48' }">{{ row.result }}</span>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. </div>
  129. <!-- 统计图 -->
  130. <div class="bottom-box" v-for="(val, key, i) in chartsData" :key="i">
  131. <div class="head-title" style="margin-top: 20px; font-weight: 600">{{ key }}</div>
  132. <zb-item v-for="(item, index) in val" :key="index" :data="item"></zb-item>
  133. </div>
  134. <!-- 曲线 -->
  135. <div v-for="(item,index) in curveData" :key="index">
  136. <div class="head-title">{{`${item.type==0?'改造前':'改造后'}:${item.name}`}}</div>
  137. <div class="chart-box" :ref="`chart${item.code}`"></div>
  138. </div>
  139. </div>
  140. <!-- 监测曲线 -->
  141. <historyCurve ref="historyCurve"></historyCurve>
  142. </div>
  143. </template>
  144. <script>
  145. import miniMap from '@/views/widgets/miniMap/index.vue'
  146. import moniterSee from '@/views/spectrum/reform/monitorSee/index.vue'
  147. import thematicMap from '@/views/widgets/thematicMap/index.vue'
  148. import historyCurve from '@/views/spectrum/common/historyCurve/index'
  149. import zbItem from './zbItem/index'
  150. import * as echarts from 'echarts'
  151. import elementResizeDetectorMaker from 'element-resize-detector'
  152. import { getRemouldConclusion } from '@/views/spectrum/reform/api/api'
  153. import { getSites } from '@/views/spectrum/dynamicMonitor/api/api'
  154. import {
  155. getSiteTargets,
  156. getProjectScheme,
  157. saveProjectScheme,
  158. getProjectSchemeById,
  159. deleteProjectSchemeById,
  160. remouldHourCurve
  161. } from '@/views/spectrum/reform/api/api'
  162. import { getRainfallHour } from '@/views/spectrum/dynamicMonitor/api/api'
  163. export default {
  164. components: {
  165. miniMap,
  166. moniterSee,
  167. thematicMap,
  168. historyCurve,
  169. zbItem
  170. },
  171. data() {
  172. return {
  173. siteGroups: [
  174. {
  175. site: null,
  176. targets: [],
  177. target: null,
  178. symbol: null,
  179. value: '',
  180. targetUnit: ''
  181. }
  182. ],
  183. currentProject: null,
  184. projectScheme: [],
  185. form: {},
  186. tableData: [],
  187. siteOption: [],
  188. moniterVisible: false,
  189. // 图表数据
  190. chartsData: [],
  191. curveData: [], // 曲线数据
  192. }
  193. },
  194. mounted() {
  195. this.getProjectScheme()
  196. this.getSites()
  197. // this.getRemouldConclusion()
  198. },
  199. methods: {
  200. /**
  201. * 获取工程项目列表
  202. */
  203. getProjectScheme() {
  204. getProjectScheme().then((res) => {
  205. if (res.code != 1) return
  206. this.projectScheme = res.result
  207. })
  208. },
  209. /**
  210. * 获取站点
  211. */
  212. getSites() {
  213. getSites({ projectId: this.$store.state.project.project.id, size: 1000 }).then((res) => {
  214. if (res.code && res.code == 1) {
  215. this.siteOption = res.result.records
  216. // if (this.siteOption.length > 0) this.$set(this.form, 'siteId', this.siteOption[0].id)
  217. }
  218. })
  219. },
  220. /**
  221. * 改造后评估结果
  222. */
  223. async getRemouldConclusion() {
  224. const data = this.readyParams(0)
  225. if (!data) return
  226. getRemouldConclusion(data).then((res) => {
  227. if (res.code == 1) {
  228. this.tableData = res.result.assessmentConclusions
  229. this.chartsData = res.result.maps
  230. }
  231. })
  232. this.remouldHourCurve()
  233. },
  234. /**
  235. * 添加条件
  236. */
  237. addSiteItem() {
  238. this.siteGroups.push({
  239. site: null,
  240. targets: [],
  241. target: null,
  242. symbol: null,
  243. value: '',
  244. targetUnit: ''
  245. })
  246. },
  247. /**
  248. * 移除条件
  249. */
  250. romoveSiteItem(index) {
  251. this.siteGroups.splice(index, 1)
  252. },
  253. /**
  254. * 站点选择
  255. */
  256. selectSite(site, index) {
  257. if (!site) {
  258. this.$set(this.siteGroups[index], 'target', null)
  259. this.$set(this.siteGroups[index], 'targetUnit', null)
  260. return
  261. }
  262. getSiteTargets({ siteIds: `${site.id}` }).then((res) => {
  263. if (res.code != 1 || res.result.length == 0) return
  264. this.siteGroups[index].targets = res.result
  265. this.siteGroups[index].target
  266. this.$set(this.siteGroups[index], 'target', res.result[0])
  267. this.$set(this.siteGroups[index], 'targetUnit', res.result[0].targetUnit)
  268. })
  269. },
  270. /**
  271. * 选择指标
  272. */
  273. targetChange(val, index) {
  274. if (!val) this.$set(this.siteGroups[index], 'targetUnit', null)
  275. this.$set(this.siteGroups[index], 'targetUnit', val.targetUnit)
  276. },
  277. /**
  278. * 确定方案参数
  279. * type => 0:评估参数 1:保存方案参数
  280. */
  281. readyParams(type) {
  282. const { projectName, projectRemouldTarget, beforeRemouldDate, afterRemouldDate, id } = this.form
  283. const monitorScheme = this.siteGroups.map((item) => {
  284. return {
  285. monitorId: (item.site && item.site.id) || '',
  286. monitorType: (item.target && item.target.targetCode) || '',
  287. projectSchemeId: item.projectSchemeId || undefined,
  288. id: item.id || undefined,
  289. symbol: item.symbol || '',
  290. targetValue: item.value || '',
  291. unit: item.targetUnit || ''
  292. }
  293. })
  294. if (!projectName) {
  295. this.$message.warning('请输入方案名称!')
  296. return false
  297. }
  298. if (!projectRemouldTarget) {
  299. this.$message.warning('请输入方案目标!')
  300. return false
  301. }
  302. if (type == 0 && (!beforeRemouldDate || beforeRemouldDate.length == 0)) {
  303. this.$message.warning('请输入改造前计算时间!')
  304. return false
  305. }
  306. if (type == 0 && (!afterRemouldDate || afterRemouldDate.length == 0)) {
  307. this.$message.warning('请输入改造后计算时间!')
  308. return false
  309. }
  310. const data = {
  311. monitorScheme: monitorScheme,
  312. projectScheme: {
  313. afterRemouldEndDate:
  314. afterRemouldDate && afterRemouldDate.length == 2
  315. ? this.$moment(afterRemouldDate[1]).format('YYYY-MM-DD 23:59:59')
  316. : '',
  317. afterRemouldStartDate:
  318. afterRemouldDate && afterRemouldDate.length == 2
  319. ? this.$moment(afterRemouldDate[0]).format('YYYY-MM-DD 00:00:00')
  320. : '',
  321. beforeRemouldEndDate:
  322. beforeRemouldDate && beforeRemouldDate.length == 2
  323. ? this.$moment(beforeRemouldDate[1]).format('YYYY-MM-DD 23:59:59')
  324. : '',
  325. beforeRemouldStartDate:
  326. beforeRemouldDate && beforeRemouldDate.length == 2
  327. ? this.$moment(beforeRemouldDate[0]).format('YYYY-MM-DD 00:00:00')
  328. : '',
  329. projectName: projectName || '',
  330. projectRemouldTarget: projectRemouldTarget || '',
  331. id: id || undefined
  332. }
  333. }
  334. return data
  335. },
  336. /**
  337. * 保存方案
  338. */
  339. saveProject() {
  340. const data = this.readyParams(1)
  341. if (!data) return
  342. saveProjectScheme(data).then((res) => {
  343. if (res.code != 1) return
  344. this.$message.success('保存方案成功')
  345. this.getProjectScheme()
  346. })
  347. },
  348. /**
  349. * 通过id获取方案
  350. */
  351. getProjectSchemeById(id) {
  352. this.tableData = this.$options.data().tableData
  353. this.chartsData = this.$options.data().chartsData
  354. if (!id) return
  355. getProjectSchemeById(id).then(async (res) => {
  356. if (res.code != 1) return
  357. const { monitorScheme, projectScheme } = res.result
  358. // 方案
  359. this.$set(this.form, 'projectName', projectScheme.projectName)
  360. this.$set(this.form, 'projectRemouldTarget', projectScheme.projectRemouldTarget)
  361. this.$set(this.form, 'id', projectScheme.id)
  362. // 方案站点指标
  363. let siteGroups = []
  364. if (monitorScheme) {
  365. for (let index = 0; index < monitorScheme.length; index++) {
  366. const item = monitorScheme[index]
  367. const { result: targets } = await getSiteTargets({ siteIds: `${item.monitorId}` })
  368. const site = this.siteOption.find((siteItem) => {
  369. return siteItem.id == item.monitorId
  370. })
  371. const target = targets.find((targetItem) => {
  372. return targetItem.targetCode == item.monitorType
  373. })
  374. const siteGroup = JSON.parse(
  375. JSON.stringify({
  376. site: site,
  377. targets: targets,
  378. target: target,
  379. symbol: item.symbol,
  380. value: item.targetValue,
  381. targetUnit: item.unit,
  382. projectSchemeId: item.projectSchemeId,
  383. id: item.id
  384. })
  385. )
  386. this.$set(siteGroups, index, siteGroup)
  387. }
  388. }
  389. this.siteGroups = siteGroups.length > 0 ? siteGroups : [{
  390. site: null,
  391. targets: [],
  392. target: null,
  393. symbol: null,
  394. value: '',
  395. targetUnit: ''
  396. }]
  397. this.$set(this.form, 'beforeRemouldDate', [
  398. projectScheme.beforeRemouldStartDate,
  399. projectScheme.beforeRemouldEndDate
  400. ])
  401. this.$set(this.form, 'afterRemouldDate', [
  402. projectScheme.beforeRemouldEndDate,
  403. projectScheme.afterRemouldEndDate
  404. ])
  405. this.$forceUpdate()
  406. })
  407. },
  408. /**
  409. * 曲线请求参数
  410. */
  411. readyRemouldHourCurveParams() {
  412. let scm = {}
  413. this.siteGroups.forEach((siteGroup) => {
  414. const targetCode = siteGroup.target.targetCode
  415. if (scm.hasOwnProperty(targetCode)) scm[targetCode].push(siteGroup.site.id)
  416. else scm[targetCode] = [siteGroup.site.id]
  417. })
  418. let params = []
  419. for (const key in scm) {
  420. params.push({
  421. code: key,
  422. siteId: scm[key]
  423. })
  424. }
  425. const data = {
  426. params: params,
  427. beginTime: this.$moment(this.form.beforeRemouldDate[0]).format('YYYY-MM-DD 00:00:00'),
  428. endTime: this.$moment(this.form.beforeRemouldDate[1]).format('YYYY-MM-DD 23:59:59'),
  429. afterBeginTime: this.$moment(this.form.afterRemouldDate[0]).format('YYYY-MM-DD 00:00:00'),
  430. afterEndTime: this.$moment(this.form.afterRemouldDate[1]).format('YYYY-MM-DD 23:59:59')
  431. }
  432. return data
  433. },
  434. /**
  435. * 统计曲线
  436. */
  437. remouldHourCurve() {
  438. const data = this.readyRemouldHourCurveParams();
  439. remouldHourCurve(data).then(async res => {
  440. const result = res.result;
  441. let curveData = []
  442. const beforeRemould = result.beforeRemould;
  443. const afterRemould = result.afterRemould;
  444. for (const target in beforeRemould) {
  445. const beforeItem = beforeRemould[target];
  446. beforeItem['type'] = 0;
  447. beforeItem['code'] = `b${target}`
  448. beforeItem['targetCode'] = target
  449. const afterItem = afterRemould[target];
  450. afterItem['type'] = 1;
  451. afterItem['code'] = `a${target}`
  452. afterItem['targetCode'] = target
  453. curveData = [...curveData, ...[beforeItem, afterItem]]
  454. }
  455. this.curveData = curveData;
  456. // 改造前雨量数据
  457. let { result: beforeRainFall } = await getRainfallHour({
  458. beginDate: this.$moment(this.form.beforeRemouldDate[0]).format("YYYY-MM-DD"),
  459. endDate: this.$moment(this.$moment(this.form.beforeRemouldDate[1]).add(1, 'd')).format("YYYY-MM-DD")
  460. });
  461. // 改造后雨量数据
  462. let { result: afterRainFall } = await getRainfallHour({
  463. beginDate: this.$moment(this.form.afterRemouldDate[0]).format("YYYY-MM-DD"),
  464. endDate: this.$moment(this.$moment(this.form.afterRemouldDate[1]).add(1, 'd')).format("YYYY-MM-DD")
  465. });
  466. const beforeRainDataObj = this.getRainDataObj(beforeRainFall) // 改造前计算雨量数据对象
  467. const afterRainDataObj = this.getRainDataObj(afterRainFall) // 改造后计算雨量数据对象
  468. for (let index = 0; index < curveData.length; index++) {
  469. const item = curveData[index];
  470. const domeId = `chart${item.code}`
  471. const xData = item.dateDate
  472. const series = item.siteData.map(site_data => {
  473. return {
  474. name: site_data.siteName,
  475. type: 'line',
  476. smooth: true,
  477. lineStyle: {
  478. width: 2
  479. },
  480. showSymbol: false,
  481. data: site_data.data
  482. }
  483. })
  484. // 雨量数据
  485. series.unshift({
  486. name: '雨量',
  487. xAxisIndex: 0,
  488. sampling: 'average', //降采样策略
  489. type: 'bar',
  490. yAxisIndex: 1,
  491. emphasis: {
  492. focus: 'series'
  493. },
  494. data: this.groupRainfallData(xData, item.type == 0 ? beforeRainDataObj : afterRainDataObj)
  495. })
  496. this.$nextTick(() => {
  497. this.loadChart(domeId, xData, series, item.name)
  498. })
  499. }
  500. })
  501. },
  502. /**
  503. * 将雨量列表转对象
  504. */
  505. getRainDataObj(rainFallData) {
  506. let rainObj = {}
  507. for (let index = 0; index < rainFallData.length; index++) {
  508. const item = rainFallData[index];
  509. rainObj[this.$moment(item.xposition).format("_YYYY_MM_DD_HH")] = item.maxFall
  510. }
  511. return rainObj
  512. },
  513. /**
  514. * 获取图表雨量数据
  515. */
  516. groupRainfallData(x1Data, rainFallDataObj) {
  517. let myRainFallData = []
  518. for (let index = 0; index < x1Data.length; index++) {
  519. const x1Item = this.$moment(x1Data[index]).format("_YYYY_MM_DD_HH");
  520. myRainFallData.push(rainFallDataObj[x1Item] ? rainFallDataObj[x1Item] : null)
  521. }
  522. return myRainFallData
  523. },
  524. /**
  525. * 图表
  526. */
  527. loadChart(domId, xData, series, y0Name) {
  528. const chartDom = this.$refs[domId][0];
  529. const myChart = echarts.init(chartDom);
  530. const option = {
  531. tooltip: {
  532. trigger: 'axis'
  533. },
  534. legend: {
  535. data: series.map(item => { return item.name })
  536. },
  537. grid: {
  538. left: '3%',
  539. right: '4%',
  540. bottom: '3%',
  541. containLabel: true
  542. },
  543. xAxis: {
  544. type: 'category',
  545. boundaryGap: false,
  546. data: xData
  547. },
  548. yAxis: [
  549. {
  550. type: 'value',
  551. name: y0Name,
  552. nameLocation: "end"
  553. },
  554. {
  555. nameLocation: 'end',
  556. alignTicks: true,
  557. type: 'value',
  558. name: '雨量'
  559. }
  560. ],
  561. series: series
  562. };
  563. myChart.clear()
  564. option && myChart.setOption(option);
  565. elementResizeDetectorMaker().listenTo(chartDom, () => {
  566. this.$nextTick(() => {
  567. myChart.resize()
  568. })
  569. })
  570. },
  571. /**
  572. * 清除方案
  573. */
  574. clearPlan() {
  575. this.siteGroups = this.$options.data().siteGroups
  576. this.currentProject = this.$options.data().currentProject
  577. this.form = this.$options.data().form
  578. this.tableData = this.$options.data().tableData
  579. this.chartsData = this.$options.data().chartsData
  580. this.curveData = this.$options.data().curveData
  581. },
  582. /**
  583. * 删除当前方案
  584. */
  585. removePlan() {
  586. const { id } = this.form;
  587. if (!id) return
  588. this.$confirm('确认删除该方案?', '提示', {
  589. confirmButtonText: '确定',
  590. cancelButtonText: '取消',
  591. type: 'warning'
  592. }).then(() => {
  593. deleteProjectSchemeById(id).then(res => {
  594. if (res.code == 1) {
  595. this.clearPlan()
  596. this.getProjectScheme()
  597. this.$message.success('删除方案成功');
  598. }
  599. })
  600. })
  601. },
  602. /**
  603. * 监测查看
  604. */
  605. viewCurve(row = null) {
  606. this.$refs.historyCurve.show(row)
  607. },
  608. moniterClose() {
  609. this.moniterVisible = false
  610. }
  611. }
  612. }
  613. </script>
  614. <style lang="scss" scoped>
  615. @import './style.scss';
  616. </style>