statisticFeatureChartEditor.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. <template>
  2. <div class="commodity-chart-editor-container" id="box">
  3. <span
  4. class="slide-icon slide-right"
  5. @click="isSlideLeft = !isSlideLeft"
  6. v-show="isSlideLeft"
  7. >
  8. <i class="el-icon-d-arrow-right"></i>
  9. </span>
  10. <div class="left-cont" v-show="!isSlideLeft" id="left">
  11. <div class="left-top">
  12. <el-button type="primary" plain @click="$router.back()">取消</el-button>
  13. </div>
  14. <div class="left-min">
  15. <div class="search-cont">
  16. <selectTarget
  17. :defaultId="chartInfoData.EdbInfoList?chartInfoData.EdbInfoList[0].EdbInfoId:''"
  18. :defaultOpt="chartInfoData.EdbInfoList?[chartInfoData.EdbInfoList[0]]:[]"
  19. :defaultType="chartInfoData.EdbInfoList?chartInfoData.EdbInfoList[0].EdbInfoCategoryType:''"
  20. :selectStyleType="2"
  21. @select="handleSelectTarget"
  22. />
  23. </div>
  24. <div class="section">
  25. <div>曲线图</div>
  26. <div class="section-item">
  27. <span style="flex-shrink:0;min-width:50px;">时间:</span>
  28. <el-select
  29. style="max-width: 110px;flex-shink:0;"
  30. v-model="chartInfo.Curve.DateType"
  31. placeholder="请选择"
  32. @change="getPreviewSplineChart"
  33. >
  34. <el-option
  35. v-for="item in yearSelector"
  36. :key="item.value"
  37. :label="item.name"
  38. :value="item.value"
  39. />
  40. </el-select>
  41. <date-picker
  42. v-model="chartInfo.Curve.Date"
  43. v-show="chartInfo.Curve.DateType===5"
  44. style="width:150px;margin-left:10px;"
  45. type="month"
  46. range
  47. value-type="format"
  48. placeholder="请选择时间段"
  49. @change="dateChange"
  50. />
  51. </div>
  52. <div class="section-item">
  53. <span style="flex-shrink:0;min-width:50px;">上下限:</span>
  54. <el-input
  55. style="flex:2;margin-left:5px;margin-right:10px"
  56. :step="1"
  57. type="number"
  58. v-model="chartInfo.Curve.LeftMin"
  59. @change="val => { chartInfo.Curve.LeftMin=Number(val);changeSplineOption() }"
  60. />
  61. <span>至</span>
  62. <el-input
  63. style="flex:2;margin-left:5px;"
  64. :step="1"
  65. type="number"
  66. v-model="chartInfo.Curve.LeftMax"
  67. @change="val => { chartInfo.Curve.LeftMax=Number(val);changeSplineOption() }"
  68. />
  69. </div>
  70. </div>
  71. <div class="section">
  72. <div>标准差
  73. <el-tooltip effect="dark" placement="right">
  74. <div
  75. slot="content"
  76. v-html="ruleTips.StandardDeviation"
  77. style="line-height: 20px;width:300px"
  78. ></div>
  79. <i class="el-icon-question" style="color: #666" />
  80. </el-tooltip>
  81. </div>
  82. <div class="section-item">
  83. <div>滚动期数:</div>
  84. <el-input
  85. style="max-width:100px;margin-left:10px"
  86. :step="1"
  87. type="number"
  88. v-model="chartInfo.StandardDeviation.CalculateValue"
  89. @change="val => { chartInfo.StandardDeviation.CalculateValue = Number(val); }"
  90. />
  91. </div>
  92. </div>
  93. <div class="section">
  94. <div>百分位
  95. <el-tooltip effect="dark" placement="right">
  96. <div
  97. slot="content"
  98. v-html="ruleTips.Percentile"
  99. style="line-height: 20px;width:300px"
  100. ></div>
  101. <i class="el-icon-question" style="color: #666" />
  102. </el-tooltip>
  103. </div>
  104. <div class="section-item">
  105. <span style="flex-shrink:0;min-width:70px">时间长度:</span>
  106. <el-input
  107. style="width:100px;margin-left:5px;margin-right:10px"
  108. :step="1"
  109. type="number"
  110. v-model="chartInfo.Percentile.CalculateValue"
  111. @change="val => { chartInfo.Percentile.CalculateValue = Number(val); }"
  112. />
  113. <el-select
  114. style="flex:1"
  115. v-model="chartInfo.Percentile.CalculateUnit"
  116. placeholder="请选择"
  117. >
  118. <el-option
  119. v-for="item in unitOpt"
  120. :key="item.val"
  121. :label="item.label"
  122. :value="item.val"
  123. />
  124. </el-select>
  125. </div>
  126. </div>
  127. <div class="section">
  128. <div>频率分布
  129. <el-tooltip effect="dark" placement="right">
  130. <div
  131. slot="content"
  132. v-html="ruleTips.FrequencyDistribution"
  133. style="line-height: 20px;width:300px"
  134. ></div>
  135. <i class="el-icon-question" style="color: #666" />
  136. </el-tooltip>
  137. </div>
  138. <div class="section-item">
  139. <span style="flex-shrink:0;min-width:70px">时间段:</span>
  140. <el-select
  141. style="max-width: 110px;flex-shink:0;"
  142. v-model="chartInfo.FrequencyDistribution.DateType"
  143. placeholder="请选择"
  144. >
  145. <el-option
  146. v-for="item in frequencyDateOption"
  147. :key="item.value"
  148. :label="item.name"
  149. :value="item.value"
  150. />
  151. </el-select>
  152. <date-picker
  153. v-model="chartInfo.FrequencyDistribution.Date"
  154. v-show="chartInfo.FrequencyDistribution.DateType==8"
  155. style="width:150px;margin-left:10px;"
  156. type="month"
  157. range
  158. value-type="format"
  159. placeholder="请选择时间段"
  160. @change="dateChange($event,'frequecny')"
  161. />
  162. </div>
  163. <div class="section-item">
  164. <span style="flex-shrink:0;min-width:70px">频段数</span>
  165. <el-select
  166. style="max-width: 110px;flex-shink:0;"
  167. v-model="chartInfo.FrequencyDistribution.FrequencyValue"
  168. placeholder="请选择频段数"
  169. >
  170. <el-option
  171. :label="10"
  172. :value="10"
  173. />
  174. <el-option
  175. :label="20"
  176. :value="20"
  177. />
  178. </el-select>
  179. </div>
  180. </div>
  181. <el-button type="primary" style="float:right" @click="handlePreviewChart">确定</el-button>
  182. </div>
  183. <span
  184. class="move-btn resize"
  185. v-drag
  186. id="resize"
  187. ></span>
  188. <span class="slide-icon slide-left" @click="isSlideLeft = !isSlideLeft">
  189. <i class="el-icon-d-arrow-left"></i>
  190. </span>
  191. </div>
  192. <div
  193. class="right-cont"
  194. id="right"
  195. :style="isSlideLeft ? 'width:100%' : `width:80%`"
  196. >
  197. <div
  198. class="chart-min-cont"
  199. v-if="chartBatchData"
  200. >
  201. <div class="card-wrapper">
  202. <chartCard
  203. :entryType="1"
  204. ref="chartCard1"
  205. :data="chartBatchData.CurveData"
  206. :settings="chartInfo"
  207. :isChartAdd="buttonAuth.isCurveChartAdd"
  208. @saveChart="saveChartToBaseHandle"
  209. />
  210. </div>
  211. <div class="card-wrapper" v-if="chartBatchData.StandardDeviationData">
  212. <chartCard
  213. :entryType="2"
  214. ref="chartCard2"
  215. :data="chartBatchData.StandardDeviationData"
  216. :settings="chartInfo"
  217. :isChartAdd="buttonAuth.isStandardChartAdd"
  218. :isEdbAdd="buttonAuth.isStandardEdbAdd"
  219. @saveChart="saveChartToBaseHandle"
  220. @saveEdb="saveEdbToBaseHandle"
  221. />
  222. </div>
  223. <div class="card-wrapper" v-if="chartBatchData.PercentileData">
  224. <chartCard
  225. :entryType="3"
  226. ref="chartCard3"
  227. :data="chartBatchData.PercentileData"
  228. :settings="chartInfo"
  229. :isChartAdd="buttonAuth.isPercentileChartAdd"
  230. :isEdbAdd="buttonAuth.isPercentileEdbAdd"
  231. @saveChart="saveChartToBaseHandle"
  232. @saveEdb="saveEdbToBaseHandle"
  233. />
  234. </div>
  235. <div class="card-wrapper" v-if="chartBatchData.FrequencyDistributionData">
  236. <chartCard
  237. :entryType="4"
  238. ref="chartCard4"
  239. :data="chartBatchData.FrequencyDistributionData"
  240. :settings="chartInfo"
  241. :isChartAdd="buttonAuth.isFrequencyChartAdd"
  242. @saveChart="saveChartToBaseHandle"
  243. />
  244. </div>
  245. </div>
  246. <div class="nodata" v-else>
  247. <tableNoData text="暂无信息"/>
  248. </div>
  249. </div>
  250. <!-- 图表保存入库 -->
  251. <saveChartToBase
  252. :isShow.sync="isSaveChartToBase"
  253. :source="saveSource"
  254. :saveScence="saveScence"
  255. :chartData="chartData"
  256. @saveBack="saveChartBack"
  257. />
  258. <!-- 指标保存入库 -->
  259. <saveEdbToBase
  260. :isShow.sync="isSaveEdbToBase"
  261. :source="saveSource"
  262. :saveScence="saveScence"
  263. :chartData="chartData"
  264. @saveBack="saveEdbBack"
  265. />
  266. </div>
  267. </template>
  268. <script>
  269. import { dataBaseInterface } from '@/api/api.js';
  270. import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
  271. import {yearSelector} from '@/utils/defaultOptions';
  272. import {statisticFeatureInterface} from '@/api/modules/chartRelevanceApi';
  273. import selectTarget from './components/selectTarget.vue'
  274. import chartCard from './components/chartCard.vue';
  275. import SaveChartOther from '@/views/dataEntry_manage/components/SaveChartOther';
  276. import saveChartToBase from './components/saveChartTobaseDia.vue';
  277. import saveEdbToBase from './components/saveEdbToBaseDia.vue'
  278. export default {
  279. components: { selectTarget,chartCard,SaveChartOther,saveChartToBase,saveEdbToBase },
  280. directives: {
  281. drag(el, bindings) {
  282. el.onmousedown = function (e) {
  283. var init = e.clientX;
  284. // console.log(init);
  285. var box = $('#box')[0];
  286. // console.log(box.clientWidth)
  287. let total_wid = box.offsetWidth;
  288. var left = $('#left')[0];
  289. var right = $('#right')[0];
  290. var initWidth = left.offsetWidth;
  291. document.onmousemove = function (e) {
  292. var end = e.clientX;
  293. var newWidth = end - init + initWidth;
  294. left.style.width = newWidth + 'px';
  295. right.style.width = newWidth > 300 ? total_wid - newWidth + 'px' : total_wid - 320 + 'px';
  296. };
  297. document.onmouseup = function () {
  298. document.onmousemove = document.onmouseup = null;
  299. e.releaseCapture && e.releaseCapture();
  300. };
  301. e.setCapture && e.setCapture();
  302. return false;
  303. };
  304. },
  305. },
  306. data() {
  307. return {
  308. chart_code: this.$route.query.code || '',
  309. isSlideLeft: false,
  310. chartInfoData: {},
  311. chartBatchData:null,
  312. yearSelector: [
  313. ...yearSelector,
  314. { name: '自定义',value: 5 }
  315. ],
  316. frequencyDateOption: [
  317. { name: '最近3月',value:1 },
  318. { name: '最近6月',value:2 },
  319. { name: '最近1年',value:3 },
  320. { name: '最近2年',value:4 },
  321. { name: '最近3年',value:5 },
  322. { name: '最近5年',value:6 },
  323. { name: '最近10年',value:7 },
  324. { name: '自定义',value:8 },
  325. ],
  326. chartInfo: {
  327. MultipleGraphConfigId: 0,
  328. EdbInfoId: 0,
  329. Curve: {
  330. DateType:yearSelector[0].value,
  331. Date: [],
  332. StartDate: '',
  333. EndDate: '',
  334. LeftMin: 0,
  335. LeftMax: 0
  336. },
  337. StandardDeviation: {
  338. CalculateValue: 0
  339. },
  340. Percentile: {
  341. CalculateValue: 0,
  342. CalculateUnit: '天'
  343. },
  344. FrequencyDistribution: {
  345. DateType: 1,
  346. Date: [],
  347. StartDate: '',
  348. EndDate: '',
  349. FrequencyValue: 10,
  350. }
  351. },
  352. unitOpt:[
  353. {label:'年',val:'年'},
  354. {label:'季',val:'季'},
  355. {label:'月',val:'月'},
  356. {label:'周',val:'周'},
  357. {label:'天',val:'天'},
  358. ],
  359. buttonAuth: { //按钮控制
  360. isCurveChartAdd: false,
  361. isStandardChartAdd: false,
  362. isStandardEdbAdd: false,
  363. isPercentileChartAdd: false,
  364. isPercentileEdbAdd: false,
  365. isFrequencyChartAdd: false,
  366. },
  367. ruleTips: {
  368. StandardDeviation: `计算所选时间范围内数据的样本标准差s,s=sqrt(((x1-x)^2 (x2-x)^2 ......(xn-x)^2)/(n-1)),n表示数据个数。`,
  369. Percentile: `对所选时间范围内的数据,取最大值Max,最小值Min,计算Max-Min,百分位=(现值-Min)/(Max-Min),Max=Min时不予计算。`,
  370. FrequencyDistribution: `在所选时间范围内,取最大值和最小值,根据频段数划分多个间距相同的区间(左闭右开,最后一个区间为左闭右闭),统计数据值落在每个区间的数据个数,频率=落在某区间数据个数/所选时间段内数据总个数,累计频率为从最小值所在区间对应的频率开始累加。`
  371. },
  372. /* 图表入库 */
  373. isSaveChartToBase: false,
  374. saveSource:0,//图表位置1 2 3 4
  375. chartData: {},
  376. saveScence: '',//另存为
  377. /* 指标入库 */
  378. isSaveEdbToBase: false,
  379. oldEdbInfoType: 0,//原指标来源
  380. };
  381. },
  382. methods: {
  383. async getOptionDetail() {
  384. if(!this.chart_code) return
  385. const res = await statisticFeatureInterface.getOptionByCode({ UniqueCode: this.chart_code });
  386. if(res.Ret !== 200) return
  387. const {
  388. MultipleGraphConfigId,
  389. Curve,
  390. Percentile,
  391. StandardDeviation,
  392. FrequencyDistribution,
  393. EdbInfoList,
  394. ChartMappingList,
  395. EdbMappingList
  396. } = res.Data;
  397. this.chartInfoData = {
  398. EdbInfoList: EdbInfoList
  399. }
  400. this.oldEdbInfoType = EdbInfoList[0].EdbInfoCategoryType;
  401. this.chartInfo = {
  402. MultipleGraphConfigId,
  403. EdbInfoId:EdbInfoList[0].EdbInfoId,
  404. Curve: {
  405. ...Curve,
  406. Date: [Curve.StartDate,Curve.EndDate],
  407. },
  408. StandardDeviation,
  409. Percentile,
  410. FrequencyDistribution: {
  411. ...FrequencyDistribution,
  412. Date: [FrequencyDistribution.StartDate,FrequencyDistribution.EndDate],
  413. }
  414. }
  415. //统计图的2 3 4对应source8 9 10但其实图表source又是7 8 9 别问为什么这样搞问后端 我也乱的一批
  416. this.buttonAuth = {
  417. isCurveChartAdd: ChartMappingList.some(_ => _.MultipleLocationSource===1),
  418. isStandardChartAdd: ChartMappingList.some(_ => _.MultipleLocationSource===8),
  419. isStandardEdbAdd: EdbMappingList.some(_ => _.MultipleLocationSource===8),
  420. isPercentileChartAdd: ChartMappingList.some(_ => _.MultipleLocationSource===9),
  421. isPercentileEdbAdd: EdbMappingList.some(_ => _.MultipleLocationSource===9),
  422. isFrequencyChartAdd: ChartMappingList.some(_ => _.MultipleLocationSource===10),
  423. }
  424. this.getPreviewChartData();
  425. },
  426. // 确定保存图表配置
  427. async handlePreviewChart(){
  428. let params = {
  429. ...this.chartInfo
  430. }
  431. const res = await statisticFeatureInterface.chartOptionsSet(params);
  432. if(res.Ret !== 200) return
  433. const { MultipleGraphConfigId } = res.Data;
  434. this.chartInfo.MultipleGraphConfigId = MultipleGraphConfigId;
  435. this.getPreviewChartData()
  436. },
  437. async getPreviewChartData(){
  438. if(!this.chartInfo.EdbInfoId) return this.$message.warning('请选择指标')
  439. let params = {
  440. ...this.chartInfo
  441. }
  442. const res = await statisticFeatureInterface.previewChartBatch(params);
  443. if(res.Ret !== 200) return
  444. this.chartBatchData = res.Data;
  445. },
  446. /* 获取曲线图数据 */
  447. async getPreviewSplineChart() {
  448. if(!this.chartInfo.EdbInfoId) return
  449. let params = {
  450. ...this.chartInfo
  451. }
  452. const res = await statisticFeatureInterface.previewSpline(params);
  453. if(res.Ret !== 200) return
  454. this.chartBatchData = this.chartBatchData ? {
  455. ...this.chartBatchData,
  456. CurveData: res.Data.CurveData
  457. } : { CurveData: res.Data.CurveData};
  458. },
  459. /* 曲线配置变化重绘图 */
  460. changeSplineOption() {
  461. const { LeftMin,LeftMax } = this.chartInfo.Curve;
  462. if(this.$refs.chartCard1) {
  463. this.$refs.chartCard1.options.yAxis[0].max = Number(LeftMax);
  464. this.$refs.chartCard1.options.yAxis[0].min = Number(LeftMin);
  465. }
  466. },
  467. dateChange(val,type='') {
  468. if(type === 'frequecny') {
  469. this.chartInfo.FrequencyDistribution.StartDate = val[0] || '';
  470. this.chartInfo.FrequencyDistribution.EndDate = val[1] || '';
  471. }else {
  472. this.chartInfo.Curve.StartDate = val[0] || '';
  473. this.chartInfo.Curve.EndDate = val[1] || '';
  474. this.getPreviewSplineChart()
  475. }
  476. },
  477. // 指标选择
  478. async handleSelectTarget(e){
  479. if(!e) return
  480. this.chartInfo.EdbInfoId=e.EdbInfoId;
  481. const {max,min} = await this.getEdbDetail(e);
  482. this.chartInfo.Curve.LeftMin = min;
  483. this.chartInfo.Curve.LeftMax = max;
  484. this.getPreviewSplineChart()
  485. },
  486. //选择指标后填入上下限
  487. async getEdbDetail({EdbInfoId,EdbInfoType}) {
  488. this.oldEdbInfoType = EdbInfoType;
  489. const { Data } = EdbInfoType
  490. ? await preDictEdbInterface.edbDetail({EdbInfoId})
  491. : await dataBaseInterface.calculateDetail({EdbInfoId})
  492. return {
  493. max: EdbInfoType ? Data.MaxValue : Data.EdbInfoDetail.MaxValue,
  494. min: EdbInfoType ? Data.MinValue : Data.EdbInfoDetail.MinValue,
  495. }
  496. },
  497. reloadRightWid() {
  498. let total_wid = $('#box')[0].offsetWidth;
  499. let left = $('#left')[0].offsetWidth;
  500. let rigtWid = total_wid - left - 20 + 'px';
  501. $('#right')[0].style.width = rigtWid;
  502. },
  503. /* 保存指标入库 */
  504. saveEdbToBaseHandle({type,chartData,scence}) {
  505. this.saveSource = type;
  506. this.chartData = chartData;
  507. this.saveScence = scence;
  508. this.isSaveEdbToBase = true;
  509. },
  510. /* 保存完指标 按钮控制 */
  511. saveEdbBack({source}) {
  512. if(source===2) this.buttonAuth.isStandardEdbAdd = true;
  513. else if(source===3) this.buttonAuth.isPercentileEdbAdd = true;
  514. },
  515. /* 保存图表 */
  516. saveChartToBaseHandle({type,chartData,scence}) {
  517. this.saveSource = type;
  518. this.chartData = chartData;
  519. this.saveScence = scence;
  520. this.isSaveChartToBase = true;
  521. },
  522. /* 保存完图表 */
  523. saveChartBack({source,id}) {
  524. this.$message.success('保存成功');
  525. this.setButtonAuth(source);
  526. //封面图
  527. this.$refs[`chartCard`+source].setChartImage(source,id)
  528. },
  529. /* 保存图表后按钮控制 */
  530. setButtonAuth(source) {
  531. const sourceMap = {
  532. 1: 'isCurveChartAdd',
  533. 2: 'isStandardChartAdd',
  534. 3: 'isPercentileChartAdd',
  535. 4: 'isFrequencyChartAdd'
  536. }
  537. this.buttonAuth[sourceMap[source]] = true;
  538. }
  539. },
  540. mounted() {
  541. this.getOptionDetail();
  542. window.addEventListener('resize', this.reloadRightWid);
  543. },
  544. destroyed() {
  545. window.removeEventListener('resize', this.reloadRightWid);
  546. },
  547. beforeRouteEnter(to, from, next) {
  548. if(to.query.code){
  549. to.matched[1].name='编辑图表'
  550. }else{
  551. to.matched[1].name='添加图表'
  552. }
  553. next()
  554. }
  555. };
  556. </script>
  557. <style lang="scss">
  558. .commodity-chart-editor-container {
  559. $font-small: 12px;
  560. $font-normal: 14px;
  561. display: flex;
  562. * {
  563. box-sizing: border-box;
  564. }
  565. .el-form--label-top .el-form-item__label {
  566. padding: 0;
  567. }
  568. .label-left{
  569. display: flex;
  570. margin-top: 20px;
  571. .el-form-item__label{
  572. flex-shrink: 0;
  573. margin-right: 10px;
  574. }
  575. .el-date-editor.el-input, .el-date-editor.el-input__inner{
  576. width: auto;
  577. }
  578. }
  579. .target-other-name .el-input__inner {
  580. padding: 0 30px 0 5px !important;
  581. height: 40px !important;
  582. line-height: 40px !important;
  583. }
  584. .el-color-picker--mini .el-color-picker__trigger {
  585. width: 60px;
  586. height: 25px;
  587. padding: 0;
  588. }
  589. .el-color-picker--mini .el-color-picker__mask {
  590. width: 60px;
  591. height: 25px;
  592. }
  593. .slide-icon {
  594. padding: 20px 0;
  595. /* display: block; */
  596. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
  597. border-radius: 5px;
  598. cursor: pointer;
  599. position: absolute;
  600. top: 50%;
  601. transform: translateY(-50%);
  602. z-index: 99;
  603. &:hover {
  604. background-color: rgba(0, 0, 0, 0.05);
  605. }
  606. &.slide-left {
  607. right: 0;
  608. }
  609. &.slide-right {
  610. left: 0;
  611. }
  612. }
  613. .left-cont {
  614. width: 380px;
  615. min-width: 380px;
  616. background: #fff;
  617. margin-right: 20px;
  618. border: 1px solid #ececec;
  619. border-radius: 4px;
  620. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
  621. height: calc(100vh - 113px);
  622. overflow: hidden;
  623. position: relative;
  624. box-sizing: border-box;
  625. .left-top {
  626. padding: 15px 20px;
  627. border-bottom: 1px solid #ececec;
  628. box-shadow: 0px 3px 6px rgba(167, 167, 167, 0.09);
  629. }
  630. .left-min {
  631. padding: 20px;
  632. max-height: calc(100vh - 190px);
  633. overflow-y: auto;
  634. .section {
  635. border-top: 1px dashed #DCDFE6;
  636. margin-top: 20px;
  637. padding-top: 15px;
  638. .section-item{
  639. display: flex;
  640. align-items: center;
  641. font-size: 14px;
  642. color: #606266;
  643. margin: 10px 0;
  644. }
  645. }
  646. .left-bottom {
  647. margin-top: 20px;
  648. display: flex;
  649. align-items: center;
  650. justify-content: center;
  651. }
  652. }
  653. .move-btn {
  654. height: 100%;
  655. width: 4px;
  656. position: absolute;
  657. right: 0px;
  658. top: 0;
  659. &:hover {
  660. cursor: col-resize;
  661. }
  662. }
  663. }
  664. .right-cont {
  665. width: 80%;
  666. /* =================== */
  667. .chart-min-cont {
  668. /* background: #fff; */
  669. height: calc(100vh - 118px);
  670. overflow-y: auto;
  671. display: flex;
  672. flex-wrap: wrap;
  673. .card-wrapper {
  674. width: 48%;
  675. margin-bottom: 20px;
  676. min-height: 350px;
  677. &:nth-child(2n) {
  678. margin-left: 15px;
  679. }
  680. .card-item {
  681. padding: 20px;
  682. background: #fff;
  683. .top {
  684. display: flex;
  685. justify-content: space-between;
  686. align-items: center;
  687. margin-bottom: 15px;
  688. }
  689. .title {
  690. /* max-width: 250px; */
  691. font-size: 15px;
  692. text-align: left;
  693. margin: 10px 0;
  694. }
  695. }
  696. }
  697. }
  698. .nodata {
  699. height: calc(100vh - 120px);
  700. background-color: #fff;
  701. text-align: center;
  702. font-size: 16px;
  703. color: #666;
  704. padding: 100px 0;
  705. }
  706. }
  707. }
  708. </style>
  709. <style lang="scss">
  710. .commodity-chart-editor-container {
  711. .edb-item-style .el-input__icon {
  712. line-height: 27px;
  713. }
  714. .mx-datepicker {
  715. width: 200px !important;
  716. }
  717. }
  718. </style>