calculateEdb.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835
  1. <template>
  2. <div v-dialogDrag v-if="isShow">
  3. <div class="calculate-edb-value-dialog el-dialog">
  4. <div class="header el-dialog__header">
  5. <span>{{ calculationItem.label }}</span>
  6. <i class="el-icon-close" @click="cancelHandle" />
  7. </div>
  8. <div class="main">
  9. <section class="main-top">
  10. <template v-if="calculationItem.fromEdbKey === 5">
  11. <el-radio-group
  12. v-model="formData.source"
  13. @change="handleRadioGroup"
  14. >
  15. <el-radio :label="1">{{
  16. $t("Edb.CalculateBtns.to_month")
  17. }}</el-radio>
  18. <el-radio :label="2">{{
  19. $t("Edb.CalculateBtns.to_quarter")
  20. }}</el-radio>
  21. </el-radio-group>
  22. </template>
  23. <template v-else-if="calculationItem.fromEdbKey === 62">
  24. <el-radio-group
  25. v-model="formData.source"
  26. @change="handleRadioGroup"
  27. >
  28. <el-radio :label="13">{{
  29. $t("Edb.CalculateBtns.cumulate")
  30. }}</el-radio>
  31. <el-radio :label="14">{{
  32. $t("Edb.CalculateBtns.cumulate_oneyear")
  33. }}</el-radio>
  34. </el-radio-group>
  35. </template>
  36. <selectTarget
  37. :defaultId="search_edb"
  38. :defaultOpt="searchOptions"
  39. ref="selectRef"
  40. @select="selectTargetHandle"
  41. :filter="false"
  42. style="margin: 20px 0"
  43. />
  44. <div class="link-box-tags">
  45. <div
  46. class="link-box-tag"
  47. v-for="(item, index) in edbList"
  48. :key="item.RId"
  49. :class="{
  50. 'unchoose-tag': item.Id != edbActive.Id,
  51. 'choosed-tag': item.Id == edbActive.Id,
  52. }"
  53. >
  54. <span
  55. @dblclick.stop="editLinkName(item)"
  56. v-if="!item.editing"
  57. @click="linkClick(item)"
  58. :style="{
  59. color: item.Id == edbActive.Id ? '#0052D9' : '#666666',
  60. }"
  61. >{{ item.Name }}</span
  62. >
  63. <el-input
  64. v-else
  65. @blur="editLinkNameFinish(item)"
  66. v-model.trim="editingLabel"
  67. class="label-edit-input"
  68. ref="labelEditInput"
  69. />
  70. <img
  71. src="~@/assets/img/sand_new/delete_outline_1.png"
  72. @click="linkDelete(item, index)"
  73. />
  74. </div>
  75. </div>
  76. </section>
  77. <!-- 指标详情 -->
  78. <edbDetailSection :tableData="selectEdbInfo ? [selectEdbInfo] : []" />
  79. <section class="form-section">
  80. <el-form
  81. ref="form"
  82. label-position="left"
  83. inline
  84. label-width="80px"
  85. :model="formData"
  86. :rules="formRules"
  87. >
  88. <el-form-item
  89. :label="$t('OnlineExcelPage.label_move_way')"
  90. style="display: block"
  91. v-if="calculationItem.fromEdbKey === 22"
  92. prop="moveVal"
  93. >
  94. <el-select
  95. v-model="formData.moveType"
  96. style="width: 100px"
  97. placeholder=""
  98. size="mini"
  99. >
  100. <el-option
  101. v-for="item in moveTypeOpions"
  102. :key="item.key"
  103. :label="item.label"
  104. :value="item.key"
  105. >
  106. </el-option>
  107. </el-select>
  108. <el-input
  109. style="width: 80px"
  110. type="number"
  111. min="0"
  112. size="mini"
  113. v-model="formData.moveVal"
  114. @keyup.native="filterCode(formData)"
  115. ></el-input>
  116. <el-select
  117. v-model="formData.moveUnit"
  118. size="mini"
  119. placeholder=""
  120. style="width: 100px"
  121. >
  122. <el-option
  123. v-for="item in fre_options"
  124. :key="item.value"
  125. :label="item.label"
  126. :value="item.value"
  127. >
  128. </el-option>
  129. </el-select>
  130. </el-form-item>
  131. <el-form-item
  132. :label="$t('OnlineExcelPage.label_n_val')"
  133. prop="nNum"
  134. v-if="[8, 12, 13, 35].includes(calculationItem.fromEdbKey)"
  135. >
  136. <el-input
  137. v-model="formData.nNum"
  138. style="width: 200px"
  139. :placeholder="$t('ETableChildren.enter_n_value')"
  140. type="number"
  141. />
  142. </el-form-item>
  143. <el-form-item
  144. :label="$t('OnlineExcelPage.label_calendar')"
  145. prop="calendarType"
  146. v-if="calculationItem.fromEdbKey === 35"
  147. >
  148. <el-select
  149. v-model="formData.calendarType"
  150. :placeholder="$t('OnlineExcelPage.select_calendar_pld')"
  151. style="width: 200px"
  152. >
  153. <el-option
  154. v-for="item in calendarOptions"
  155. :key="item.key"
  156. :label="item.label"
  157. :value="item.key"
  158. >
  159. </el-option>
  160. </el-select>
  161. </el-form-item>
  162. <el-form-item
  163. :label="$t('ETableChildren.frequentness_lable')"
  164. prop="frequency"
  165. v-if="[9, 13].includes(formData.source)"
  166. >
  167. <el-select
  168. v-model="formData.frequency"
  169. :placeholder="$t('OnlineExcelPage.please_select_frequency')"
  170. style="width: 200px"
  171. clearable
  172. >
  173. <el-option
  174. v-for="item in frequencyArr"
  175. :key="item.value"
  176. :label="item.label"
  177. :value="item.value"
  178. >
  179. </el-option>
  180. </el-select>
  181. </el-form-item>
  182. <el-form-item
  183. :label="$t('OnlineExcelPage.label_val_type')"
  184. prop="valueType"
  185. v-if="calculationItem.fromEdbKey === 51"
  186. >
  187. <el-select
  188. v-model="formData.valueType"
  189. :placeholder="$t('OnlineExcelPage.select_data_type')"
  190. style="width: 200px"
  191. >
  192. <el-option
  193. key="期末值"
  194. :label="$t('ETableChildren.final_value_lable')"
  195. value="期末值"
  196. />
  197. <el-option
  198. key="平均值"
  199. :label="$t('ETableChildren.average_value_lable')"
  200. value="平均值"
  201. />
  202. </el-select>
  203. </el-form-item>
  204. <el-form-item
  205. :label="$t('ETableChildren.alpha_value_lable')"
  206. prop="alphaValue"
  207. v-if="calculationItem.fromEdbKey === 'alpha'"
  208. >
  209. <el-input
  210. v-model="formData.alphaValue"
  211. :placeholder="$t('Edb.InputHolderAll.input_alpha_val')"
  212. style="width: 200px"
  213. />
  214. </el-form-item>
  215. </el-form>
  216. </section>
  217. <section>
  218. <!-- 依赖日期选择方式 -->
  219. <ul class="date-select-cont">
  220. <li class="flex">
  221. <div class="flex">
  222. <el-radio v-model="dateSelectForm.Type" :label="1">{{
  223. $t("ETableChildren.latest_date_indicator")
  224. }}</el-radio>
  225. <div>
  226. <label class="el-form-item__label">{{
  227. $t("ETableChildren.lagging_period_label")
  228. }}</label>
  229. <el-input
  230. v-model="dateSelectForm.MoveForward"
  231. type="number"
  232. :min="0"
  233. style="margin-right: 10px; width: 80px"
  234. @change="
  235. (e) => {
  236. dateSelectForm.MoveForward = Number(e);
  237. }
  238. "
  239. />{{ $t("ETableChildren.term_ipt") }}
  240. </div>
  241. </div>
  242. </li>
  243. <li>
  244. <dateMoveWaySec ref="dateMoveWayRef" />
  245. </li>
  246. </ul>
  247. </section>
  248. <section class="bot">
  249. <el-button
  250. type="primary"
  251. @click="calculateHandle"
  252. style="width: 120px; margin-right: 30px"
  253. >{{ $t("ETableChildren.calculation_btn") }}</el-button
  254. >
  255. <el-button
  256. type="primary"
  257. plain
  258. @click="cancelHandle"
  259. style="width: 120px"
  260. >{{ $t("ETable.Btn.cancel_btn") }}</el-button
  261. >
  262. <el-popover width="300" trigger="hover" placement="right">
  263. <div v-html="formulaTipContent"></div>
  264. <el-button class="tips-btn" type="text" slot="reference">{{
  265. $t("Edb.formula_instru")
  266. }}</el-button>
  267. </el-popover>
  268. </section>
  269. </div>
  270. </div>
  271. </div>
  272. </template>
  273. <script>
  274. import { dataBaseInterface } from "@/api/api.js";
  275. import * as sheetInterface from "@/api/modules/sheetApi.js";
  276. import * as preDictEdbInterface from "@/api/modules/predictEdbApi.js";
  277. import selectTarget from "@/views/chartRelevance_manage/components/selectTarget.vue";
  278. import edbDetailSection from "@/views/datasheet_manage/components/edbDetailSection.vue";
  279. import dateMoveWaySec from "@/views/datasheet_manage/components/dateMoveWaySection.vue";
  280. import {
  281. formRules,
  282. formulaTip,
  283. } from "@/views/dataEntry_manage/databaseComponents/util";
  284. export default {
  285. components: {
  286. selectTarget,
  287. edbDetailSection,
  288. dateMoveWaySec,
  289. },
  290. props: {
  291. isShow: {
  292. type: Boolean,
  293. },
  294. calculationItem: {
  295. //传入的计算种类
  296. type: Object,
  297. },
  298. linkList: {
  299. //指标列表
  300. type: Array,
  301. default: [],
  302. },
  303. activeLink: {
  304. //选中的指标
  305. type: Object,
  306. default: {},
  307. },
  308. },
  309. computed: {
  310. frequencyArr() {
  311. return [
  312. { label: this.$t("ETable.Date.day_lable"), value: "日度" },
  313. { label: this.$t("ETable.Date.week_lable"), value: "周度" },
  314. { label: this.$t("ETable.Date.dekad_lable"), value: "旬度" },
  315. { label: this.$t("ETable.Date.month_lable"), value: "月度" },
  316. { label: this.$t("ETable.Date.quarter_lable"), value: "季度" },
  317. { label: this.$t("ETable.Date.year_lable"), value: "年度" },
  318. ];
  319. },
  320. moveTypeOpions() {
  321. return [
  322. {
  323. label: this.$t("ETableChildren.ahead_lable"),
  324. key: 1,
  325. },
  326. {
  327. label: this.$t("ETableChildren.lagging_lable"),
  328. key: 2,
  329. },
  330. ];
  331. },
  332. fre_options() {
  333. return [
  334. { label: this.$t("ETable.Date.day"), value: "天" },
  335. { label: this.$t("ETable.Date.week_min"), value: "周" },
  336. { label: this.$t("ETable.Date.month"), value: "月" },
  337. { label: this.$t("ETable.Date.quarter_min"), value: "季" },
  338. { label: this.$t("ETable.Date.year"), value: "年" },
  339. ];
  340. },
  341. calendarOptions() {
  342. return [
  343. { label: this.$t("ETable.Date.calendar_gre"), key: "公历" },
  344. { label: this.$t("ETable.Date.calendar_lunar"), key: "农历" },
  345. ];
  346. },
  347. currentLang() {
  348. return this.$store.state.lang;
  349. },
  350. },
  351. watch: {
  352. isShow(newv) {
  353. if (!newv) return;
  354. this.formData.source = +this.calculationItem.source;
  355. this.edbList = _.cloneDeep(this.linkList);
  356. this.edbActive = _.cloneDeep(this.activeLink);
  357. this.selectEdbInfo = null;
  358. this.linkClick(this.edbActive);
  359. this.handleFormulaTipContent()
  360. },
  361. edbActive:{
  362. deep:true,
  363. handler(){
  364. this.handleEditData();
  365. },
  366. }
  367. },
  368. data() {
  369. return {
  370. isCalculateDia: true,
  371. formData: {
  372. source: + this.calculationItem.source,
  373. frequency: "",
  374. nNum: 1,
  375. moveType: 1,
  376. moveUnit: "天",
  377. moveVal: "",
  378. calendarType: "公历",
  379. valueType: "期末值",
  380. alphaValue: 0,
  381. },
  382. formRules,
  383. formulaTip,
  384. formulaTipContent:'',
  385. edbList: [], //指标标签列表
  386. edbActive: {}, //目前选中的标签
  387. editingLabel: "", //编辑标签名称
  388. search_edb: "",
  389. searchOptions: [],
  390. selectEdbInfo: null,
  391. dateSelectForm: {
  392. Type: 1,
  393. MoveForward: 0,
  394. },
  395. };
  396. },
  397. methods: {
  398. async handleEditData(){
  399. await this.$nextTick();
  400. let v = this.linkList.find(_=>_.Id == this.edbActive.Id);
  401. if(!v || !v.calculationMethod || !v.calculationMethod.length) return this.clearFormValue();
  402. let item = v.calculationMethod.find(_=>_.source == this.formData.source);
  403. if(!item) return this.clearFormValue();
  404. // 累计值有问题
  405. //处理编辑数据
  406. this.formData = {
  407. source:+item.source,
  408. frequency:item.frequency || '',
  409. moveUnit:item.moveFrequency || '天',
  410. moveType:item.moveType || 1,
  411. calendarType:item.calendar || "公历",
  412. nNum:1,
  413. moveVal:'',
  414. valueType:'期末值',
  415. alphaValue:0,
  416. };
  417. const valueMap = {
  418. 22: "moveVal",
  419. 51: "valueType",
  420. alpha: "alphaValue",
  421. };
  422. this.formData[[22,51,'alpha'].includes(this.calculationItem.fromEdbKey) ? valueMap[this.calculationItem.fromEdbKey] : 'nNum'] = +item.formula || item.formula;
  423. this.dateSelectForm = {
  424. Type: 1,
  425. MoveForward: item.moveForward || 0,
  426. };
  427. this.$refs.dateMoveWayRef.dateChangeArr = item.dateChange || [];
  428. },
  429. handleFormulaTipContent(){
  430. this.formulaTipContent = this.formulaTip.get(this.calculationItem.fromEdbKey);
  431. if(this.formData.source == 2) this.formulaTipContent = this.formulaTip.get(61); //积累季度
  432. if(this.formData.source == 14) this.formulaTipContent = this.formulaTip.get(63); //年初至今计算
  433. },
  434. handleRadioGroup() {
  435. this.handleEditData()
  436. this.$refs.selectRef.targetTypeChange();
  437. this.handleFormulaTipContent()
  438. this.selectEdbInfo = null;
  439. this.edbActive = null;
  440. let firstEdb = this.edbList[0];
  441. if (firstEdb) {
  442. this.edbActive = firstEdb;
  443. this.$emit("changeActiveEdb", { item: firstEdb });
  444. this.linkClick(firstEdb);
  445. }
  446. },
  447. async calculateHandle() {
  448. await this.$refs.form.validate();
  449. if (!this.selectEdbInfo)
  450. return this.$message.warning(
  451. this.$t("SandboxManage.SandFlow.select_indicator_criteria")
  452. );
  453. const { source, nNum, moveType, moveUnit, calendarType, frequency } =
  454. this.formData;
  455. const valueMap = {
  456. 22: "moveVal",
  457. 51: "valueType",
  458. alpha: "alphaValue",
  459. };
  460. let params = {
  461. DataTime: "",
  462. Source: +source,
  463. Frequency: frequency,
  464. Formula: valueMap[this.calculationItem.fromEdbKey]
  465. ? String(this.formData[valueMap[this.calculationItem.fromEdbKey]])
  466. : String(nNum),
  467. EdbInfoId: this.selectEdbInfo.EdbInfoId,
  468. MoveFrequency: moveUnit,
  469. MoveType: moveType,
  470. Calendar: calendarType,
  471. MoveForward: this.dateSelectForm.MoveForward,
  472. DateChange: this.$refs.dateMoveWayRef.dateChangeArr,
  473. };
  474. const res = await sheetInterface.getMixedCalculateData(params);
  475. if (res.Ret !== 200) return;
  476. let value = res.Data.ShowValue || "";
  477. const tips = {
  478. 5: `N=${params.Formula}`,
  479. 6: `N=${params.Formula}`,
  480. 7: `N=${params.Formula}`,
  481. 10: `移动方式${params.MoveType == 1 ? "领先" : "滞后"}${
  482. params.Formula
  483. }${params.MoveFrequency}`,
  484. 11: `N=${params.Formula} ${params.Calendar}`,
  485. 9: `数据取值${params.Formula} 频度${params.Frequency}`,
  486. 15: `alpha值=${params.Formula}`,
  487. };
  488. let calculation = {
  489. fromEdbKey: this.calculationItem.fromEdbKey,
  490. label: this.calculationItem.label,
  491. source: +this.formData.source,
  492. value,
  493. calendar: params.Calendar,
  494. dateChange: params.DateChange,
  495. edbInfoId: params.EdbInfoId,
  496. formula: params.Formula,
  497. frequency: params.Frequency,
  498. moveForward: params.MoveForward,
  499. moveFrequency: params.MoveFrequency,
  500. moveType: params.MoveType,
  501. dataTime: params.DataTime,
  502. tip: tips[params.Source] || "",
  503. };
  504. this.$emit("addCalculation", { item: calculation });
  505. this.cancelHandle();
  506. },
  507. /* 过滤负数 小数点*/
  508. filterCode(item) {
  509. item.moveVal = item.moveVal.replace(/[^\.\d]/g, "").replace(".", "");
  510. },
  511. editLinkName(item) {
  512. this.search_edb = "";
  513. this.editingLabel = item.Name;
  514. item.editing = true;
  515. this.$nextTick(() => {
  516. this.$refs.labelEditInput[0].focus();
  517. });
  518. },
  519. editLinkNameFinish(item) {
  520. this.search_edb = "";
  521. if (this.editingLabel) {
  522. item.editing = false;
  523. item.Name = this.editingLabel;
  524. this.$emit("editEdbName", { item });
  525. } else {
  526. this.$message.warning("不能为空");
  527. }
  528. },
  529. async linkClick(item) {
  530. this.search_edb = "";
  531. const res = await dataBaseInterface.targetDetail({ EdbInfoId: item.Id });
  532. if (res.Ret !== 200) return;
  533. const { EdbInfoId, EdbInfoType, EdbName, Frequency, HaveOperaAuth } =
  534. res.Data;
  535. if (!HaveOperaAuth)
  536. return this.$message.warning(this.$t("MsgPrompt.no_edb_auth"));
  537. if (this.formData.source === 1 && Frequency !== "月度")
  538. return this.$message.warning(this.$t("ETableChildren.only_select_msg"));
  539. else if (this.formData.source === 2 && Frequency !== "季度")
  540. return this.$message.warning(
  541. this.$t("ETableChildren.only_quarterly_msg")
  542. );
  543. else if (this.formData.source === 8 && Frequency === "日度")
  544. return this.$message.warning(this.$t("ETableChildren.no_day_msg"));
  545. else if (this.formData.source === 14 && Frequency === "年度")
  546. return this.$message.warning(this.$t("ETableChildren.no_year_msg"));
  547. this.selectTargetHandle({ EdbInfoId, EdbInfoType, EdbName }, "change");
  548. this.edbActive = item;
  549. this.$emit("changeActiveEdb", { item });
  550. },
  551. linkDelete(item, index) {
  552. this.search_edb = "";
  553. this.edbList.splice(index, 1);
  554. this.$emit("edbDelete", { item });
  555. if (this.edbActive.RId == item.RId) {
  556. let firstEdb = this.edbList[0];
  557. if (firstEdb) {
  558. this.edbActive = firstEdb;
  559. this.$emit("changeActiveEdb", { item: firstEdb });
  560. this.selectEdbInfo = null;
  561. this.linkClick(firstEdb);
  562. } else {
  563. this.edbActive = {};
  564. this.$emit("changeActiveEdb", { item: null });
  565. this.selectEdbInfo = null;
  566. }
  567. }
  568. },
  569. /* 选择指标 */
  570. async selectTargetHandle(e, type = "add") {
  571. //add添加 change标签切换
  572. if (!e) {
  573. this.selectEdbInfo = null;
  574. return;
  575. }
  576. if (this.edbList.find((_) => _.Id == e.EdbInfoId) && type == "add") {
  577. return this.$message.warning(
  578. this.$t("SandboxManage.SandFlow.data_already_exists")
  579. );
  580. }
  581. if (type == "add") {
  582. let activeItem = {
  583. RId: 1 + "-" + e.EdbInfoId,
  584. Id: e.EdbInfoId,
  585. Name:
  586. this.currentLang === "en" ? e.EdbNameEn || e.EdbName : e.EdbName,
  587. Type: 1,
  588. editing: false,
  589. databaseType: e.EdbInfoType, //0 普通指标 | 1 预测指标
  590. detailParams: {
  591. code: e.UniqueCode,
  592. id: e.EdbInfoId,
  593. classifyId: e.ClassifyId,
  594. },
  595. calculationMethod: [],
  596. };
  597. this.edbActive = activeItem;
  598. this.edbList.push(activeItem);
  599. this.$emit("addEdbItem", { item: activeItem });
  600. }
  601. const res =
  602. e.EdbInfoType === 1
  603. ? await preDictEdbInterface.edbDataInfo({
  604. EdbInfoId: e.EdbInfoId,
  605. CurrentIndex: 1,
  606. })
  607. : await dataBaseInterface.targetList({
  608. EdbInfoId: e.EdbInfoId,
  609. CurrentIndex: 1,
  610. });
  611. if (res.Ret !== 200) return;
  612. const {
  613. EdbInfoId,
  614. EdbCode,
  615. EdbName,
  616. Frequency,
  617. Unit,
  618. StartDate,
  619. ModifyTime,
  620. PredictDataList,
  621. DataList,
  622. HaveOperaAuth,
  623. } = res.Data.Item;
  624. this.selectEdbInfo = {
  625. EdbCode,
  626. EdbName,
  627. Frequency,
  628. Unit,
  629. StartDate,
  630. ModifyTime,
  631. EdbInfoId,
  632. HaveOperaAuth,
  633. DataList: PredictDataList
  634. ? [...PredictDataList, ...DataList].slice(0, 5)
  635. : DataList.slice(0, 5),
  636. };
  637. },
  638. cancelHandle() {
  639. this.initData();
  640. this.$emit('handleCloseDialog')
  641. this.$emit("update:isShow", false);
  642. },
  643. clearFormValue(){
  644. this.formData = {
  645. source: +this.formData.source,
  646. frequency: "",
  647. nNum: 1,
  648. moveType: 1,
  649. moveUnit: "天",
  650. moveVal: "",
  651. calendarType: "公历",
  652. valueType: "期末值",
  653. alphaValue: 0,
  654. };
  655. this.dateSelectForm = {
  656. Type: 1,
  657. MoveForward: 0,
  658. };
  659. this.$refs.dateMoveWayRef && this.$refs.dateMoveWayRef.initData();
  660. },
  661. initData() {
  662. this.clearFormValue();
  663. this.search_edb = "";
  664. this.selectEdbInfo = null;
  665. this.edbList = [];
  666. this.edbActive = {};
  667. this.editingLabel = "";
  668. },
  669. },
  670. };
  671. </script>
  672. <style scoped lang="scss">
  673. @import "~@/styles/theme-vars.scss";
  674. .calculate-edb-value-dialog {
  675. background: #fff;
  676. position: fixed;
  677. top: 5vh;
  678. left: 50%;
  679. transform: translateX(-50%);
  680. width: 1058px;
  681. border-radius: 2px;
  682. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  683. z-index: 9999;
  684. .header {
  685. font-size: 16px;
  686. background: $theme-color;
  687. color: #fff;
  688. padding: 15px;
  689. display: flex;
  690. align-content: center;
  691. justify-content: space-between;
  692. .el-icon-close {
  693. font-size: 20px;
  694. cursor: pointer;
  695. }
  696. }
  697. .main {
  698. padding: 30px;
  699. max-height: 75vh;
  700. min-height: 300px;
  701. overflow-y: auto;
  702. position: relative;
  703. .main-top {
  704. margin-bottom: 20px;
  705. }
  706. .link-box-tags {
  707. display: flex;
  708. align-items: center;
  709. overflow-x: auto;
  710. margin-bottom: 20px;
  711. .unchoose-tag {
  712. border: 1px solid #c8cdd9;
  713. }
  714. .choosed-tag {
  715. border: 1px solid #0052d9;
  716. background: rgba(236, 242, 254, 1);
  717. }
  718. .link-box-tag {
  719. display: flex;
  720. align-items: center;
  721. padding: 0 8px;
  722. height: 40px;
  723. max-width: 250px;
  724. margin-right: 30px;
  725. border-radius: 4px;
  726. cursor: pointer;
  727. &:last-child {
  728. margin-right: 0;
  729. }
  730. span {
  731. white-space: nowrap;
  732. overflow: hidden;
  733. text-overflow: ellipsis;
  734. }
  735. img {
  736. height: 16px;
  737. width: 16px;
  738. margin-left: 8px;
  739. }
  740. }
  741. }
  742. .edb-list {
  743. display: flex;
  744. flex-wrap: wrap;
  745. gap: 10px;
  746. .el-tag {
  747. cursor: pointer;
  748. }
  749. }
  750. .form-section {
  751. margin: 20px 0;
  752. }
  753. .bot {
  754. display: flex;
  755. justify-content: center;
  756. margin: 30px 0;
  757. position: relative;
  758. }
  759. .tips-btn {
  760. position: absolute;
  761. bottom: -10px;
  762. right: 40px;
  763. }
  764. .data-cont {
  765. margin: 15px 0;
  766. border: 1px solid #dcdfe6;
  767. .data-li {
  768. display: flex;
  769. padding: 15px;
  770. text-align: center;
  771. justify-content: space-around;
  772. &.choose {
  773. background: #ecf5ff;
  774. }
  775. }
  776. }
  777. .date-select-cont {
  778. li {
  779. margin: 20px 0;
  780. }
  781. .flex {
  782. display: flex;
  783. align-items: center;
  784. }
  785. }
  786. }
  787. }
  788. </style>