predictEdb.vue 57 KB

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