addChart.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358
  1. <template>
  2. <div class="addchart-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
  13. type="primary"
  14. @click="saveHandle"
  15. :disabled="chartInfo.ChartType === 5 && tableData.length !== 2"
  16. ><!-- 保存 -->{{$t('Dialog.confirm_save_btn')}}</el-button>
  17. <el-button type="primary" plain @click="$router.back()"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
  18. </div>
  19. <div class="left-min">
  20. <el-form
  21. ref="diaForm"
  22. label-position="top"
  23. label-width="80px"
  24. :model="chartInfo"
  25. :rules="chartRules"
  26. >
  27. <el-form-item :label="$t('EtaChartAddPage.label_chart_type')" prop="ChartType">
  28. <el-select
  29. v-model="chartInfo.ChartType"
  30. placeholder="请选择生成样式"
  31. style="width: 90%"
  32. >
  33. <el-option
  34. v-for="item in styleArr"
  35. :key="item.key"
  36. :label="item.label"
  37. :value="item.key"
  38. >
  39. </el-option>
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item :label="$t('EtaChartAddPage.label_chart_theme')" prop="Theme">
  43. <el-select
  44. v-model="chartInfo.ChartThemeId"
  45. placeholder="请选择图表主题"
  46. style="width: 90%"
  47. @change="changeThemeHandle"
  48. >
  49. <el-option
  50. v-for="item in chartThemeArr"
  51. :key="item.ChartThemeId"
  52. :label="item.ChartThemeName"
  53. :value="item.ChartThemeId"
  54. >
  55. </el-option>
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="">
  59. <div class="search-cont" v-if="chartInfo.ChartType!==10">
  60. <div>
  61. <label><!-- 选择指标 -->{{$t('Edb.choose_edb')}}:</label>
  62. <el-radio-group v-model="edbFromType">
  63. <el-radio :label="0" style="margin-right: 15px"><!-- ETA指标 -->{{$t('Edb.eta_name')}}</el-radio>
  64. <el-radio :label="1"><!-- ETA预测指标 -->{{$t('Edb.eta_predictor_name')}}</el-radio>
  65. </el-radio-group>
  66. </div>
  67. <el-select
  68. v-model="search_txt"
  69. v-loadMore="searchLoad"
  70. ref="searchRef"
  71. :filterable="!search_txt"
  72. remote
  73. clearable
  74. :placeholder="$t('Edb.InputHolderAll.input_name_orid')"
  75. style="width:90%;margin-top: 10px;display: block;"
  76. :remote-method="searchHandle"
  77. @click.native="inputFocusHandle"
  78. @change="selectTarget($event && searchOptions.find(_ => _.EdbInfoId === $event))"
  79. >
  80. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  81. <el-option
  82. v-for="item in searchOptions"
  83. :key="item.EdbInfoId"
  84. :label="chart_lang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
  85. :value="item.EdbInfoId"
  86. :disabled="!item.HaveOperaAuth"
  87. >
  88. <edbDetailPopover :info="item">
  89. <div slot="reference">
  90. <img
  91. :src="$icons.lock_ico2"
  92. width="18"
  93. height="18"
  94. style="vertical-align:middle"
  95. v-if="!item.HaveOperaAuth"
  96. />
  97. {{chart_lang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName }}
  98. </div>
  99. </edbDetailPopover>
  100. </el-option>
  101. </el-select>
  102. </div>
  103. </el-form-item>
  104. <el-form-item :label="$t('Chart.Detail.chart_name')" prop="ChartName">
  105. <el-input
  106. v-model="chartInfo.ChartName"
  107. style="width: 90%"
  108. :placeholder="$t('Dialog.require_vaild')"
  109. clearable
  110. />
  111. </el-form-item>
  112. <el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
  113. <el-cascader
  114. v-model="chartInfo.classify"
  115. :options="classifyOptions"
  116. :props="levelProps"
  117. style="width: 90%"
  118. :placeholder="$t('Chart.InputHolderAll.input_classify')"
  119. />
  120. </el-form-item>
  121. <el-form-item :label="$t('Chart.Detail.chart_unit')" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">
  122. <el-select
  123. v-model="chartInfo.Unit"
  124. filterable
  125. allow-create
  126. default-first-option
  127. clearable
  128. @change="changeUnit"
  129. :placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.chart_unit')})">
  130. <el-option
  131. v-for="item in UnitOptions"
  132. :key="item.label"
  133. :label="item.label"
  134. :value="item.value">
  135. </el-option>
  136. </el-select>
  137. </el-form-item>
  138. </el-form>
  139. <div class="xaxis-range-cont" v-if="chartInfo.ChartType===2 && tableData && tableData.length>0">
  140. <!-- 仅用于季节性图配置 -->
  141. <div style="margin-bottom: 12px;" class="xaxis-range-tip">
  142. {{$t('EtaChartAddPage.label_xserie_range')}}<!-- 横坐标显示范围 -->
  143. <el-tooltip>
  144. <div slot="content" v-html="$t('EtaChartAddPage.xserie_range_tip')">
  145. </div>
  146. <img src="~@/assets/img/icons/question_mark_black.png" style="height: 16px;cursor: pointer;margin-left: 6px;" />
  147. </el-tooltip>
  148. </div>
  149. <el-date-picker
  150. style="width: 45%;"
  151. v-model="SeasonExtraConfig.XStartDate"
  152. value-format="MM-dd"
  153. popper-class="x-range-picker-date"
  154. format="MM-dd"
  155. :placeholder="$t('Common.ph_time_start')"
  156. @change="xAxisChange"
  157. :clearable="false"
  158. ></el-date-picker>
  159. <el-date-picker
  160. style="width: 45%;"
  161. v-model="SeasonExtraConfig.XEndDate"
  162. value-format="MM-dd"
  163. popper-class="x-range-picker-date"
  164. format="MM-dd"
  165. :placeholder="$t('Common.ph_time_end')"
  166. @change="xAxisChange"
  167. :clearable="false"
  168. ></el-date-picker>
  169. <el-checkbox
  170. :label="$t('EtaChartAddPage.label_cross_year')"
  171. v-model="isSpanYear"
  172. :disabled="isSpanYearDisable"
  173. style="margin-top: 12px;"
  174. @change="changeIsSpanYear"
  175. ></el-checkbox>
  176. <br />
  177. <div class="legend-set-text" @click="openLegendEditDia">
  178. <span>{{$t('EtaChartAddPage.label_legend_set')}}<!-- 图例名称设置 --></span>
  179. <img src="~@/assets/img/icons/edit-blue.png" />
  180. </div>
  181. </div>
  182. <div class="targetset-cont">
  183. <!-- 仅用于散点图配置 -->
  184. <div class="scatter-setting" v-if="chartInfo.ChartType === 5 && tableData.length">
  185. <div style="display: flex;margin-right: 15px;">
  186. <span style="margin-right: 3px"><!-- 散点颜色: -->{{$t('Chart.Detail.scatter_color')}}:</span>
  187. <el-color-picker
  188. v-model="tableData[0].ChartColor"
  189. size="mini"
  190. show-alpha
  191. :predefine="predefineColors"
  192. ></el-color-picker>
  193. </div>
  194. <el-checkbox v-model="tableData[0].IsOrder"><!-- 逆序 -->{{$t('Chart.Detail.re_order')}}</el-checkbox>
  195. </div>
  196. <!-- 配置区 柱形 截面 雷达不需要-->
  197. <el-collapse v-model="activeNames" class="target-list" v-if="tableData.length&&![7,10,11].includes(chartInfo.ChartType)">
  198. <el-collapse-item v-for="(item,index) in tableData" :key="item.EdbInfoId" :disabled="[2,5].includes(chartInfo.ChartType)">
  199. <template slot="title">
  200. <span class="text_oneLine">{{currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}</span>
  201. <!-- 当为季节性图的第二个轴时,隐藏删除按钮 -->
  202. <i class="el-icon-delete del-icon" @click.stop="delTarget(item)" v-if="!(chartInfo.ChartType===2&&index===1)"></i>
  203. </template>
  204. <ul class="setting-cont" v-if="sameOptionType.includes(chartInfo.ChartType)">
  205. <!-- 堆叠图 或组合图中的堆叠类型 非第一项隐藏配置 -->
  206. <template v-if="showYOptionsHandle(item,index)">
  207. <li>
  208. <el-checkbox v-model="item.IsOrder"><!-- 逆序 -->{{$t('Chart.Detail.re_order')}}</el-checkbox>
  209. </li>
  210. <li>
  211. <el-radio-group v-model="item.IsAxis" size="mini" @input="isChangeEdbAxis=true">
  212. <el-radio-button :label="1"><!-- 左轴 -->{{$t('Chart.Detail.l_axis')}}</el-radio-button>
  213. <el-radio-button :label="0"><!-- 右轴 -->{{$t('Chart.Detail.r_axis')}}</el-radio-button>
  214. <!-- 指标有右轴时才可以选右2轴 不然没有右2这个概念的意义 -->
  215. <el-radio-button
  216. v-if="[1,6].includes(chartInfo.ChartType)"
  217. :label="2"
  218. :disabled="(tableData.findIndex(_ => _.IsAxis===0) === -1)
  219. || (tableData.findIndex(_ => _.IsAxis===0) === index
  220. && tableData.filter(_ => _.IsAxis===0).length === 1)"
  221. ><!-- 右2轴 -->{{$t('Chart.Detail.rtwo_axis')}}</el-radio-button>
  222. </el-radio-group>
  223. </li>
  224. </template>
  225. <li style="min-width: 250px">
  226. <el-radio
  227. v-model="item.EdbInfoType"
  228. :label="1"
  229. @change="getPreviewSplineInfo"
  230. ><!-- 标准指标 -->{{$t('Chart.Detail.stand_lead')}}</el-radio
  231. >
  232. <div style="margin-top: 15px">
  233. <el-radio
  234. v-model="item.EdbInfoType"
  235. :label="0"
  236. style="margin-right: 10px"
  237. @change="getPreviewSplineInfo"
  238. ><!-- 领先指标 -->{{$t('Chart.Detail.leading_lead')}}</el-radio
  239. >
  240. <template v-if="item.EdbInfoType === 0">
  241. <!-- 领先 -->{{$t('EtaChartAddPage.label_lead')}}
  242. <el-input
  243. style="width: 60px"
  244. size="mini"
  245. type="number"
  246. min="0"
  247. v-model="item.LeadValue"
  248. @change="getPreviewSplineInfo"
  249. @keyup.native="filterCode(item)"
  250. ></el-input>
  251. <el-select
  252. v-model="item.LeadUnit"
  253. placeholder=""
  254. style="width: 60px"
  255. size="mini"
  256. @change="getPreviewSplineInfo"
  257. >
  258. <el-option
  259. v-for="item in fre_options"
  260. :key="item"
  261. :label="item"
  262. :value="item"
  263. >
  264. </el-option>
  265. </el-select>
  266. </template>
  267. </div>
  268. </li>
  269. <li>
  270. <div style="display: flex">
  271. <span style="margin-right: 3px"><!-- 线条颜色 -->{{$t('Chart.Detail.line_color')}}:</span>
  272. <el-color-picker
  273. v-model="item.ChartColor"
  274. size="mini"
  275. show-alpha
  276. :predefine="predefineColors"
  277. ></el-color-picker>
  278. </div>
  279. <div style="display: flex;margin-top: 12px" v-if="item.EdbInfoCategoryType === 1">
  280. <span style="margin-right: 3px"><!-- 预测值颜色 -->{{$t('Chart.Detail.predict_color')}}:</span>
  281. <el-color-picker
  282. v-model="item.PredictChartColor"
  283. size="mini"
  284. show-alpha
  285. :predefine="predefineColors"
  286. ></el-color-picker>
  287. </div>
  288. <div
  289. style="margin-top: 12px"
  290. v-if="chartInfo.ChartType === 1
  291. || (chartInfo.ChartType === 6 &&item.ChartStyle==='spline')"
  292. >
  293. <!-- 线条粗细 -->{{$t('Chart.Detail.line_size')}}:
  294. <el-input
  295. style="width: 60px"
  296. size="mini"
  297. type="number"
  298. :min="1"
  299. v-model="item.ChartWidth"
  300. />
  301. </div>
  302. </li>
  303. <li v-if="chartInfo.ChartType === 6">
  304. <div style="display: flex">
  305. <span style="margin-right: 3px"><!-- 生成样式 -->{{$t('Chart.label_create_sty')}}:</span>
  306. <el-select
  307. v-model="item.ChartStyle"
  308. placeholder="请选择生成样式"
  309. style="width: 50%"
  310. class="edb-item-style"
  311. >
  312. <el-option
  313. v-for="item in chartItemStyleArr"
  314. :key="item.key"
  315. :label="item.label"
  316. :value="item.value"
  317. >
  318. </el-option>
  319. </el-select>
  320. </div>
  321. </li>
  322. </ul>
  323. <div style="margin: 10px;text-align: center;color: #999;" v-else><!-- 暂无配置 -->{{$t('EtaChartAddPage.no_set_msg')}}</div>
  324. </el-collapse-item>
  325. </el-collapse>
  326. <!-- 奇怪柱状图配置 雷达图也要用 -->
  327. <bar-option
  328. v-if="[7,11].includes(chartInfo.ChartType)"
  329. ref="BarOptRef"
  330. :chartInfo="chartInfo"
  331. :edblist="tableData"
  332. :datedata="chartInfo.ChartType===7?barDateList:radarChartData.YDataList"
  333. @getData="barOptionPreviewMap"
  334. />
  335. <!-- 截面散点图 -->
  336. <sectional-scatter-option
  337. v-if="chartInfo.ChartType===10"
  338. ref="SectionScatterOptRef"
  339. :chartInfo="chartInfo"
  340. @getData="getSectionScatterData"
  341. @modifySeriesName="IsNameDefault = false"
  342. />
  343. <!-- 标识区 标记线 图表说明 -->
  344. <markersSection
  345. v-if="tableData.length"
  346. ref="markerSectionRef"
  347. :chartInfo="chartInfo"
  348. :tableData="tableData"
  349. @update="setChartMarkerInfo"
  350. @updateSeason="updateSeasonChart"
  351. @previewSeason="previewSeasonChart"
  352. @previewSeasonRight="previewSeasonRight"
  353. />
  354. </div>
  355. </div>
  356. <span
  357. class="move-btn resize"
  358. v-drag
  359. id="resize"
  360. ></span>
  361. <span class="slide-icon slide-left" @click="isSlideLeft = !isSlideLeft">
  362. <i class="el-icon-d-arrow-left"></i>
  363. </span>
  364. </div>
  365. <div class="right-cont" id="right" :style="isSlideLeft ? 'width:100%' : `width:80%`">
  366. <div class="chart-min-cont" v-if="tableData.length">
  367. <div class="cont-top">
  368. <div class="top-left">
  369. <!-- 默认曲线图 -->
  370. <template v-if="sameOptionType.includes(chartInfo.ChartType)">
  371. <el-button
  372. type="primary"
  373. v-for="item in yearSelector"
  374. :key="item.value"
  375. size="medium"
  376. :plain="item.value !== year_select"
  377. class="year-btn"
  378. @click.native="changeYear(item)"
  379. >{{ item.name }}</el-button
  380. >
  381. <el-button type="text" class="btn-sty" @click="openDateDia">{{
  382. dateTip
  383. }}</el-button>
  384. </template>
  385. <!-- 季节性图选择年份区间 -->
  386. <!-- <date-picker
  387. v-else-if="chartInfo.ChartType === 2"
  388. v-model="season_year"
  389. type="month"
  390. value-type="format"
  391. range
  392. placeholder="年份日期选择"
  393. @change="seasonYearChange"
  394. /> -->
  395. <div v-else-if="chartInfo.ChartType === 2" @click="openDateDia" class="date-setting">
  396. {{ season_year && season_year.length>0 ? season_year[0]+'~'+season_year[1]:"年份日期选择" }}
  397. </div>
  398. </div>
  399. </div>
  400. <div class="cont-bottom">
  401. <div class="chart-show-cont" v-show="options.series">
  402. <div class="chartWrapper" id="chartWrapper">
  403. <h2
  404. class="chart-title"
  405. v-show="chartInfo.ChartName"
  406. :style="`
  407. textAlign:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.align};
  408. fontSize:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.fontSize}px;
  409. color:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.color}
  410. `"
  411. >
  412. {{ chartInfo.ChartName }}
  413. </h2>
  414. <Chart :options="options" :chartInfo="chartInfo" ref="chartRef"/>
  415. <!-- <div class="range-cont left" v-if="leftIndex != -1">
  416. <el-input
  417. style="width: 60px; display: block"
  418. size="mini"
  419. type="number"
  420. placeholder="上限"
  421. v-model="tableData[leftIndex].MaxData"
  422. />
  423. <el-input
  424. class="min-data-input"
  425. size="mini"
  426. type="number"
  427. placeholder="下限"
  428. v-model="tableData[leftIndex].MinData"
  429. />
  430. </div>
  431. <div class="range-cont right" v-if="rightIndex != -1">
  432. <el-input
  433. style="width: 60px; display: block"
  434. size="mini"
  435. type="number"
  436. placeholder="上限"
  437. v-model="tableData[rightIndex].MaxData"
  438. />
  439. <el-input
  440. class="min-data-input"
  441. size="mini"
  442. type="number"
  443. placeholder="下限"
  444. v-model="tableData[rightIndex].MinData"
  445. />
  446. </div>
  447. <div class="range-cont rightTwo" v-if="rightTwoIndex != -1">
  448. <el-input
  449. style="width: 60px; display: block"
  450. size="mini"
  451. type="number"
  452. placeholder="上限"
  453. v-model="tableData[rightTwoIndex].MaxData"
  454. />
  455. <el-input
  456. class="min-data-input"
  457. size="mini"
  458. type="number"
  459. placeholder="下限"
  460. v-model="tableData[rightTwoIndex].MinData"
  461. />
  462. </div> -->
  463. <!-- 需求:曲线图、堆积柱状图、组合图加入新指标时上下限自动调整 -->
  464. <template v-if="![7,10,11].includes(chartInfo.ChartType)">
  465. <div class="range-cont left" v-if="leftIndex !== -1">
  466. <el-input
  467. style="width: 60px; display: block"
  468. size="mini"
  469. type="number"
  470. placeholder="上限"
  471. v-model="chartLimit.max"
  472. @change="changeLimit"
  473. />
  474. <el-input
  475. class="min-data-input"
  476. size="mini"
  477. type="number"
  478. placeholder="下限"
  479. v-model="chartLimit.min"
  480. @change="changeLimit"
  481. />
  482. </div>
  483. <div class="range-cont right" v-if="rightIndex !== -1">
  484. <el-input
  485. style="width: 60px; display: block"
  486. size="mini"
  487. type="number"
  488. placeholder="上限"
  489. v-model="chartLimit.rightMax"
  490. @change="changeLimit"
  491. />
  492. <el-input
  493. class="min-data-input"
  494. size="mini"
  495. type="number"
  496. placeholder="下限"
  497. v-model="chartLimit.rightMin"
  498. @change="changeLimit"
  499. />
  500. </div>
  501. <!-- 右2上下限设置 -->
  502. <div class="range-cont rightTwo" v-if="rightTwoIndex !== -1">
  503. <el-input
  504. style="width: 60px; display: block"
  505. size="mini"
  506. type="number"
  507. placeholder="上限"
  508. v-model="chartLimit.rightTwoMax"
  509. @change="changeLimit"
  510. />
  511. <el-input
  512. class="min-data-input"
  513. size="mini"
  514. type="number"
  515. placeholder="下限"
  516. v-model="chartLimit.rightTwoMin"
  517. @change="changeLimit"
  518. />
  519. </div>
  520. </template>
  521. <!-- 后续新图专用上下限 和其他数据依赖不公用 柱形图 截面散点-->
  522. <template v-if="[7,10,11].includes(chartInfo.ChartType)">
  523. <div class="range-cont left">
  524. <el-input
  525. style="width: 60px; display: block"
  526. size="mini"
  527. type="number"
  528. placeholder="上限"
  529. v-model="chartLimit.max"
  530. @change="changeLimit"
  531. />
  532. <el-input
  533. class="min-data-input"
  534. size="mini"
  535. type="number"
  536. placeholder="下限"
  537. v-model="chartLimit.min"
  538. @change="changeLimit"
  539. />
  540. </div>
  541. <!-- x轴上下限 -->
  542. <div class="range-cont bottom" v-if="chartLimit.x_min||chartLimit.x_max">
  543. <el-input
  544. class="left"
  545. size="mini"
  546. type="number"
  547. placeholder="下限"
  548. v-model="chartLimit.x_min"
  549. @change="changeLimit"
  550. />
  551. <el-input
  552. class="left"
  553. size="mini"
  554. type="number"
  555. placeholder="上限"
  556. v-model="chartLimit.x_max"
  557. @change="changeLimit"
  558. />
  559. </div>
  560. </template>
  561. </div>
  562. <div class="chart-bottom-insruction-info">
  563. <div class="chart-source">
  564. <span
  565. v-if="chartInfo.SourcesFrom"
  566. :style="`
  567. color: ${JSON.parse(chartInfo.SourcesFrom).isShow ? JSON.parse(chartInfo.SourcesFrom).color : '#999'};
  568. fontSize: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
  569. `"
  570. ><!-- 来源 -->{{$t('Chart.Detail.source')}}:{{ JSON.parse(chartInfo.SourcesFrom).text}}
  571. </span>
  572. <el-switch
  573. v-if="chartInfo.SourcesFrom"
  574. v-model="chartInfo.SourcesFromVisable"
  575. :active-value="true"
  576. :inactive-value="false"
  577. style="margin:0 15px;"
  578. @change="changeSourceVisable"
  579. />
  580. <span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Chart.chart_edit_btn')}}</span>
  581. </div>
  582. <!-- 公历农历切换 只用于季节性图 -->
  583. <el-radio-group
  584. v-model="calendar_type"
  585. class="calendar-cont"
  586. v-if="chartInfo.ChartType === 2"
  587. @change="getPreviewSplineInfo"
  588. >
  589. <el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
  590. <el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
  591. </el-radio-group>
  592. <!-- 图表说明 -->
  593. <div
  594. class="chart-instruction"
  595. v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
  596. v-text="JSON.parse(chartInfo.Instructions).text"
  597. :style="`
  598. color: ${JSON.parse(chartInfo.Instructions).color};
  599. fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
  600. `"
  601. ></div>
  602. </div>
  603. <span class="chart-author"
  604. ><!-- 作者 -->{{$t('Chart.Detail.author')}}:{{ chartInfo.SysUserRealName || roleName }}</span
  605. >
  606. </div>
  607. <!-- 关联指标 -->
  608. <chartRelationEdbList
  609. :chartInfo="chartInfo"
  610. :tableData="tableData"
  611. :updateData="updateData"
  612. @changeTableData="changeTableData"
  613. @delTarget="delTarget"
  614. @copyCode="copyCode"
  615. @viewTarget="viewTarget"
  616. />
  617. </div>
  618. </div>
  619. <div class="nodata" v-else>
  620. <tableNoData :text="$t('Common.no_info_msg')"/>
  621. </div>
  622. </div>
  623. <!-- 日期端选择弹窗 -->
  624. <DateChooseDia
  625. :isDateDia="isDateDia"
  626. :dateForm="dateForm"
  627. :earliestDate="earliestDate"
  628. @cancel="isDateDia = false"
  629. @dateBack="dataChangeBack"
  630. />
  631. <!-- 季节性 图例设置 -->
  632. <LegendEditDia
  633. :isEditLegend="legendEditDiaShow"
  634. :legendList="SeasonExtraConfig.ChartLegend"
  635. @cancel="legendEditDiaShow = false"
  636. @saveLegend="saveLegend"
  637. />
  638. <!-- 数据来源编辑弹窗 -->
  639. <chartSourceEditDia
  640. :isShow.sync="isShowSourceDialog"
  641. :chartInfo="chartInfo"
  642. @update="value => {chartInfo.SourcesFrom=JSON.stringify({...value,isShow:chartInfo.SourcesFromVisable})}"
  643. />
  644. </div>
  645. </template>
  646. <script>
  647. import { dataBaseInterface } from '@/api/api.js';
  648. import { chartSetMixin } from './mixins/chartPublic';
  649. import {unitSelectList} from '@/utils/defaultOptions.js';
  650. import addOrEditMixn from './mixins/addOreditMixin';
  651. import Chart from './components/chart';
  652. import DateChooseDia from './components/DateChooseDia';
  653. import barOption from './components/barOptionSection.vue';
  654. import sectionalScatterOption from './components/sectionalScatterOption.vue';
  655. import LegendEditDia from './components/LegendEditDia.vue';
  656. import markersSection from './components/markersSection.vue';
  657. import chartSourceEditDia from './components/chartSourceEditDialog.vue';
  658. import chartRelationEdbList from './components/chartReleationEdbTable.vue';
  659. export default {
  660. components: { Chart,DateChooseDia,barOption,sectionalScatterOption,LegendEditDia,markersSection,chartSourceEditDia,chartRelationEdbList},
  661. directives: {
  662. drag(el, bindings) {
  663. el.onmousedown = function (e) {
  664. var init = e.clientX;
  665. // console.log(init);
  666. var box = $('#box')[0];
  667. // console.log(box.clientWidth)
  668. let total_wid = box.offsetWidth;
  669. var left = $('#left')[0];
  670. var right = $('#right')[0];
  671. var initWidth = left.offsetWidth;
  672. document.onmousemove = function (e) {
  673. var end = e.clientX;
  674. var newWidth = end - init + initWidth;
  675. left.style.width = newWidth + 'px';
  676. right.style.width = newWidth > 300 ? total_wid - newWidth + 'px' : total_wid - 320 + 'px';
  677. };
  678. document.onmouseup = function () {
  679. document.onmousemove = document.onmouseup = null;
  680. e.releaseCapture && e.releaseCapture();
  681. };
  682. e.setCapture && e.setCapture();
  683. return false;
  684. };
  685. },
  686. },
  687. watch: {
  688. tableData: {
  689. handler(newval, oldval) {
  690. if(newval.length) {
  691. if([7,10,11].includes(this.chartInfo.ChartType)) {
  692. // 奇怪柱形图
  693. this.chartInfo.ChartType === 7 && this.barDateList.length && this.$refs.BarOptRef.getBarData();
  694. //雷达图
  695. this.chartInfo.ChartType === 11 && this.$refs.BarOptRef.getBarData();
  696. }else {
  697. //拼接标题
  698. this.chartInfo.ChartName = this.sameOptionType.includes(this.chartInfo.ChartType)
  699. ? newval.map((item,index) => index === newval.length-1
  700. ? (this.currentLang==='en'?item.EdbNameEn:item.EdbName)
  701. : `${(this.currentLang==='en'?item.EdbNameEn:item.EdbName)}和`).join('')
  702. : `${this.currentLang==='en'?newval[0].EdbNameEn:newval[0].EdbName}季节性`;
  703. if(this.updateLimit){
  704. this.EdbAxisChange()
  705. }
  706. this.setAddChartDefault();
  707. this.setChartOptionHandle(newval);
  708. }
  709. // 设置起始日期和最新日期
  710. this.setExtremumDate()
  711. }else {
  712. this.chartInfo.ChartName = '';
  713. }
  714. },
  715. deep: true,
  716. }
  717. },
  718. computed: {
  719. roleName() {
  720. return localStorage.getItem('userName');
  721. },
  722. UnitOptions(){
  723. return unitSelectList()
  724. }
  725. },
  726. mixins: [chartSetMixin,addOrEditMixn],
  727. data() {
  728. return {
  729. isSlideLeft: false,
  730. search_txt: '',
  731. calendar_type: '公历',//默认公历
  732. season_year:'',//季节图时间段
  733. activeNames:'',
  734. needWatch: true,
  735. IsNameDefault:true,
  736. /* UnitOptions:unitArr, */
  737. useUnit:''
  738. };
  739. },
  740. methods: {
  741. /* 保存 */
  742. saveHandle() {
  743. if(!this.tableData.length)
  744. return this.$message.warning(/* '暂未选择指标' */this.$t('ToolBox.CommodityPriceChart.tips_msg05'));
  745. console.log(this.chartInfo)
  746. this.$refs.diaForm.validate((valid) => {
  747. if(valid) {
  748. // 季节图只允许添加一个指标
  749. if(this.chartInfo.ChartType === 2 && this.tableData.length > 1){}
  750. //return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
  751. else if([7,11].includes(this.chartInfo.ChartType) && !this.$refs.BarOptRef.dateList.length)
  752. return this.$message.warning(/*'请添加日期'*/this.$t('ToolBox.CommodityPriceChart.tips_msg06'));
  753. else if(this.chartInfo.ChartType === 10 && !this.$refs.SectionScatterOptRef.seriesArr[0].edbs)
  754. return this.$message.warning(/* '请添加系列指标' */this.$t('Chart.OptMsg.season_add_hint'));
  755. if(this.chartInfo.ChartType === 2){
  756. if(!(this.SeasonExtraConfig.XStartDate && this.SeasonExtraConfig.XEndDate)){
  757. return this.$message.warning(/* '横坐标显示范围不能为空' */this.$t('Chart.OptMsg.season_area_hint'));
  758. }
  759. }
  760. let db_arr = this.tableData.map((item,index) => ({
  761. ChartColor: item.ChartColor,
  762. PredictChartColor: item.PredictChartColor,
  763. ChartStyle: item.ChartStyle,
  764. ChartWidth: Number(item.ChartWidth),
  765. EdbInfoId: item.EdbInfoId,
  766. EdbAliasName: item.EdbAliasName,
  767. EdbInfoType: item.EdbInfoType,
  768. IsAxis: item.IsAxis,
  769. IsOrder: item.IsOrder,
  770. LeadUnit: item.EdbInfoType ? '' : item.LeadUnit,
  771. LeadValue: item.EdbInfoType ? 0 : Number(item.LeadValue),
  772. MaxData: Number(item.MaxData),
  773. MinData: Number(item.MinData)
  774. })
  775. )
  776. let hasLimitChange = false
  777. //需检测上下限是否修改
  778. if(![7,10,11].includes(this.chartInfo.ChartType)){
  779. const limitSame= this.getLimitInfo()
  780. hasLimitChange = !limitSame
  781. }
  782. if(![10,11].includes(this.chartInfo.ChartType)){
  783. //每个数据转换需要检测是否合法
  784. for(let i=0;i<db_arr.length;i++){
  785. const {IsConvert,ConvertType,ConvertValue} = this.updateData[i]
  786. //计算方式是否合法
  787. if(IsConvert&&!this.checkConver(ConvertType,ConvertValue)){
  788. //提示语:第${i+1}个指标数据转换不合法,请检查数值
  789. return this.$message.warning(this.$t('EtaChartAddPage.data_transformation_list_hint',{num:i+1}))
  790. }
  791. //如果类型为对数,检测数据是否包含负数
  792. if(IsConvert&&ConvertType===3){
  793. if(!this.checkEdbData(this.tableData[i].DataList)){
  794. //提示语:第${i+1}个指标数据含有负数或0,无法进行对数运算,请检查
  795. return this.$message.warning(this.$t('EtaChartAddPage.data_transformation_list_hint2',{num:i+1}))
  796. }
  797. }
  798. }
  799. db_arr = db_arr.map((item,index)=>{
  800. const {IsConvert,ConvertType,ConvertValue,ConvertUnit,ConvertEnUnit} = this.updateData[index]
  801. return {
  802. ...item,
  803. IsConvert:Number(IsConvert),
  804. ConvertType:IsConvert?ConvertType:1,
  805. ConvertValue:IsConvert?Number(ConvertValue):100,
  806. ConvertUnit:IsConvert?ConvertUnit:'',
  807. ConvertEnUnit:IsConvert?ConvertEnUnit:''
  808. }
  809. })
  810. }
  811. const { ChartType,ChartName,ChartThemeId,SourcesFrom,Instructions,MarkersLines,MarkersAreas,ChartThemeStyle } = this.chartInfo;
  812. let public_param = {
  813. ChartClassifyId: this.chartInfo.classify.length ? this.chartInfo.classify[this.chartInfo.classify.length - 1] : 0,
  814. ChartEdbInfoList: db_arr,
  815. ChartName,
  816. ChartType,
  817. ChartThemeId,
  818. SourcesFrom,
  819. Instructions,
  820. MarkersLines,
  821. MarkersAreas,
  822. ChartThemeStyle
  823. }
  824. //提交参数
  825. const typePrams = this.getSaveParamsByChartType(public_param);
  826. let params = this.sameOptionType.includes(this.chartInfo.ChartType)
  827. ? {
  828. ...public_param,
  829. DateType: this.year_select,
  830. StartYear: this.count_year || 0,
  831. StartDate:
  832. [5,6].includes(this.year_select)
  833. ? this.select_date[0]
  834. : '',
  835. EndDate: this.year_select === 5 ? this.select_date[1] : '',
  836. }
  837. : typePrams
  838. if(![7,10,11].includes(this.chartInfo.ChartType)){
  839. const {
  840. min,max,rightMin,rightMax,rightTwoMin,rightTwoMax
  841. } = this.chartLimit
  842. params = {
  843. ...params,
  844. LeftMin:min+'',
  845. LeftMax:max+'',
  846. RightMin:rightMin+'',
  847. RightMax:rightMax+'',
  848. Right2Min:rightTwoMin+'',
  849. Right2Max:rightTwoMax+'',
  850. MinMaxSave:Number(hasLimitChange)
  851. }
  852. }
  853. //如果是季节性图,在这里加上同期/右轴的参数
  854. if(this.chartInfo.ChartType===2){
  855. //const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
  856. const {SeasonRightConfig={}} = this.chartInfo
  857. const tempData = _.cloneDeep(this.chartInfo.SeasonAverageConfig||{})
  858. const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = tempData||{}
  859. delete MaxMinLimits.List
  860. delete SamePeriodAverage.List
  861. delete SamePeriodStandardDeviation.List
  862. const tempConfig = _.cloneDeep(SeasonRightConfig)
  863. delete tempConfig.EdbInfoList
  864. params.SeasonExtraConfig = {
  865. ...this.SeasonExtraConfig,
  866. MaxMinLimits:MaxMinLimits.IsAdd?MaxMinLimits:{},
  867. SamePeriodAverage:SamePeriodAverage.IsAdd?SamePeriodAverage:{},
  868. SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{},
  869. RightAxis:SeasonRightConfig.IsAdd?tempConfig:{}//右轴的具体配置
  870. }
  871. }
  872. dataBaseInterface.chartAdd(params).then(res => {
  873. if(res.Ret !== 200) return;
  874. this.setChartImage(res.Data);
  875. })
  876. }
  877. })
  878. },
  879. /* 设置图表封面图片 */
  880. setChartImage(data) {
  881. let svg = this.$refs.chartRef.chart.getSVG({
  882. chart: {
  883. width: 340,
  884. height: 230,
  885. }
  886. });
  887. let form = new FormData();
  888. form.append('Img', svg);
  889. this.setImageHandle(form,data);
  890. },
  891. async setImageHandle(form,{ UniqueCode,ChartInfoId }) {
  892. // let { Data } = await dataBaseInterface.uploadImgSvg(form);
  893. // // let { Data } = await dataBaseInterface.uploadImg(form);
  894. // await dataBaseInterface.setChartImage({
  895. // ChartInfoId: ChartInfoId,
  896. // ImageUrl: Data.ResourceUrl,
  897. // });
  898. form.append('ChartInfoId',ChartInfoId)
  899. await dataBaseInterface.setChartThumbnail(form)
  900. // this.$message.success('添加成功');
  901. this.$message.success(this.$t('MsgPrompt.add_msg2'));
  902. this.$router.replace({
  903. path: '/chartsetting',
  904. query: {
  905. code: UniqueCode,
  906. id: ChartInfoId
  907. }
  908. })
  909. },
  910. },
  911. mounted() {
  912. this.getMenu();
  913. this.getChartBaseSetting()
  914. this.getThemeList('init');
  915. window.addEventListener('resize', this.reloadRightWid);
  916. },
  917. destroyed() {
  918. window.removeEventListener('resize', this.reloadRightWid);
  919. }
  920. };
  921. </script>
  922. <style lang="scss">
  923. .addchart-container {
  924. $font-small: 12px; $font-normal: 14px;
  925. display: flex;
  926. *{ box-sizing: border-box; }
  927. .el-form--label-top .el-form-item__label {
  928. padding: 0;
  929. }
  930. .el-form-item {
  931. margin-bottom: 8px;
  932. }
  933. .el-input-number .el-input__inner {
  934. padding: 0 34px 0 4px;
  935. }
  936. .target-other-name .el-input__inner {
  937. padding: 0 30px 0 5px !important;
  938. height: 40px !important;
  939. line-height: 40px !important;
  940. }
  941. .el-color-picker--mini .el-color-picker__trigger {
  942. width: 60px;
  943. height: 25px;
  944. padding: 0;
  945. }
  946. .el-color-picker--mini .el-color-picker__mask {
  947. width: 60px;
  948. height: 25px;
  949. }
  950. .slide-icon {
  951. padding: 20px 0;
  952. /* display: block; */
  953. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
  954. border-radius: 5px;
  955. cursor: pointer;
  956. position: absolute;
  957. top: 50%;
  958. transform: translateY(-50%);
  959. z-index: 99;
  960. &:hover {
  961. background-color: rgba(0, 0, 0, 0.05);
  962. }
  963. &.slide-left {
  964. right: 0;
  965. }
  966. &.slide-right {
  967. left: 0;
  968. }
  969. }
  970. .left-cont {
  971. width: 400px;
  972. min-width: 300px;
  973. background: #fff;
  974. margin-right: 20px;
  975. border: 1px solid #ececec;
  976. border-radius: 4px;
  977. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
  978. height: calc(100vh - 113px);
  979. overflow: hidden;
  980. position: relative;
  981. box-sizing: border-box;
  982. .left-top {
  983. padding: 15px 20px;
  984. border: 1px solid #ececec;
  985. box-shadow: 0px 3px 6px rgba(167, 167, 167, 0.09);
  986. }
  987. .left-min {
  988. padding: 30px 20px;
  989. max-height: calc(100vh - 194px);
  990. overflow-y: auto;
  991. .search-cont {
  992. color: #606266;
  993. }
  994. .xaxis-range-cont{
  995. color: #606266;
  996. margin-top: 20px;
  997. .xaxis-range-tip{
  998. display: flex;
  999. align-items: center;
  1000. justify-content: flex-start;
  1001. .hint-message{
  1002. font-size: 15px;
  1003. line-height: 22px;
  1004. }
  1005. }
  1006. .legend-set-text{
  1007. font-size: 15px;
  1008. color: #1B7BDE;
  1009. display: inline-flex;
  1010. align-items: center;
  1011. justify-content: flex-start;
  1012. margin-top: 20px;
  1013. cursor: pointer;
  1014. img{
  1015. height: 16px;
  1016. margin-left: 5px;
  1017. }
  1018. }
  1019. }
  1020. .targetset-cont {
  1021. padding: 30px 0 20px;
  1022. .el-input__inner {
  1023. height: 27px;
  1024. line-height: 27px;
  1025. padding: 0 4px;
  1026. }
  1027. .el-collapse-item.is-disabled .el-collapse-item__header {
  1028. color: #333;
  1029. }
  1030. .target-list {
  1031. border: 1px solid #DCDFE6;
  1032. .del-icon {
  1033. position: absolute;
  1034. right: 10px;
  1035. font-size: 16px;
  1036. color: #f00;
  1037. cursor: pointer;
  1038. }
  1039. .setting-cont {
  1040. padding: 20px 20px 0;
  1041. li {
  1042. padding-bottom: 20px;
  1043. margin-bottom: 20px;
  1044. border-bottom: 1px solid #DCDFE6;
  1045. &:last-child {
  1046. padding-bottom: 0;
  1047. margin-bottom: 0;
  1048. border-bottom: none;
  1049. }
  1050. }
  1051. }
  1052. }
  1053. .el-collapse-item__header {
  1054. background-color: #F0F2F5;
  1055. margin-bottom: 0;
  1056. border-bottom: 1px solid #DCDFE6;
  1057. padding: 0 30px;
  1058. .el-collapse-item__arrow {
  1059. position: absolute;
  1060. left: 8px;
  1061. }
  1062. }
  1063. .scatter-setting {
  1064. display: flex;
  1065. margin-bottom: 20px;
  1066. }
  1067. }
  1068. }
  1069. .move-btn {
  1070. height: 100%;
  1071. width: 4px;
  1072. position: absolute;
  1073. right: 0px;
  1074. top: 0;
  1075. &:hover {
  1076. cursor: col-resize;
  1077. }
  1078. }
  1079. }
  1080. .right-cont {
  1081. width: 80%;
  1082. .mx-datepicker {
  1083. width: 220px !important;
  1084. }
  1085. /* =================== */
  1086. .chart-min-cont {
  1087. background: #fff;
  1088. border: 1px solid #ececec;
  1089. height: calc(100vh - 118px);
  1090. overflow: auto;
  1091. /* overflow: hidden; */
  1092. border-radius: 4px;
  1093. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
  1094. .cont-top {
  1095. padding: 12px 30px;
  1096. border-bottom: 1px solid #ececec;
  1097. display: flex;
  1098. justify-content: space-between;
  1099. align-items: center;
  1100. box-shadow: 0px 3px 6px rgba(167, 167, 167, 0.09);
  1101. .top-left {
  1102. .year-btn {
  1103. margin-right: 5px;
  1104. margin-bottom: 5px;
  1105. }
  1106. .btn-sty {
  1107. border: 1px solid #409eff;
  1108. }
  1109. .date-setting{
  1110. border: 1px solid #DCDFE6;
  1111. border-radius: 4px;
  1112. cursor: pointer;
  1113. color: #333333;
  1114. line-height: 16px;
  1115. }
  1116. }
  1117. .top-right {
  1118. font-size: 16px;
  1119. .join_txt {
  1120. color: #409eff;
  1121. cursor: pointer;
  1122. &:hover {
  1123. text-decoration: underline;
  1124. }
  1125. }
  1126. .collected {
  1127. color: #f00;
  1128. cursor: pointer;
  1129. &:hover {
  1130. text-decoration: underline;
  1131. }
  1132. }
  1133. .span-item {
  1134. color: #409eff;
  1135. cursor: pointer;
  1136. &:hover {
  1137. text-decoration: underline;
  1138. }
  1139. .el-icon-collection,
  1140. .el-icon-document-copy {
  1141. color: #409eff;
  1142. }
  1143. }
  1144. }
  1145. }
  1146. .cont-bottom {
  1147. padding: 20px 30px;
  1148. /* height: calc(100vh - 250px);
  1149. overflow: auto; */
  1150. .el-input__inner {
  1151. height: 27px;
  1152. line-height: 27px;
  1153. padding: 0 4px;
  1154. }
  1155. .el-input-number .el-input__inner {
  1156. padding: 0 34px 0 4px;
  1157. }
  1158. .highcharts-range-selector-group {
  1159. display: none;
  1160. .highcharts-input-group {
  1161. display: none;
  1162. }
  1163. }
  1164. .highcharts-axis-title {
  1165. display: block;
  1166. }
  1167. /* =================== */
  1168. .chart-show-cont {
  1169. min-height: 300px;
  1170. padding: 0 150px 60px 120px;
  1171. position: relative;
  1172. .chart-title {
  1173. font-size: 16px;
  1174. font-weight: normal;
  1175. text-align: center;
  1176. margin-bottom: 10px;
  1177. }
  1178. .chart-author {
  1179. font-size: 14px;
  1180. color: #333;
  1181. position: absolute;
  1182. bottom: 20px;
  1183. right: 50px;
  1184. }
  1185. .chartWrapper {
  1186. position: relative;
  1187. .range-cont {
  1188. position: absolute;
  1189. top: 15%;
  1190. .min-data-input {
  1191. width: 60px;
  1192. display: block;
  1193. }
  1194. &.left {
  1195. left: -80px;
  1196. }
  1197. &.right {
  1198. right: -65px;
  1199. }
  1200. &.rightTwo {
  1201. right: -130px;
  1202. }
  1203. &.bottom {
  1204. width: 100%;
  1205. display: flex;
  1206. justify-content: space-between;
  1207. top: auto;
  1208. right: 0;
  1209. bottom: -2%;
  1210. .left {
  1211. width: 60px;
  1212. display: block;
  1213. flex-shrink: 0;
  1214. }
  1215. }
  1216. }
  1217. }
  1218. }
  1219. .options-cont {
  1220. display: flex;
  1221. flex-wrap: wrap;
  1222. justify-content: space-between;
  1223. }
  1224. }
  1225. }
  1226. .nodata {
  1227. height: calc(100vh - 120px);
  1228. background-color: #fff;
  1229. text-align: center;
  1230. font-size: 16px;
  1231. color: #666;
  1232. padding: 100px 0;
  1233. }
  1234. @media screen and (min-width: 1711px){
  1235. .min-data-input {
  1236. margin-top: 310px;
  1237. }
  1238. .btn-sty {
  1239. padding: 10px;
  1240. }
  1241. .year-btn,.btn-sty {
  1242. font-size: $font-normal;
  1243. }
  1244. .date-setting{
  1245. width: 210px;
  1246. height: 40px;
  1247. padding: 12px;
  1248. font-size: $font-normal;
  1249. }
  1250. }
  1251. @media screen and (max-width: 1710px){
  1252. .min-data-input {
  1253. margin-top: 230px;
  1254. }
  1255. .year-btn {
  1256. font-size: $font-small;
  1257. margin-left: 5px;
  1258. margin-right: 5px;
  1259. margin-bottom: 5px;
  1260. padding: 6px 12px;
  1261. }
  1262. .btn-sty {
  1263. font-size: $font-small;
  1264. margin-left: 5px;
  1265. padding: 6px;
  1266. border: 1px solid #409eff;
  1267. }
  1268. .date-setting{
  1269. width: 180px;
  1270. height: 36px;
  1271. padding: 10px;
  1272. font-size: $font-small;
  1273. }
  1274. }
  1275. }
  1276. .expand-wrap{
  1277. display: flex;
  1278. justify-content: center;
  1279. align-items: center;
  1280. gap:30px;
  1281. .el-checkbox{
  1282. margin-right: 15px;
  1283. }
  1284. .el-input{
  1285. width:100px;
  1286. height:27px;
  1287. line-height: 27px;
  1288. .el-input__icon{
  1289. line-height: 27px;
  1290. }
  1291. }
  1292. }
  1293. }
  1294. </style>
  1295. <style lang="scss">
  1296. .edb-item-style .el-input__icon {
  1297. line-height: 27px;
  1298. }
  1299. /*他不要下拉选择框 QAQ */
  1300. .x-range-picker-date {
  1301. display: none;
  1302. }
  1303. </style>