statisticFeatureChartEditor.vue 23 KB

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