predictEdb.vue 54 KB

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