predictEdb.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865
  1. <template>
  2. <div class="predictEdb-container" >
  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="predict-edb-main" id="box">
  11. <div class="main-left left" id="left" v-show="!isSlideLeft">
  12. <div class="datasheet_top">
  13. <el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_addEdb"
  14. type="primary" @click="addEdbHandle"><!-- 添加指标 -->{{$t('EtaBasePage.add_edb_btn')}}</el-button>
  15. <el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_calcuEdb"
  16. type="primary" @click="addComputedHandler" style="margin-right:10px;"><!-- 计算指标 -->{{$t('EtaBasePage.calculation_edb_btn')}}</el-button>
  17. <!-- <change-lang v-permission="permissionBtn.predictEdbPermission.edbPreData_switchEn"
  18. :lang="currentLang" style="height: 32px;" @changeLang="changeLangHandle"/> -->
  19. </div>
  20. <div class="search-cont" v-loading="searchLoading">
  21. <el-select
  22. v-model="search_txt"
  23. ref="searchRef"
  24. :filterable="!search_txt"
  25. remote
  26. clearable
  27. :placeholder="$t('Edb.InputHolderAll.input_name')"
  28. style="width: 100%"
  29. :remote-method="searchHandle"
  30. @focus="searchHandle('')"
  31. >
  32. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  33. <el-option
  34. v-for="item in searchOptions"
  35. :key="item.EdbInfoId"
  36. :label="currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
  37. :value="item.EdbInfoId"
  38. >
  39. <span>{{ currentLang==='en' ? (item.EdbNameEn||item.EdbName) : item.EdbName }}</span>
  40. </el-option>
  41. </el-select>
  42. </div>
  43. <div style="margin:20px 0;padding:0 20px;display:flex;justify-content:space-between">
  44. <span><!-- 目录 -->{{$t('Common.category')}}</span>
  45. <el-checkbox v-model="isOnlyMe" v-permission="permissionBtn.predictEdbPermission.edbPreData_isOnlyMine"
  46. @change="onlyMeHandler"><!-- 只看我的 -->{{$t('PredictEdbPage.only_see_mine')}}</el-checkbox>
  47. </div>
  48. <div class="tree-cont">
  49. <div class="target_tree">
  50. <el-tree
  51. ref="treeRef"
  52. :data="treeData"
  53. node-key="UniqueCode"
  54. :props="defaultProp"
  55. :allow-drag="canDragHandle"
  56. :allow-drop="canDropHandle"
  57. :current-node-key="select_node"
  58. :default-expanded-keys="defaultShowNodes"
  59. :draggable="isEdbBtnShow('edbPreData_classifyOpt_move')"
  60. :expand-on-click-node="false"
  61. check-strictly
  62. :empty-text="$t('Common.no_classify_msg')"
  63. lazy
  64. :load="getLazyTreeData"
  65. @node-expand="handleNodeExpand"
  66. @node-collapse="handleNodeCollapse"
  67. @current-change="nodeChange"
  68. @node-drop="dropOverHandle"
  69. @node-drag-end="dropMouseLeave"
  70. @node-drag-leave="dropMouseLeave"
  71. @node-drag-enter="dropMouseOver"
  72. >
  73. <span class="custom-tree-node" slot-scope="{ node, data }">
  74. <el-input
  75. ref="editVal"
  76. style="width: 90px"
  77. placeholder="请输入值"
  78. class="label-input"
  79. v-model="new_label"
  80. v-if="data.isEdit"
  81. @blur="changeValue(data)"
  82. />
  83. <span
  84. @dblclick.stop="editNodeLabel(data)"
  85. v-else
  86. class="text_oneLine node_label"
  87. :style="`width:${
  88. (select_node === data.UniqueCode && node.Nodewidth) || ''
  89. }`"
  90. :id="`node${data.UniqueCode}`"
  91. >
  92. <span>{{ currentLang==='en' ? (data.ClassifyNameEn||data.ClassifyName) : data.ClassifyName }}</span>
  93. </span>
  94. <span
  95. style="display: flex; align-items: center"
  96. v-if="select_node === data.UniqueCode"
  97. >
  98. <img
  99. src="~@/assets/img/data_m/move_ico.png"
  100. alt=""
  101. style="width: 14px; height: 14px; margin-right: 8px"
  102. v-if="data.Button.MoveButton"
  103. />
  104. <!-- 添加子项 -->
  105. <img
  106. src="~@/assets/img/set_m/add.png"
  107. alt=""
  108. style="width: 14px; height: 14px; margin-right: 8px"
  109. @click.stop="addNode(node, data)"
  110. v-if="data.Button.AddButton&&!data.EdbInfoId&&isEdbBtnShow('edbPreData_classifyOpt_add')&&node.level<6"
  111. />
  112. <!-- 编辑目录 -->
  113. <img
  114. src="~@/assets/img/set_m/edit.png"
  115. alt=""
  116. style="width: 15px; height: 14px; margin-right: 8px"
  117. @click.stop="editNode(node, data)"
  118. v-if="data.Button.OpButton&&!data.EdbInfoId&&isEdbBtnShow('edbPreData_classifyOpt_add')"
  119. />
  120. <!-- 删除目录 -->
  121. <img
  122. slot="reference"
  123. src="~@/assets/img/set_m/del.png"
  124. alt=""
  125. style="width: 14px; height: 14px"
  126. @click.stop="removeNode(node, data)"
  127. v-if="data.Button.DeleteButton&&!data.EdbInfoId&&isEdbBtnShow('edbPreData_classifyOpt_delete')"
  128. />
  129. <!-- 查看预测规则 -->
  130. <i class="el-icon-view" v-if="data.EdbInfoId&&isEdbBtnShow('edbPreData_checkPreRule')" @click.stop="viewNode(node,data)"></i>
  131. <!-- 查看关联图表 -->
  132. <img
  133. v-if="data.Button.ShowChartRelation&&isEdbBtnShow('edbPreData_checkRelatedChart')"
  134. @click.stop="showAssociateChart=true,showAssociateComputeData=false"
  135. src="~@/assets/img/icons/associate_chart.png"
  136. style="width: 14px; height: 14px;margin-left: 8px"
  137. alt=""
  138. />
  139. <!-- 查看关联指标 -->
  140. <img
  141. v-if="data.Button.ShowEdbRelation&&isEdbBtnShow('edbPreData_checkRelatedEdb')"
  142. @click.stop="showAssociateComputeData=true,showAssociateChart=false"
  143. src="~@/assets/img/icons/associate_data.png"
  144. style="width: 14px; height: 14px;margin-left: 8px"
  145. alt=""
  146. />
  147. </span>
  148. </span>
  149. </el-tree>
  150. </div>
  151. <div
  152. class="noDepart"
  153. @click="addLevelOneHandle"
  154. v-if="opLevelOneClassify&&isEdbBtnShow('edbPreData_classifyOpt_add')"
  155. >
  156. <img
  157. src="~@/assets/img/set_m/add_ico.png"
  158. alt=""
  159. style="width: 16px; height: 16px; margin-right: 10px"
  160. />
  161. <span><!-- 添加一级目录 -->{{$t('EtaBasePage.add_first_menu_btn')}}</span>
  162. </div>
  163. </div>
  164. <span
  165. class="move-btn resize"
  166. v-drag
  167. id="resize"
  168. @mousemove="dynamicNode && resetNodeStyle(dynamicNode)"
  169. ></span>
  170. <span class="slide-icon slide-left" @click="isSlideLeft = !isSlideLeft">
  171. <i class="el-icon-d-arrow-left"></i>
  172. </span>
  173. </div>
  174. <div class="main-right" id="right" :style="isSlideLeft ? 'width:100%' : 'width:80%'"
  175. :class="{'detail-main':select_id&&!showAssociateChart&&!showAssociateComputeData}"
  176. >
  177. <!-- 详情 -->
  178. <div class="edb-detail-wrapper main-min-width" v-if="select_id&&!showAssociateChart&&!showAssociateComputeData">
  179. <div class="detail-header">
  180. <el-tabs v-model="activeTab" @tab-click="changeShowType">
  181. <el-tab-pane :label="$t('Edb.trend_chart_tab')" name="Chart">
  182. </el-tab-pane>
  183. <el-tab-pane :label="$t('Edb.data_detail_tab')" name="Data">
  184. </el-tab-pane>
  185. </el-tabs>
  186. <div class="edb-tool-icon edb-tool" style="align-items: center;">
  187. <el-button
  188. v-permission="permissionBtn.predictEdbPermission.edbPreData_update"
  189. type="text"
  190. @click="updateEdbPartHandle"
  191. ><!-- 刷新 -->{{$t('Edb.detail_refresh_btn')}}</el-button>
  192. <el-button
  193. type="text"
  194. @click="editEdbHandle('')"
  195. v-if="edbButton.OpButton&&isEdbBtnShow('edbPreData_edit')"
  196. ><!-- 编辑 -->{{$t('Edb.detail_edit_btn')}}</el-button>
  197. <el-button
  198. type="text"
  199. @click="saveEdbHandle"
  200. v-if="detail_show_chart&&isEdbBtnShow('edbPreData_save')"
  201. ><!-- 保存 -->{{$t('Edb.detail_save_btn')}}</el-button>
  202. <el-button
  203. v-permission="permissionBtn.predictEdbPermission.edbPreData_edbSource"
  204. type="text"
  205. @click="toHistoryPage(select_id,$route.matched);lookEdbId=select_id"
  206. ><!-- 指标溯源 -->{{$t('Edb.detail_trace_btn')}}</el-button>
  207. <el-popover
  208. v-if="showPopover"
  209. placement="bottom-end"
  210. trigger="hover"
  211. popper-class="edb-tool-popover"
  212. width="300" style="display: inline-block;"
  213. >
  214. <div class="edb-tool-wrap">
  215. <el-button
  216. v-permission="permissionBtn.predictEdbPermission.edbPreData_enNameSetting"
  217. type="text"
  218. @click="clickEdbNameHandle"
  219. v-if="currentLang==='ch'||!edb_nameEn"
  220. >
  221. {{$t('Edb.detail_en_btn')}}<!-- 设置英文名称 -->
  222. </el-button>
  223. <el-button
  224. v-permission="permissionBtn.predictEdbPermission.edbPreData_recalcu"
  225. type="text"
  226. @click="updateEdbHandle"
  227. >{{$t('Edb.detail_recalculate_btn')}}<!-- 重新计算 --></el-button>
  228. <el-button
  229. class="deletesty"
  230. @click="delEdbHandle"
  231. type="text"
  232. v-if="edbButton.DeleteButton&&isEdbBtnShow('edbPreData_del')"
  233. >{{$t('Edb.detail_del_btn')}}<!-- 删除 --></el-button>
  234. <el-button
  235. v-permission="permissionBtn.predictEdbPermission.edbPreData_copyData"
  236. type="text"
  237. @click="copyData"
  238. >{{$t('Edb.detail_copydata_btn')}}<!-- 复制数据 --></el-button>
  239. </div>
  240. <div class="edb-btn" slot="reference">
  241. <el-button type="text">{{$t('Edb.detail_more_btn')}}<!-- 更多操作 --></el-button>
  242. <i class="el-icon-more" style="font-size: 14px;transform: rotate(90deg);cursor: pointer;color: #3375e1;"/>
  243. </div>
  244. </el-popover>
  245. </div>
  246. </div>
  247. <!-- -->
  248. <div class="detail-wrap">
  249. <component
  250. :is="detail_show_chart?'edbDetail':'childData'"
  251. :id="select_id"
  252. :lang="currentLang"
  253. :isAllowEditLimit="isEdbBtnShow('edbPreData_editLimit')"
  254. ref="detailComponentRef"
  255. @updateTit="setNameBack"
  256. @setCurrentClassify="setCurrentClassify"
  257. @setOpera="(obj) => { edbButton = obj }"
  258. @openEnNameDia="openEnNameDia"
  259. />
  260. </div>
  261. </div>
  262. <!-- 列表 -->
  263. <div class="sheet-list-cont" v-else-if="!select_id">
  264. <div class="list-top">
  265. <span>{{$t('PredictEdbPage.total_list_view',{limit: edb_total})}} </span>
  266. </div>
  267. <div
  268. class="edbChartList-wrapper"
  269. ref="listRef"
  270. @scroll="loadMoreHandle"
  271. >
  272. <div class="chart-list-item-wrap">
  273. <div class="sheet-item" v-for="item in edbChartList" :key="item.EdbInfoId">
  274. <div class="item-top">
  275. <span class="text_oneLine">{{ currentLang === 'en' ? (item.EdbNameEn||item.EdbName) : item.EdbName }}</span>
  276. </div>
  277. <div class="chart-img" @click="detailShowHandle(item)"
  278. :style="item.ChartImage?{background: `no-repeat top/cover url('${item.ChartImage}')`}:{}"></div>
  279. <div class="item-bottom">
  280. <span>{{$t('Common.create_time')}}: {{ item.CreateTime.slice(0,10) }}</span>
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. <div v-if="!edb_total" class="nodata">
  286. <tableNoData :text="$t('Table.no_edb_msg')"/>
  287. </div>
  288. </div>
  289. <!-- 指标关联图模块 -->
  290. <div class="edb-detail-wrapper" style="padding: 30px 20px;" v-if="showAssociateChart&&select_id">
  291. <dataAssociateChart :edbInfoId="select_id"></dataAssociateChart>
  292. </div>
  293. <div class="edb-detail-wrapper" style="padding: 30px 20px;" v-if="showAssociateComputeData&&select_id">
  294. <dataAssociateComputeData :edbInfoId="select_id"></dataAssociateComputeData>
  295. </div>
  296. </div>
  297. </div>
  298. <!-- 计算弹窗控制 -->
  299. <el-dialog
  300. :visible.sync="isOpenComputed"
  301. :close-on-click-modal="false"
  302. :modal-append-to-body='false'
  303. @close="isOpenComputed=false;"
  304. custom-class="dialog-computed"
  305. top="6vh"
  306. center
  307. width="85vw"
  308. v-dialogDrag>
  309. <div class="dialog-computed-header">
  310. <el-radio-group v-model="computed_source" size="medium" @change="computed_type = 0">
  311. <el-radio-button :label="1"><!-- 常规计算 -->{{$t('EtaBasePage.normal_calculate_tab')}}</el-radio-button>
  312. <el-radio-button :label="2"><!-- 批量计算 -->{{$t('EtaBasePage.batch_calculate_tab')}}</el-radio-button>
  313. </el-radio-group>
  314. </div>
  315. <ul class="computed-ul">
  316. <li
  317. :class="['cpmputed-li',{'act':item.type === computed_type}]"
  318. v-for="item in computedTypes"
  319. :key="item.type"
  320. @click="changeComputedType(item.type)"
  321. >
  322. {{item.name}}
  323. <el-popover
  324. placement="top-start"
  325. width="450"
  326. trigger="hover"
  327. v-if="tips.get(item.type)"
  328. >
  329. <p style="padding:20px;line-height:25px;" v-html="tips.get(item.type)"/>
  330. <i slot="reference" class="el-icon-warning-outline"/>
  331. </el-popover>
  332. </li>
  333. </ul>
  334. </el-dialog>
  335. <!-- 指标弹窗 -->
  336. <edb-dialog
  337. :isShow.sync="isEdbDia"
  338. :title="edbdia_title"
  339. :edbForm="edbForm"
  340. @successHandle="handleEdbCallBack"
  341. />
  342. <!-- 分类弹窗 -->
  343. <edbClassifyDia
  344. :isOpenDialog.sync="classifyDia"
  345. :title="dialog_title"
  346. :form="classifyForm"
  347. @successCallback="getTreeData"
  348. />
  349. <!-- 输入英文指标弹窗 -->
  350. <set-en-name-dia
  351. :isOpenDialog="setEnName"
  352. @cancel="setEnName=false"
  353. :formData="formItemArray"
  354. @updateEnName="updateEnName"
  355. cType="predictEbd"
  356. />
  357. <!-- 运算指标弹窗 -->
  358. <computedDialog
  359. :isOpenComputed="computed_type === 31"
  360. edbSource="predict"
  361. :title="computedTit"
  362. :calulateForm="calulateForm"
  363. :calulateList="calulateList"
  364. @cancel="computed_type=0"
  365. @addCallBack="addComputedCallBack"
  366. @openPrev="isOpenComputed=true"
  367. @lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
  368. />
  369. <!-- 同比同差计算弹窗 -->
  370. <!-- 转月值 同比 同差 平均值弹窗 -->
  371. <operationDialog
  372. :isOperation="[42,32,33,39,43,44,45,46,49,54,55,64,65,66,69,70].includes(computed_type) && computed_source===1"
  373. :type="computed_type"
  374. :operationForm="operationForm"
  375. @cancel="computed_type=0"
  376. @addCallBack="addComputedCallBack"
  377. @openPrev="isOpenComputed=true"
  378. @lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
  379. @changeSource="changeComputedType"
  380. />
  381. <!-- 规则详情弹窗 -->
  382. <rules-detail
  383. :isOpenDialog.sync="isShowRuleDialog"
  384. :rules="showRules"
  385. :fromEdbInfo="showFromEdbInfo"
  386. />
  387. <!-- 批量计算弹窗 -->
  388. <batchComputedDialog
  389. :isBatchComputed="[32,33,39,43,44,45,42,64,65,66].includes(computed_type) && computed_source===2"
  390. :type="computed_type"
  391. edbSource="predict"
  392. @cancel="computed_type=0"
  393. @addCallBack="addComputedCallBack"
  394. @openPrev="isOpenComputed=true"
  395. @lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
  396. @changeSource="changeComputedType"
  397. />
  398. <!-- 拼接弹窗 -->
  399. <joint-target-dia
  400. :isShow="computed_type === 'joint'"
  401. :params="operationForm"
  402. :isPredict="true"
  403. @cancel="computed_type=0"
  404. @addCallBack="addComputedCallBack"
  405. @openPrev="isOpenComputed=true"
  406. />
  407. <!-- 拟合残差弹窗 -->
  408. <fittingResidueDia
  409. :isShow="computed_type === 50"
  410. :type="50"
  411. :operationForm="operationForm"
  412. :isPredict="true"
  413. @cancel="computed_type=0"
  414. @addCallBack="addComputedCallBack"
  415. @openPrev="isOpenComputed=true"
  416. />
  417. <!-- 扩散指数弹窗 -->
  418. <diffusionIndexDialog
  419. :isShow="computed_type === 56 && computed_source===1"
  420. :type="computed_type"
  421. :isPredict="true"
  422. :operationForm="operationForm"
  423. @cancel="computed_type=0"
  424. @addCallBack="addComputedCallBack"
  425. @openPrev="isOpenComputed=true"
  426. />
  427. <!-- 指标历史记录 -->
  428. <!-- <edbHistoryDialog
  429. :isOpenDialog.sync="isLookHistory"
  430. :edbId="lookEdbId"
  431. /> -->
  432. <!-- 指数修匀弹窗 -->
  433. <SmoothEdbDialog
  434. :is-open-smooth="computed_type==='alpha'"
  435. :computed-source="computed_source"
  436. :operationForm="operationForm"
  437. :isPredict="true"
  438. @cancel="computed_type=0"
  439. @openPrev="isOpenComputed=true"
  440. @addCallBack="addComputedCallBack"
  441. @lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
  442. />
  443. </div>
  444. </template>
  445. <script>
  446. import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
  447. import { dataBaseInterface } from '@/api/api.js';
  448. import leftMixin from './mixins/mixin';
  449. import edbDialog from './components/edbDia.vue'
  450. import childData from './components/childData.vue'
  451. import edbDetail from './components/edbDetail.vue'
  452. import edbClassifyDia from './components/classifyDia.vue'
  453. import changeLang from "@/views/dataEntry_manage/components/changeLang.vue"
  454. import setEnNameDia from "@/views/dataEntry_manage/components/setEnNameDia.vue"
  455. import computedDialog from '@/views/dataEntry_manage/databaseComponents/computedDialog';
  456. import operationDialog from './components/operationDialog';
  457. import rulesDetail from './components/rulesDetailDia.vue'
  458. import batchComputedDialog from '@/views/dataEntry_manage/databaseComponents/batchComptedDialog.vue';
  459. import jointTargetDia from '@/views/dataEntry_manage/databaseComponents/jointTargetDia'
  460. import fittingResidueDia from '@/views/dataEntry_manage/databaseComponents/fittingResidueDia.vue';
  461. import diffusionIndexDialog from '@/views/dataEntry_manage/databaseComponents/diffusionIndexDia.vue';
  462. import { formulaTip } from '@/views/dataEntry_manage/databaseComponents/util';
  463. import dataAssociateChart from '@/views/dataEntry_manage/databaseComponents/dataAssociateChart.vue'
  464. import dataAssociateComputeData from '@/views/dataEntry_manage/databaseComponents/dataAssociateComputeData.vue'
  465. import SmoothEdbDialog from '@/views/dataEntry_manage/databaseComponents/smoothEdbDialog.vue';
  466. export default {
  467. name:'',
  468. components: {
  469. edbDialog,
  470. childData,
  471. edbClassifyDia,
  472. changeLang,
  473. setEnNameDia,
  474. computedDialog,
  475. operationDialog,
  476. edbDetail,
  477. rulesDetail,
  478. jointTargetDia,
  479. fittingResidueDia,
  480. batchComputedDialog,
  481. diffusionIndexDialog,
  482. dataAssociateChart,
  483. dataAssociateComputeData,
  484. SmoothEdbDialog
  485. },
  486. mixins:[ leftMixin ],
  487. beforeRouteLeave (to, from, next) {
  488. // 前去编辑则存一次选择的节点
  489. if(to.path=='/editpredictEdb'){
  490. const obj={
  491. code:this.select_node,
  492. id:this.select_id
  493. }
  494. sessionStorage.setItem('predictEdbTreeData',JSON.stringify(obj))
  495. }else{
  496. sessionStorage.setItem('predictEdbTreeData','')
  497. }
  498. next()
  499. },
  500. data () {
  501. return {
  502. showData: false,
  503. search_txt: '',
  504. searchOptions:[],
  505. isSlideLeft: false,//左侧分类收起
  506. select_node: '',//节点唯一标识code
  507. select_classify: '',
  508. new_label:'',//双击修改的value
  509. treeData: [], //分类数据
  510. defaultShowNodes: [], //展开节点
  511. defaultProp: {
  512. label: 'ClassifyName',
  513. children: 'Children',
  514. isLeaf:'isLeaf'
  515. }, //树结构配置项
  516. dynamicNode: null,
  517. edbName: '',
  518. edb_nameEn: '',
  519. edbUserId: '',
  520. /* 分类弹窗 */
  521. dialog_title:'',
  522. classifyDia: false, //
  523. classifyForm: {},
  524. /* 添加指标弹窗 */
  525. isEdbDia: false,
  526. edbdia_title:'',
  527. edbForm: {},
  528. select_id: '',//选中的id
  529. sheetDetailInfo: {},
  530. detail_show_chart: true,//详情展示方式 chart data
  531. /* 列表 */
  532. publicHaveMove: true,//是否还有列表数据
  533. edbChartList: [],
  534. edb_total: 0,
  535. public_page: 1,
  536. public_pages_size: 16,
  537. currentLang:'ch', // ch(中文) en(英文)
  538. setEnName:false,
  539. // 传入的formItem所需内容
  540. formItemArray:[],
  541. /* 计算指标弹窗 */
  542. isOpenComputed:false,
  543. computedTit:'',
  544. calulateForm:{},
  545. operationForm:{},
  546. calulateList:[],
  547. computed_type:0,//打开弹窗的类型
  548. tips: new Map([
  549. [31,formulaTip.get(4)],
  550. [42,formulaTip.get(5)],
  551. [32,formulaTip.get(6)],
  552. [33,formulaTip.get(7)],
  553. [39,formulaTip.get(8)],
  554. [43,formulaTip.get(12)],
  555. [44,formulaTip.get(13)],
  556. [45,formulaTip.get(14)],
  557. ['joint',formulaTip.get('joint')],
  558. [46,formulaTip.get(22)],
  559. [49,formulaTip.get(35)],
  560. [50,formulaTip.get(37)],
  561. [54,formulaTip.get(51)],
  562. [55,formulaTip.get(52)],
  563. [56,formulaTip.get(53)],
  564. ['toMonthSeason',formulaTip.get('toMonthSeason')],
  565. ['accumulate',formulaTip.get('accumulate')],
  566. [64,formulaTip.get(61)],
  567. [65,formulaTip.get(62)],
  568. [66,formulaTip.get(63)],
  569. ['alpha',formulaTip.get('alpha')]
  570. ]),//公式说明
  571. isShowRuleDialog: false,
  572. showRules: [],
  573. showFromEdbInfo: {},
  574. edbButton: {},//详情操作
  575. opLevelOneClassify: false,//一级分类按钮
  576. computed_source: 1,//计算类型 1常规 2批量
  577. isBatchComputed: false,//批量计算弹窗
  578. baseTypes: [
  579. { name: this.$t('Edb.CalculatesAll.calculate')/* '指标运算' */,type: 31 },
  580. { name: this.$t('Edb.CalculatesAll.on_year')/* '同比值' */,type: 32 },
  581. { name: this.$t('Edb.CalculatesAll.differ')/* '同差值' */,type: 33 },
  582. { name: this.$t('Edb.CalculatesAll.n_move_average')/* 'N数值移动平均计算' */,type: 39 },
  583. { name: this.$t('Edb.CalculatesAll.to_month_quarter')/* '累计值转月/季值' */,type: 'toMonthSeason' },
  584. { name: this.$t('Edb.CalculatesAll.n_rate')/* 'N数值环比值' */,type: 43 },
  585. { name: this.$t('Edb.CalculatesAll.n_differ')/* 'N数值环差值' */,type: 44 },
  586. { name: this.$t('Edb.CalculatesAll.up_conver')/* '升频' */,type: 45 },
  587. // { name: '指标拼接',type: 'joint' },
  588. { name: this.$t('Edb.CalculatesAll.time_move')/* '时间移位' */,type: 46 },
  589. { name: this.$t('Edb.CalculatesAll.super_season')/* '超季节性' */,type: 49 },
  590. { name: this.$t('Edb.CalculatesAll.fit_residu')/* '拟合残差' */,type: 50 },
  591. { name: this.$t('Edb.CalculatesAll.annual')/* '年化' */,type: 55 },
  592. { name: this.$t('Edb.CalculatesAll.down_conver')/* '降频' */,type: 54 },
  593. { name: this.$t('Edb.CalculatesAll.diff_index')/* '扩散指数' */,type: 56 },
  594. { name: this.$t('Edb.CalculatesAll.cumulate')/* '累计值' */,type: 'accumulate' },
  595. { name: this.$t('Edb.CalculatesAll.ex_smooth')/* '指数修匀' */,type:'alpha'}
  596. ],
  597. batchTypes: [
  598. { name: this.$t('Edb.CalculatesAll.on_year')/* '同比值' */,type: 32 },
  599. { name: this.$t('Edb.CalculatesAll.differ')/* '同差值' */,type: 33 },
  600. { name: this.$t('Edb.CalculatesAll.n_move_average')/* 'N数值移动平均计算' */,type: 39 },
  601. { name: this.$t('Edb.CalculatesAll.n_rate')/* 'N数值环比值' */,type: 43 },
  602. { name: this.$t('Edb.CalculatesAll.n_differ')/* 'N数值环差值' */,type: 44 },
  603. { name: this.$t('Edb.CalculatesAll.up_conver')/* '升频' */,type: 45 },
  604. { name: this.$t('Edb.CalculatesAll.to_month_quarter')/* '累计值转月/季值' */,type: 'toMonthSeason' },
  605. { name: this.$t('Edb.CalculatesAll.cumulate')/* '累计值' */,type: 'accumulate' },
  606. { name: this.$t('Edb.CalculatesAll.ex_smooth')/* '指数修匀' */,type:'alpha'}
  607. ],
  608. isOnlyMe:false,//只看我的
  609. /* 查看历史弹窗 */
  610. isLookHistory: false,
  611. lookEdbId: 0,
  612. searchLoading:false,
  613. showAssociateChart:false,//显示指标关联的图
  614. showAssociateComputeData:false,//显示指标关联的引用计算指标
  615. activeTab:'',
  616. };
  617. },
  618. computed: {
  619. computedTypes() {
  620. return this.computed_source === 1 ? this.baseTypes : this.batchTypes;
  621. },
  622. role() {
  623. let role = localStorage.getItem('Role') || '';
  624. if(['rai_admin','ficc_admin'].includes(role)) {
  625. return 'admin'
  626. }
  627. else {
  628. return role;
  629. }
  630. },
  631. /* 登录角色id */
  632. roleId() {
  633. let id = parseInt(localStorage.getItem('AdminId'));
  634. return id;
  635. },
  636. showPopover(){
  637. return this.isEdbBtnShow('edbPreData_enNameSetting')||
  638. this.isEdbBtnShow('edbPreData_recalcu')||
  639. this.edbButton.DeleteButton&&this.isEdbBtnShow('edbPreData_del')||
  640. this.isEdbBtnShow('edbPreData_copyData')
  641. }
  642. },
  643. watch: {
  644. /* 设置动态右侧区域宽度 */
  645. isSlideLeft(newval) {
  646. if (!newval) {
  647. this.$nextTick(() => {
  648. this.reloadRightWid();
  649. });
  650. }
  651. },
  652. // /* 表格id */
  653. select_id(newval) {
  654. this.detail_show_chart = true;
  655. this.activeTab='Chart'
  656. this.$nextTick(()=>{
  657. //切换为曲线图 重置选择状态
  658. if(this.$refs.detailComponentRef){
  659. this.$refs.detailComponentRef.$refs.chartInfo.chartInfo.ChartType=1;
  660. this.$refs.detailComponentRef.$refs.chartInfo.year_select=10;
  661. this.$refs.detailComponentRef.$refs.chartInfo.year_select_season=20;
  662. this.$refs.detailComponentRef.$refs.chartInfo.calendar_type='公历';
  663. this.$refs.detailComponentRef.$refs.chartInfo.count_year=5;
  664. this.$refs.detailComponentRef.$refs.chartInfo.count_year_season=5;
  665. this.$refs.detailComponentRef.$refs.chartInfo.select_date=[];
  666. this.$refs.detailComponentRef.$refs.chartInfo.season_year=[];
  667. this.$refs.detailComponentRef.$refs.chartInfo.dateTip=this.$t('Chart.choose_time');
  668. }
  669. })
  670. },
  671. select_classify(newval) {
  672. if(this.$refs.listRef) this.$refs.listRef.scrollTop = 0;
  673. if(newval) {
  674. this.activeTab = ''
  675. this.public_page = 1;
  676. this.getPublicList()
  677. }
  678. },
  679. /* 搜索关键词 */
  680. search_txt(newval) {
  681. if(newval) {
  682. let search_obj = this.searchOptions.find(_ => _.EdbInfoId === newval);
  683. // let deep_arr = _.cloneDeep(this.treeData);
  684. // 查找图表的分类父级id
  685. // let arr = this.findParentNodeHandle(deep_arr, search_obj.ClassifyId).reverse(); // 父的父的父-父的父-父
  686. // this.defaultShowNodes = arr;
  687. this.select_node = search_obj.UniqueCode;
  688. this.$refs.treeRef.setCurrentKey(this.select_node);
  689. // 重置筛选状态
  690. this.select_id = newval;
  691. }
  692. }
  693. },
  694. methods: {
  695. isEdbBtnShow(type){
  696. const {predictEdbPermission,checkPermissionBtn}=this.permissionBtn
  697. return checkPermissionBtn(predictEdbPermission[type])||false
  698. },
  699. setCurrentClassify(ClassifyList){
  700. //获取指标详情后才能拿到准确的classifyId
  701. //根据准备的id查找指标的父级目录并展开
  702. console.log(ClassifyList);
  703. // 展开目录
  704. this.defaultShowNodes=ClassifyList.reverse().map(item=>item.UniqueCode)
  705. //滚动到高亮节点位置
  706. // this.$nextTick(()=>{
  707. setTimeout(() => {
  708. const dom = document.getElementById(`node${this.select_node}`)||{}
  709. const parentDom = document.getElementsByClassName('target_tree')[0];
  710. /* if (dom.offsetTop > parentDom.offsetHeight) {
  711. parentDom.scrollTo({
  712. top: dom.offsetTop - parentDom.offsetHeight / 2,
  713. left: 0,
  714. behavior: "smooth",
  715. });
  716. } */
  717. //parent可视区间:[scrollTop,scrollTop+offsetHeight]
  718. //node位置:node.offsetTop
  719. const overTop = dom.offsetTop+dom.clientHeight<parentDom.scrollTop
  720. const overBottom = dom.offsetTop+dom.clientHeight+30>parentDom.scrollTop+parentDom.offsetHeight
  721. if(overTop){
  722. parentDom.scrollTop = dom.offsetTop-30
  723. }
  724. if(overBottom){
  725. parentDom.scrollTop = dom.offsetTop - parentDom.offsetHeight/2
  726. }
  727. this.searchLoading = false;
  728. }, 1500);
  729. setTimeout(() => {
  730. this.$refs.treeRef.setCurrentKey(this.select_node);//设置高亮
  731. }, 1500);
  732. // })
  733. },
  734. setNameBack({edb_name,edb_nameEn,userid}) {
  735. this.edbName=edb_name;
  736. this.edb_nameEn= edb_nameEn;
  737. this.edbUserId=userid;
  738. },
  739. /* 添加指标 */
  740. addEdbHandle() {
  741. if(!this.treeData.length) return this.$message.warning('请先添加预测指标分类');
  742. this.$router.push({
  743. path:'/addpredictEdb'
  744. })
  745. },
  746. /* 获取分类 */
  747. getTreeData(params=null) {
  748. preDictEdbInterface.predictEdbCatalog({IsOnlyMe:this.isOnlyMe||false,ParentId:0}).then(res => {
  749. const { Ret,Data } = res;
  750. if(Ret !== 200) return
  751. this.treeData = Data.AllNodes || [];
  752. this.opLevelOneClassify = Data.CanOpClassify;
  753. this.currentLang = Data.Language === 'EN' ? 'en' : 'ch';
  754. this.showData = true;
  755. this.$nextTick(() => {
  756. /* 新增完成后 处理树展开和选中 */
  757. params && this.selectCurrentNode(params);
  758. });
  759. })
  760. },
  761. /* 搜索 */
  762. searchHandle(query) {
  763. if (query) {
  764. /* 查找列表 */
  765. preDictEdbInterface
  766. .edbSearch({
  767. Keyword: query,
  768. CurrentIndex: 1,
  769. PageSize: 10000,
  770. IsOnlyMe:this.isOnlyMe||false
  771. })
  772. .then((res) => {
  773. if (res.Ret !== 200) return
  774. this.searchOptions = res.Data.List || [];
  775. });
  776. } else {
  777. this.searchOptions = [];
  778. }
  779. },
  780. /* 选中分类变化时 */
  781. nodeChange({ UniqueCode,EdbInfoId,ClassifyId },node) {
  782. this.search_txt = '';
  783. this.select_node = UniqueCode;
  784. this.select_id = EdbInfoId || 0;
  785. this.select_classify = !EdbInfoId ? ClassifyId : 0;
  786. this.resetNodeStyle(node);
  787. this.dynamicNode = node;
  788. this.showAssociateChart=false
  789. this.showAssociateComputeData=false
  790. },
  791. async saveEdbHandle() {
  792. const {Ret} = await preDictEdbInterface.saveChartInfo({
  793. EdbInfoId: this.select_id,
  794. MaxValue: Number(this.$refs.detailComponentRef.$refs.chartInfo.tableData[0].MaxData),
  795. MinValue: Number(this.$refs.detailComponentRef.$refs.chartInfo.tableData[0].MinData)
  796. })
  797. if(Ret !== 200) return
  798. // this.$message.success('保存成功')
  799. this.$message.success(this.$t('MsgPrompt.saved_msg'))
  800. this.setChartImage()
  801. },
  802. /* 关联图片 */
  803. setChartImage() {
  804. let svg = this.$refs.detailComponentRef.$refs.chartInfo.$refs.chartRef.chart.getSVG({
  805. chart: {
  806. width: 340,
  807. height: 230,
  808. },
  809. });
  810. let form = new FormData();
  811. form.append("Img", svg);
  812. this.setImageHandle(form);
  813. },
  814. async setImageHandle(form) {
  815. let { Data } = await dataBaseInterface.uploadImgSvg(form);
  816. await preDictEdbInterface.setImg({
  817. EdbInfoId: this.select_id,
  818. ImageUrl: Data.ResourceUrl,
  819. });
  820. },
  821. /* 添加一级目录 */
  822. addLevelOneHandle() {
  823. this.dialog_title = '添加';
  824. this.classifyForm = {
  825. classify_name: '',
  826. Level:0,
  827. ParentId:0
  828. }
  829. this.classifyDia = true;
  830. },
  831. // 递归节点
  832. getNodeParentData(data,arr){
  833. if(data.level===0) return
  834. arr.push({classifyName:data.data.ClassifyName,classifyId:data.data.ClassifyId})
  835. this.getNodeParentData(data.parent,arr)
  836. return arr
  837. },
  838. addNode(node,{ClassifyName,ClassifyId}){
  839. this.dialog_title = '添加'
  840. let arr=[]
  841. arr=this.getNodeParentData(node,arr)
  842. /* 添加目录 */
  843. this.classifyForm = {
  844. classify_name:'',
  845. Level:node.level,
  846. ParentId:ClassifyId,
  847. parentArr:arr,
  848. }
  849. this.classifyDia = true;
  850. },
  851. /* 编辑节点 */
  852. editNode(node, { ClassifyName,ClassifyId,Level,ParentId}) {
  853. this.dialog_title = '编辑';
  854. let arr=[]
  855. arr=this.getNodeParentData(node.parent,arr)
  856. /* 编辑目录 */
  857. this.classifyForm = {
  858. classify_name: ClassifyName,
  859. classify_id: ClassifyId,
  860. Level:node.level-1,
  861. ParentId:ParentId,
  862. parentArr:arr,
  863. };
  864. this.classifyDia = true;
  865. },
  866. /* 删除节点校验 */
  867. async removeNode(node, { ClassifyId,EdbInfoId }) {
  868. const { Data } = await preDictEdbInterface.classifyDelCheck({ ClassifyId,EdbInfoId })
  869. const { DeleteStatus,TipsMsg } = Data;
  870. // DeleteStatus === 1
  871. // ? this.$confirm('该分类下关联指标不可删除', '删除失败', {
  872. // confirmButtonText: '知道了',
  873. // showCancelButton: false,
  874. // type: 'error',
  875. // }) : DeleteStatus === 0 && !EdbInfoId
  876. // ? this.$confirm('确定删除当前分类吗?', '提示', {
  877. // confirmButtonText: '确定',
  878. // cancelButtonText: '取消',
  879. // type: 'warning',
  880. // }).then(() => {
  881. // this.delApi(ClassifyId, EdbInfoId)
  882. // }): null;
  883. /**
  884. * 0 可删除
  885. * 1 关联指标
  886. * 2 有子目录无指标
  887. */
  888. const deleteLabelMap = {
  889. 1: '该目录关联指标不可删除',
  890. 2: '确认删除当前目录及包含的子目录吗?',
  891. 3: '当前指标已用作画图,不可删除',
  892. 4: TipsMsg
  893. }
  894. if([1,3,4].includes(DeleteStatus)) this.$confirm(
  895. deleteLabelMap[DeleteStatus],
  896. '删除失败',
  897. {
  898. confirmButtonText: '知道了',
  899. showCancelButton:false,
  900. type: 'error'
  901. })
  902. else if([0,2].includes(DeleteStatus)) this.$confirm(
  903. DeleteStatus === 2
  904. ? deleteLabelMap[DeleteStatus]
  905. : EdbInfoId?'删除后指标和指标值均不可使用,确认删除吗?':'确定删除当前目录吗?',
  906. '提示',
  907. {
  908. confirmButtonText: '确定',
  909. cancelButtonText: '取消',
  910. type: 'warning'
  911. }).then(() => {
  912. this.delApi(ClassifyId, EdbInfoId)
  913. }).catch(() => {
  914. });
  915. },
  916. /* 删除方法 */
  917. delApi(ClassifyId, EdbInfoId, type='') {
  918. preDictEdbInterface
  919. .classifyDel({
  920. ClassifyId,
  921. EdbInfoId,
  922. })
  923. .then((res) => {
  924. if (res.Ret !== 200) return
  925. this.$message.success(res.Msg);
  926. if (!res.Data.EdbInfoId || !res.Data) this.select_id = '';
  927. //删除表格后自动显示下一张表格
  928. type && res.Data.EdbInfoId
  929. ? this.getTreeData({
  930. code: res.Data.UniqueCode,
  931. id: res.Data.EdbInfoId,
  932. classifyId:res.Data.ClassifyId
  933. })
  934. : this.getTreeData();
  935. });
  936. },
  937. /* 删除指标 */
  938. delEdbHandle() {
  939. this.$confirm(this.$t('PredictEdbPage.del_edb_msg')/* 'ETA预测指标删除后不可恢复,确认删除吗?' */, this.$t('Dialog.warn_tit'), {
  940. confirmButtonText: /* '确定' */this.$t('Dialog.confirm_btn'),
  941. cancelButtonText: /* '取消' */this.$t('Dialog.cancel_btn'),
  942. type: 'warning',
  943. })
  944. .then(() => {
  945. this.delApi(
  946. this.select_classify || 0,
  947. this.select_id,
  948. 'del-edb'
  949. );
  950. })
  951. .catch(() => {});
  952. },
  953. /* 分类成功回调 */
  954. classifyCallback(type) {
  955. this.getTreeData();
  956. if (type === 'add') {
  957. //新增分类完成之后,展开父节点显示刚新增的分类,若已展开节点则不做处理
  958. let code = this.add_parent_id;
  959. let flag = this.defaultShowNodes.some(item => item === code);
  960. !flag && this.defaultShowNodes.push(code);
  961. this.add_parent_id = '';
  962. }
  963. },
  964. /* 展开对应菜单 显示详情 */
  965. detailShowHandle({ UniqueCode, EdbInfoId,ClassifyId}) {
  966. let params = {
  967. code: UniqueCode,
  968. id: EdbInfoId,
  969. classifyId:ClassifyId
  970. };
  971. this.selectCurrentNode(params);
  972. this.select_classify = 0;
  973. },
  974. /* 操作指标后 */
  975. handleEdbCallBack(param) {
  976. this.getTreeData(param)
  977. //编辑后刷数据
  978. if(!param) {
  979. console.log('编辑后刷数据');
  980. this.detail_show_chart ? this.$refs.detailComponentRef.getDetail('updateImg') : this.$refs.detailComponentRef.getData();
  981. }
  982. },
  983. /* 更新指标 */
  984. updateEdbHandle: _.debounce(function() {
  985. this.loading = this.$loading({
  986. lock: true,
  987. target:'.edb-detail-wrapper',
  988. text: this.$t('MsgPrompt.refresh_ing_msg'),
  989. spinner: 'el-icon-loading',
  990. background: 'rgba(255, 255, 255, 0.8)'
  991. });
  992. preDictEdbInterface.edbRefresh({
  993. EdbInfoId: this.select_id
  994. }).then(res => {
  995. this.loading.close();
  996. if(res.Ret !== 200) return
  997. this.$message.success(res.Msg)
  998. //更新完刷数据
  999. console.log('更新完刷数据');
  1000. this.detail_show_chart ? this.$refs.detailComponentRef.getDetail('updateImg') : this.$refs.detailComponentRef.getData();
  1001. })
  1002. },300),
  1003. /* 部分刷新 */
  1004. updateEdbPartHandle: _.debounce(function() {
  1005. this.loading = this.$loading({
  1006. lock: true,
  1007. target:'.edb-detail-wrapper',
  1008. text: this.$t('MsgPrompt.refresh_ing_msg'),
  1009. spinner: 'el-icon-loading',
  1010. background: 'rgba(255, 255, 255, 0.8)'
  1011. });
  1012. preDictEdbInterface.edbPartRefresh({
  1013. EdbInfoId: this.select_id
  1014. }).then(res => {
  1015. this.loading.close();
  1016. if(res.Ret !== 200) return
  1017. this.$message.success(res.Msg)
  1018. //更新完刷数据
  1019. console.log('更新完刷数据');
  1020. this.detail_show_chart ? this.$refs.detailComponentRef.getDetail('updateImg') : this.$refs.detailComponentRef.getData();
  1021. })
  1022. },300),
  1023. /* 编辑指标 */
  1024. editEdbHandle(type="") {
  1025. preDictEdbInterface.edbDetail({
  1026. EdbInfoId: this.select_id
  1027. }).then(res => {
  1028. if(res.Ret !== 200) return
  1029. const { RuleList,EdbType,Source,CalculateList } = res.Data;
  1030. // 原始指标
  1031. if(EdbType === 1) {
  1032. !type && this.$router.push({
  1033. path:'/editpredictEdb',
  1034. query:{
  1035. id:this.select_id
  1036. }
  1037. })
  1038. if(type === 'view') {
  1039. this.showRules = RuleList;
  1040. this.showFromEdbInfo = CalculateList[0];
  1041. this.isShowRuleDialog=true};
  1042. } else {
  1043. //计算指标
  1044. this.setComputedDialogForm(res.Data,type);
  1045. switch (Source) {
  1046. case 47:
  1047. case 48:
  1048. this.computed_type = 'joint';
  1049. break
  1050. case 72:
  1051. case 73:
  1052. this.computed_type = 'alpha';
  1053. break
  1054. default:
  1055. this.computed_type = Source;
  1056. break
  1057. }
  1058. // this.computed_type =[47,48].includes(Source)?'joint': Source;
  1059. // this.computed_type = [72,73].includes(Source)? 'alpha': Source;
  1060. }
  1061. })
  1062. },
  1063. /* 查看指标 */
  1064. viewNode() {
  1065. this.editEdbHandle('view')
  1066. },
  1067. /* 计算指标回显 */
  1068. setComputedDialogForm({Source,CalculateList,CalculateFormula,EdbInfoId,EdbName,Unit,Frequency,ClassifyId,ClassifyList,MoveType,MoveFrequency,Calendar,CorrelationStr,EmptyType,MaxEmptyType},type='') {
  1069. //找到指标的父级
  1070. const parentNodes = ClassifyList.length&&ClassifyList.map(item=>item.ClassifyId)
  1071. //指标运算 or 其他计算类型指标
  1072. if( Source === 31 ) {
  1073. /* 回显指标和表单 */
  1074. this.computedTit = '编辑计算指标';
  1075. /* 依赖的指标列表 */
  1076. this.calulateList = CalculateList.map(item => ({
  1077. tag: item.FromTag,
  1078. edb_name: item.FromEdbName,
  1079. target: item.FromEdbInfoId,
  1080. start_date: item.StartDate,
  1081. end_date: item.EndDate
  1082. }))
  1083. /* 公式和表单 */
  1084. this.calulateForm = {
  1085. edb_id:EdbInfoId,
  1086. formula: CalculateFormula,
  1087. menu: parentNodes,
  1088. targetName: EdbName,
  1089. unit: Unit,
  1090. frequency: Frequency,
  1091. emptyType: EmptyType,
  1092. maxEmptyType: MaxEmptyType,
  1093. view: type === 'view'
  1094. };
  1095. } else {
  1096. if([47,48,50,56].includes(Source)){//拟合残差
  1097. this.operationForm={
  1098. edb_id:EdbInfoId,
  1099. targetName: EdbName,
  1100. frequency: Frequency,
  1101. unit: Unit,
  1102. menu: parentNodes,
  1103. view: type === 'view',
  1104. source: Source,
  1105. date: CalculateFormula,
  1106. pre_edb: Source === 47 ? CalculateList.find(item => item.FromTag === 'A').FromEdbInfoId : '', //俺也不懂为什么这么定义都是江西老表的锅
  1107. after_edb: Source === 47 ? CalculateList.find(item => item.FromTag === 'B').FromEdbInfoId : '',
  1108. old_stay_edb: Source === 48 ? CalculateList.find(item => item.FromTag === 'A').FromEdbInfoId : '',
  1109. concat_edb: Source === 48 ? CalculateList.find(item => item.FromTag === 'B').FromEdbInfoId : '',
  1110. from_arr: CalculateList,
  1111. correlationStr: CorrelationStr
  1112. }
  1113. return
  1114. }
  1115. this.operationForm = {
  1116. oldedb_id: CalculateList[0].FromEdbInfoId,
  1117. oldEdb_name: CalculateList[0].FromEdbName,
  1118. edb_id: EdbInfoId,
  1119. targetName: EdbName,
  1120. unit: Unit,
  1121. menu: parentNodes.reverse(),
  1122. frequency: Frequency,
  1123. formula: CalculateFormula || '',
  1124. view: type === 'view',
  1125. moveType: MoveType,
  1126. moveUnit: MoveFrequency,
  1127. moveVal: Source === 46 ? CalculateFormula : '',
  1128. calendar_type: Source === 49 ? Calendar : '',
  1129. }
  1130. if([72,73].includes(Source)){
  1131. this.operationForm = {
  1132. edb_id: EdbInfoId,
  1133. oldedb_id: CalculateList[0].FromEdbInfoId,
  1134. oldEdb_name: CalculateList[0].FromEdbName,
  1135. EdbName,Frequency,Unit,ClassifyId,Formula:CalculateFormula,
  1136. view: type === 'view'
  1137. }
  1138. }
  1139. }
  1140. },
  1141. /* 复制数据 */
  1142. copyData() {
  1143. preDictEdbInterface.edbDataInfo({
  1144. EdbInfoId: this.select_id,
  1145. CurrentIndex: 1,
  1146. PageSize: 100000,
  1147. }).then(res => {
  1148. if(res.Ret !== 200) return
  1149. const { DataList,PredictDataList } = res.Data.Item;
  1150. let total_data = [...PredictDataList,...DataList];
  1151. let str = '日期\t 值\n';
  1152. total_data.forEach((item) => (str += `${item.DataTime}\t${item.Value}\n`));
  1153. this.$copyText(str).then(
  1154. (res) => {
  1155. // this.$message.success('已成功复制!');
  1156. this.$message.success(this.$t('MsgPrompt.copy_success_msg'))
  1157. },
  1158. (err) => {
  1159. this.$message.error('复制失败!');
  1160. }
  1161. );
  1162. })
  1163. },
  1164. /* 获取表格列表 */
  1165. getPublicList() {
  1166. preDictEdbInterface.edbList({
  1167. CurrentIndex: this.public_page,
  1168. PageSize: this.public_pages_size,
  1169. ClassifyId: this.select_classify || 0,
  1170. IsOnlyMe:this.isOnlyMe||false,
  1171. }).then(res => {
  1172. if(res.Ret !== 200) return
  1173. this.publicHaveMove = res.Data
  1174. ? this.public_page < res.Data.Paging.Pages
  1175. : false;
  1176. this.edbChartList = res.Data
  1177. ? this.public_page === 1
  1178. ? res.Data.List
  1179. : [...this.edbChartList, ...res.Data.List]
  1180. : [];
  1181. this.edb_total = res.Data ? res.Data.Paging.Totals : 0;
  1182. })
  1183. },
  1184. /* 加载更多 */
  1185. loadMoreHandle: _.throttle(function() {
  1186. let scrollTop = this.$refs.listRef.scrollTop;
  1187. let clientHeight = this.$refs.listRef.clientHeight;
  1188. let scrollHeight = this.$refs.listRef.scrollHeight;
  1189. if(scrollTop + clientHeight >= scrollHeight-10 && this.publicHaveMove){
  1190. this.public_page++;
  1191. this.getPublicList();
  1192. }
  1193. },300),
  1194. /* 切换中英文 */
  1195. changeLangHandle: _.debounce(async function (lang){
  1196. this.search_txt = '';
  1197. this.currentLang = lang;
  1198. await dataBaseInterface.setUserLang({
  1199. ConfigCode: 'predict_edb_language',
  1200. ConfigValue: lang === 'en' ? 'EN' : 'CN'
  1201. })
  1202. },200),
  1203. /* 编辑英文 */
  1204. openEnNameDia(info){
  1205. this.formItemArray=[{
  1206. label:/* '指标名称' */ this.$t('Edb.Detail.e_name'),
  1207. value:info.EdbName,
  1208. key:'EdbName',
  1209. notEdit:true
  1210. }]
  1211. // 中文单位有 才能编辑英文单位
  1212. if(info.Unit && info.Unit!='无'){
  1213. this.formItemArray.push({
  1214. label:this.$t('Edb.Detail.e_unit') /* '单位' */,
  1215. value:info.Unit,
  1216. key:'Unit',
  1217. notEdit:true
  1218. },
  1219. {
  1220. label:this.$t('Edb.Detail.e_en_name')/* '英文指标名称' */,
  1221. value:info.EdbNameEn,
  1222. key:'EdbNameEn',
  1223. placeholder: this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
  1224. },
  1225. {
  1226. label:this.$t('Edb.Detail.e_en_unit') /* '英文单位' */,
  1227. value:info.UnitEn,
  1228. key:'UnitEn',
  1229. placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_unit')}) /* '请输入英文单位' */
  1230. })
  1231. }else{
  1232. this.formItemArray.push({
  1233. label:this.$t('Edb.Detail.e_en_name') /* '英文指标名称' */,
  1234. value:info.EdbNameEn,
  1235. key:'EdbNameEn',
  1236. placeholder:this.$t('Edb.InputHolderAll.input_common',{label:this.$t('Edb.Detail.e_en_name')}) /* '请输入英文指标名称' */
  1237. })
  1238. }
  1239. this.setEnName = true
  1240. },
  1241. clickEdbNameHandle() {
  1242. this.$refs.detailComponentRef.changeEnOptions();
  1243. },
  1244. updateEnName(item){
  1245. let params={
  1246. EdbInfoId: Number(this.select_id),
  1247. ...item
  1248. }
  1249. dataBaseInterface.edbInfoEditEn(params).then(res=>{
  1250. if(res.Ret ==200){
  1251. this.$message({
  1252. message:res.Msg,
  1253. type:"success"
  1254. })
  1255. this.detail_show_chart ? this.$refs.detailComponentRef.getDetail() : this.$refs.detailComponentRef.getData();
  1256. this.setEnName = false
  1257. this.getTreeData({
  1258. code: this.select_node,
  1259. id: this.select_id
  1260. });
  1261. }
  1262. })
  1263. },
  1264. /* 打开计算弹窗 */
  1265. addComputedHandler() {
  1266. this.computedTit = '计算指标';
  1267. this.calulateList = [];
  1268. this.calulateForm = {};
  1269. this.operationForm = {};
  1270. this.isOpenComputed = true;
  1271. },
  1272. /* 选择计算类型 */
  1273. changeComputedType(type) {
  1274. let typeMapSource = {
  1275. 'toMonthSeason': 42,
  1276. 'accumulate': 65
  1277. }
  1278. this.computed_type = typeMapSource[type] || type;;
  1279. this.isOpenComputed = false;
  1280. },
  1281. /* 新增计算指标回调 */
  1282. addComputedCallBack(type, params) {
  1283. this.computed_type = 0;
  1284. this.computed_source = 1;
  1285. this.showAssociateChart=false;
  1286. this.showAssociateComputeData=false;
  1287. type === 'add' ? this.getTreeData(params) : this.getTreeData();
  1288. if(type === 'edit') {
  1289. this.detail_show_chart ? this.$refs.detailComponentRef.getDetail() : this.$refs.detailComponentRef.getData();
  1290. }
  1291. },
  1292. /* 重绘右侧区域宽度 */
  1293. reloadRightWid() {
  1294. let total_wid = $('.predict-edb-main')[0].offsetWidth;
  1295. let left = $('#left')[0].offsetWidth;
  1296. let rigtWid = total_wid - left - 20 + 'px';
  1297. $('#right')[0].style.width = rigtWid;
  1298. },
  1299. //只看我的
  1300. onlyMeHandler(){
  1301. this.getTreeData()
  1302. this.public_page = 1;
  1303. this.$refs.listRef.scrollTop = 0;
  1304. this.getPublicList();
  1305. },
  1306. //懒加载el-tree
  1307. async getLazyTreeData(node,resolve,maxLevel=3){
  1308. if(node.level===0){
  1309. resolve(this.treeData)
  1310. }else{
  1311. let arr=[]
  1312. const res=await preDictEdbInterface.predictEdbCatalog({IsOnlyMe:this.isOnlyMe||false,ParentId:node.data.ClassifyId})
  1313. if (res.Ret === 200) {
  1314. const temarr = res.Data.AllNodes || [];
  1315. arr=temarr.map(item=>{
  1316. return {
  1317. ...item,
  1318. isLeaf:item.EdbInfoId?true:false
  1319. }
  1320. })
  1321. }
  1322. resolve(arr)
  1323. }
  1324. },
  1325. changeTreeNode(){
  1326. this.$refs.treeRef.setCurrentKey(this.select_node);
  1327. this.$nextTick(()=>{
  1328. const _node = this.$refs.treeRef.getNode(this.select_node)
  1329. this.dynamicNode = _node;
  1330. this.dynamicNode&&this.resetNodeStyle(this.dynamicNode)
  1331. })
  1332. },
  1333. changeShowType(){
  1334. if(!this.activeTab) return
  1335. this.detail_show_chart = this.activeTab==='Chart'?true:false
  1336. }
  1337. },
  1338. mounted() {
  1339. const obj=sessionStorage.getItem('predictEdbTreeData')
  1340. if(obj||this.$route.query.code){
  1341. let code=obj?JSON.parse(obj).code:this.$route.query.code
  1342. let id=obj?JSON.parse(obj).id:this.$route.query.id
  1343. let classifyId=obj?JSON.parse(obj).classifyId:this.$route.query.classifyId
  1344. this.getTreeData({code: code,id: Number(id),classifyId:Number(classifyId)})
  1345. }else{
  1346. this.getTreeData()
  1347. }
  1348. // 清除缓存数据
  1349. setTimeout(() => {
  1350. sessionStorage.setItem('predictEdbTreeData','')
  1351. }, 1000);
  1352. this.getPublicList();
  1353. window.addEventListener('resize', this.reloadRightWid);
  1354. },
  1355. destroyed() {
  1356. window.removeEventListener('resize', this.reloadRightWid);
  1357. }
  1358. }
  1359. </script>
  1360. <style lang="scss">
  1361. .predictEdb-container{
  1362. .detail-header{
  1363. display: flex;
  1364. position: relative;
  1365. height: 60px;
  1366. .el-tabs{
  1367. width:210px;
  1368. .el-tabs__header{
  1369. margin-bottom: 0;
  1370. }
  1371. .el-tabs__nav{
  1372. display: flex;
  1373. width: 100%;
  1374. .el-tabs__item{
  1375. flex: 1;
  1376. text-align: center;
  1377. font-size: 16px;
  1378. height: 60px;
  1379. line-height: 60px;
  1380. }
  1381. }
  1382. }
  1383. }
  1384. .edb-tool{
  1385. flex: 1;
  1386. text-align: right;
  1387. display: flex;
  1388. gap: 16px;
  1389. justify-content: flex-end;
  1390. padding-right: 15px;
  1391. position: relative;
  1392. &::after{
  1393. position: absolute;
  1394. content:'';
  1395. width:100%;
  1396. left: 0;
  1397. bottom: 0;
  1398. height:2px;
  1399. background-color: #E4E7ED;
  1400. }
  1401. }
  1402. }
  1403. </style>
  1404. <style lang='scss' scoped>
  1405. @import "~@/styles/theme-vars.scss";
  1406. *{ box-sizing: border-box;}
  1407. $mini-font: 12px; $normal-font: 14px;
  1408. .predictEdb-container {
  1409. .slide-icon {
  1410. padding: 20px 0;
  1411. /* display: block; */
  1412. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
  1413. border-radius: 5px;
  1414. cursor: pointer;
  1415. position: absolute;
  1416. top: 50%;
  1417. transform: translateY(-50%);
  1418. z-index: 99;
  1419. &:hover {
  1420. background-color: rgba(0, 0, 0, 0.05);
  1421. }
  1422. &.slide-left {
  1423. right: 0;
  1424. }
  1425. &.slide-right {
  1426. left: 0;
  1427. }
  1428. }
  1429. .predict-edb-main {
  1430. display: flex;
  1431. .main-left {
  1432. width: 400px;
  1433. min-width: 380px;
  1434. background: #fff;
  1435. margin-right: 20px;
  1436. border: 1px solid #ececec;
  1437. border-radius: 4px;
  1438. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
  1439. height: calc(100vh - 120px);
  1440. overflow: hidden;
  1441. position: relative;
  1442. box-sizing: border-box;
  1443. .datasheet_top {
  1444. padding: 20px;
  1445. background: #fff;
  1446. border: 1px solid #ececec;
  1447. box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
  1448. margin-bottom: 20px;
  1449. display: flex;
  1450. align-items: center;
  1451. }
  1452. .search-cont {
  1453. padding: 0 20px;
  1454. }
  1455. .tree-cont {
  1456. padding: 0 20px 30px 20px;
  1457. /* max-height: calc(100vh - 280px);
  1458. overflow: auto; */
  1459. }
  1460. .target_tree {
  1461. color: #333;
  1462. max-height: calc(100vh - 400px);
  1463. overflow-y:auto;
  1464. .custom-tree-node {
  1465. display: flex !important;
  1466. justify-content: space-between;
  1467. align-items: center;
  1468. display: block;
  1469. flex: 1;
  1470. .node_label {
  1471. margin-right: 2px;
  1472. }
  1473. .el-icon-view {
  1474. color: #409eff;
  1475. font-size: 18px;
  1476. margin-left: 5px;
  1477. }
  1478. }
  1479. }
  1480. .noDepart {
  1481. margin: 30px 0;
  1482. display: flex;
  1483. align-items: center;
  1484. justify-content: center;
  1485. color: $theme-color;
  1486. font-size: 16px;
  1487. cursor: pointer;
  1488. }
  1489. .move-btn {
  1490. height: 100%;
  1491. width: 4px;
  1492. /* opacity: 0; */
  1493. position: absolute;
  1494. right: 0px;
  1495. top: 0;
  1496. &:hover {
  1497. cursor: col-resize;
  1498. /* background-color: orange */
  1499. }
  1500. }
  1501. }
  1502. .main-right {
  1503. width: 80%;
  1504. height: calc(100vh - 120px);
  1505. &.detail-main{
  1506. overflow-x:auto;
  1507. }
  1508. .edb-detail-wrapper {
  1509. height: 100%;
  1510. border: 1px solid #ececec;
  1511. border-radius: 4px;
  1512. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
  1513. overflow: hidden;
  1514. background: #fff;
  1515. &.main-min-width{
  1516. min-width: 780px;
  1517. }
  1518. .detail-top {
  1519. padding: 20px;
  1520. display: flex;
  1521. justify-content: space-between;
  1522. align-items: center;
  1523. border-bottom: 1px solid #ececec;
  1524. .title {
  1525. font-size: 16px;
  1526. &.disabled { color: #ccc; }
  1527. }
  1528. .action-ul {
  1529. display: flex;
  1530. li { margin: 0 10px; }
  1531. }
  1532. }
  1533. .detail-wrap {
  1534. position: relative;
  1535. padding: 16px;
  1536. height: calc(100vh - 180px);
  1537. overflow-y: auto;
  1538. .toggle-text {
  1539. position: absolute;
  1540. right: 20px;
  1541. top: 40px;
  1542. z-index: 2;
  1543. display: flex;
  1544. align-items: center;
  1545. }
  1546. /* min-height: 500px; */
  1547. }
  1548. }
  1549. .sheet-list-cont {
  1550. color: #333;
  1551. .el-card .el-card__header,
  1552. .el-card__body {
  1553. padding: 10px;
  1554. }
  1555. .list-top {
  1556. display: flex;
  1557. align-items: center;
  1558. justify-content: space-between;
  1559. }
  1560. .edbChartList-wrapper {
  1561. margin-top: 10px;
  1562. display: flex;
  1563. flex-wrap: wrap;
  1564. max-height: calc(100vh - 143px);
  1565. overflow: hidden;
  1566. overflow-y: auto;
  1567. .drag-cont {
  1568. width: 100%;
  1569. display: flex;
  1570. flex-wrap: wrap;
  1571. }
  1572. .dragShdow {
  1573. box-shadow: 0 1px 8px rgba(64, 158, 255, 0.8);
  1574. opacity: 0.5;
  1575. }
  1576. .sheet-item {
  1577. width:23%;
  1578. min-width: 210px;
  1579. border-radius: 4px;
  1580. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  1581. border: 1px solid #EBEEF5;
  1582. background-color: #FFFFFF;
  1583. overflow: hidden;
  1584. color: #303133;
  1585. transition: 0.3s;
  1586. .item-top,.item-bottom{
  1587. padding:10px;
  1588. text-align: left;
  1589. }
  1590. .item-top {
  1591. display: flex;
  1592. justify-content: space-between;
  1593. align-items: center;
  1594. font-size: 16px;
  1595. font-weight: 600;
  1596. box-shadow: 0 3px 6px rgba(37, 37, 239, 0.1);
  1597. }
  1598. .chart-img {
  1599. /* width: 100%;
  1600. height: 230px;
  1601. object-fit: fill !important; */
  1602. margin:10px;
  1603. margin-bottom: 0;
  1604. height: 0;
  1605. padding-bottom: 67%;
  1606. cursor: pointer;
  1607. }
  1608. .item-bottom {
  1609. display: flex;
  1610. justify-content: space-between;
  1611. font-size: 12px;
  1612. color: #666;
  1613. .collected {
  1614. color: #f00;
  1615. cursor: pointer;
  1616. }
  1617. .join_txt {
  1618. color: $theme-color;
  1619. cursor: pointer;
  1620. }
  1621. }
  1622. }
  1623. }
  1624. .nodata {
  1625. text-align: center;
  1626. }
  1627. }
  1628. }
  1629. }
  1630. .computed-ul {
  1631. max-height: 600px;
  1632. height: 70vh;
  1633. overflow-y: auto;
  1634. padding: 40px 92px;
  1635. display: flex;
  1636. flex-wrap: wrap;
  1637. .cpmputed-li {
  1638. width: 180px;
  1639. padding: 19px 0;
  1640. height:60px;
  1641. color: $theme-color;
  1642. font-size: 16px;
  1643. background:#ECF5FF;
  1644. border-radius: 8px;
  1645. border: 1px solid #B3D8FF;
  1646. text-align: center;
  1647. cursor: pointer;
  1648. margin-right: 65px;
  1649. margin-bottom: 55px;
  1650. &:nth-child(3n) {
  1651. margin-right:0;
  1652. }
  1653. &:hover {
  1654. background: $theme-color;
  1655. color: #fff;
  1656. }
  1657. &.act {
  1658. background: $theme-color;
  1659. color: #fff;
  1660. }
  1661. }
  1662. }
  1663. }
  1664. </style>
  1665. <style lang="scss">
  1666. @import "~@/styles/theme-vars.scss";
  1667. .predictEdb-container {
  1668. .label-input .el-input__inner {
  1669. height: 25px;
  1670. line-height: 25px;
  1671. padding: 0 10px;
  1672. }
  1673. .el-dialog--center .el-dialog__body {
  1674. padding: 40px 20px 30px 60px;
  1675. }
  1676. .el-tree__drop-indicator{
  1677. height:3px;
  1678. background-color: $theme-color;
  1679. }
  1680. .el-tree-node__content {
  1681. margin-bottom: 14px !important;
  1682. }
  1683. .el-tree-node__children {
  1684. .el-tree-node {
  1685. /* margin-bottom: 8px !important; */
  1686. margin-bottom: 0px !important;
  1687. padding-left: 18px;
  1688. }
  1689. .el-tree-node__content {
  1690. margin-bottom: 5px !important;
  1691. padding-left: 0 !important;
  1692. }
  1693. }
  1694. .expanded.el-icon-caret-right:before {
  1695. content: url('../../assets/img/set_m/down.png') !important;
  1696. }
  1697. .el-icon-caret-right:before {
  1698. content: url('../../assets/img/set_m/slide.png') !important;
  1699. }
  1700. .el-tree-node__expand-icon.is-leaf.el-icon-caret-right:before {
  1701. content: '' !important;
  1702. }
  1703. .el-tree-node__expand-icon.expanded {
  1704. -webkit-transform: rotate(0deg);
  1705. transform: rotate(0deg);
  1706. }
  1707. .el-tree-node.is-current > .el-tree-node__content {
  1708. background-color: #f0f4ff !important;
  1709. }
  1710. .el-tree-node__content {
  1711. padding-right: 10px !important;
  1712. }
  1713. .dialog-computed {
  1714. max-width:950px !important;
  1715. .el-dialog__header {
  1716. background-color: #fff;
  1717. .el-dialog__close {
  1718. color: #333;
  1719. }
  1720. }
  1721. }
  1722. }
  1723. .edb-tool-popover{
  1724. .edb-tool-wrap{
  1725. display: flex;
  1726. flex-wrap: wrap;
  1727. gap:10px;
  1728. .el-button + .el-button{
  1729. margin-left: 0;
  1730. }
  1731. }
  1732. }
  1733. </style>