batchComptedDialog.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. <template>
  2. <el-dialog
  3. :visible.sync="isBatchComputed"
  4. :close-on-click-modal="false"
  5. :modal-append-to-body="false"
  6. @close="cancelHandle"
  7. custom-class="batch-computed-dialog"
  8. center
  9. width="1200px"
  10. top="5vh"
  11. v-dialogDrag
  12. >
  13. <div slot="title" style="display: flex; align-items: center">
  14. <img
  15. :src="$icons.computed"
  16. style="color: #fff; width: 16px; height: 16px; margin-right: 5px"
  17. />
  18. <span style="font-size: 16px">{{ titleMap.get(type) }}</span>
  19. </div>
  20. <div class="cont">
  21. <!-- 多选source -->
  22. <ul class="label-cont">
  23. <li v-for="item in sourceList" :key="item.key" :class="{act: type === item.key}" @click="init();$emit('changeSource',item.key)">{{item.label}}</li>
  24. </ul>
  25. <ul class="target-ul">
  26. <li class="target-li" v-for="(list, index) in targetList" :key="index">
  27. <span class="li-tag">{{ list.tag }}</span>
  28. <el-select
  29. v-model="list.target"
  30. v-loadMore="searchLoad"
  31. :filterable="!list.target"
  32. clearable
  33. :placeholder="$t('Edb.InputHolderAll.input_name')"
  34. style="width: 400px"
  35. @change="chooseTarget"
  36. @clear="clearHandle(index)"
  37. remote
  38. :remote-method="searchTarget"
  39. @click.native="inputFocusHandle"
  40. >
  41. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  42. <el-option
  43. v-for="item in searchOptions"
  44. :key="item.EdbInfoId"
  45. :label="$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
  46. :value="item.EdbInfoId"
  47. :disabled="!item.HaveOperaAuth"
  48. >
  49. <div>
  50. <img
  51. :src="$icons.lock_ico2"
  52. width="18"
  53. height="18"
  54. style="vertical-align:middle"
  55. v-if="!item.HaveOperaAuth"
  56. />
  57. {{$parent.currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}
  58. </div>
  59. </el-option>
  60. </el-select>
  61. <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="$emit('lookHistory',list.target)" v-if="list.target"/>
  62. <i
  63. class="el-icon-error del-tag"
  64. v-if="index > 1"
  65. @click="delTarget(index)"
  66. />
  67. <span class="target-date" v-if="list.start_date">{{
  68. `${list.start_date}至${list.end_date}`
  69. }}</span>
  70. </li>
  71. </ul>
  72. <span class="add-icon" @click="addTargetHandle">
  73. <i class="el-icon-circle-plus-outline" style="color: #5882ef; font-size: 16px"/>
  74. <!-- 添加更多指标 --> {{$t('EtaBasePage.add_more_edb')}}
  75. </span>
  76. <ul class="form-ul">
  77. <li class="form-li" v-for="(list, index) in targetList" :key="index">
  78. <span class="li-tag">{{ list.tag }}</span>
  79. <el-input
  80. v-model="list.targetName"
  81. :placeholder="$t('Edb.InputHolderAll.input_name')"
  82. style="margin: 0 10px;width:25%"
  83. />
  84. <cascader
  85. style="width: 25%"
  86. v-model="list.menu"
  87. :options="options"
  88. clearable
  89. :placeholder="$t('Edb.InputHolderAll.input_menu')"
  90. cascaderWidth="width: 100%"
  91. :config="{ checkStrictly: true }"
  92. />
  93. <selectUnit
  94. v-model="list.unit"
  95. style="width: 15%;margin: 0 10px"
  96. :disabled="[6,7,32,33,75].includes(type)"
  97. />
  98. <el-input
  99. v-if="[8,12,13,39,43,44].includes(type)"
  100. v-model="list.n_num"
  101. style="width: 20%;margin-right:10px"
  102. :placeholder="$t('Edb.InputHolderAll.input_n_val')"
  103. type="number"
  104. @change="NchangeHandle(list.tag)"
  105. />
  106. <el-select
  107. v-model="list.frequency"
  108. :placeholder="$t('Edb.InputHolderAll.input_fre')"
  109. style="width: 20%"
  110. clearable
  111. :disabled="[6,7,32,33,5,42,61,64,63,66,75].includes(type)"
  112. >
  113. <el-option
  114. v-for="item in frequencyArr"
  115. :key="item"
  116. :label="item"
  117. :value="item"
  118. >
  119. </el-option>
  120. </el-select>
  121. <el-select
  122. v-if="type===45"
  123. v-model="list.emptyType"
  124. :placeholder="$t('Edb.InputHolderAll.input_fre')"
  125. style="width:20%;margin-left:10px"
  126. >
  127. <el-option :label="$t('EtaBasePage.null_val_deal_2')" :value="0"></el-option>
  128. <el-option :label="$t('EtaBasePage.null_val_deal_3')" :value="3"></el-option>
  129. </el-select>
  130. </li>
  131. </ul>
  132. </div>
  133. <div class="dia-bot">
  134. <el-button
  135. type="primary"
  136. style="margin-right: 20px"
  137. @click="saveHandle"
  138. :loading="loading"
  139. >{{loading ? $t('Edb.calculate_ing') : saveBtnMap.get(type)}}</el-button
  140. >
  141. <el-button type="primary" plain @click="cancelHandle('cancel')"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
  142. </div>
  143. <el-popover
  144. placement="top-start"
  145. width="500"
  146. trigger="click">
  147. <p style="padding:30px;line-height:25px;" v-html="$parent.tips.get(type)"/>
  148. <span slot="reference" class="tip-label"><!-- 公式说明 -->{{$t('Edb.formula_instru')}}</span>
  149. </el-popover>
  150. </el-dialog>
  151. </template>
  152. <script>
  153. import { dataBaseInterface } from '@/api/api.js';
  154. import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
  155. import { unitArr } from '@/utils/defaultOptions';
  156. import { frequencyArr } from './util'
  157. const tag_arr = [];
  158. for(let i=0;i<26;i++) tag_arr.push(String.fromCharCode(65+i));
  159. export default {
  160. name:'',
  161. props: {
  162. isBatchComputed: {
  163. type: Boolean
  164. },
  165. type: {
  166. type: Number
  167. },
  168. operationForm: {
  169. type: Object,
  170. },
  171. edbSource: { // ''||'predict'
  172. type: String,
  173. default: ''
  174. }
  175. },
  176. watch: {
  177. isBatchComputed(newval) {
  178. newval && this.getMenu();
  179. let isEta = this.$route.path==='/database';
  180. this.sourceList = [5,61,42,64].includes(this.type)
  181. ? [{ label: /* '累计值转月值' */this.$t('Edb.CalculatesAll.to_month'),key:isEta?5:42 },{ label: /* '累计值转季值' */this.$t('Edb.CalculatesAll.to_quarter'),key: isEta?61:64 }]
  182. : [62,63,65,66].includes(this.type)
  183. ? [{ label: /* '累计值' */this.$t('Edb.CalculatesAll.cumulate'),key: isEta?62:65 },{ label: /* '年初至今累计值' */this.$t('Edb.CalculatesAll.cumulate_oneyear'),key: isEta?63:66 }]
  184. : []
  185. }
  186. },
  187. data () {
  188. return {
  189. searchOptions:[],//指标列表
  190. targetList: [
  191. {
  192. tag: tag_arr[0],
  193. target: '',
  194. start_date: '',
  195. end_date: '',
  196. targetName: '',
  197. unit: '',
  198. menu: '',
  199. frequency: '',
  200. n_num: 1,
  201. emptyType:0,
  202. },
  203. {
  204. tag: tag_arr[1],
  205. target: '',
  206. start_date: '',
  207. end_date: '',
  208. targetName: '',
  209. unit: '',
  210. menu: '',
  211. frequency: '',
  212. n_num: 1,
  213. emptyType:0
  214. },
  215. ],
  216. titleMap: new Map([
  217. [6,this.$t('Edb.CalculatesAll.on_year')],/* '同比值' */
  218. [7,this.$t('Edb.CalculatesAll.differ')],/* '同差值' */
  219. [8,this.$t('Edb.CalculatesAll.n_move_average')],/* 'N数值移动平均计算' */
  220. [12,this.$t('Edb.CalculatesAll.n_rate')],/* 'N数值环比值' */
  221. [13,this.$t('Edb.CalculatesAll.n_differ')],/* 'N数值环差值' */
  222. [14,this.$t('Edb.CalculatesAll.up_conver')],/* 升频 */
  223. [5,this.$t('Edb.CalculatesAll.to_month_quarter')],/* '累计值转月/季值' */
  224. [61,this.$t('Edb.CalculatesAll.to_month_quarter')],/* '累计值转月/季值' */
  225. [62,this.$t('Edb.CalculatesAll.cumulate')],/* '累计值' */
  226. [63,this.$t('Edb.CalculatesAll.cumulate')],/* '累计值' */
  227. [32,this.$t('Edb.CalculatesAll.on_year')],/* '同比值' */
  228. [33,this.$t('Edb.CalculatesAll.differ')],/* '同差值' */
  229. [39,this.$t('Edb.CalculatesAll.n_move_average')],/* 'N数值移动平均计算' */
  230. [43,this.$t('Edb.CalculatesAll.n_rate')],/* 'N数值环比值' */
  231. [44,this.$t('Edb.CalculatesAll.n_differ')],/* 'N数值环差值' */
  232. [45,this.$t('Edb.CalculatesAll.up_conver')],/* 升频 */
  233. [42,this.$t('Edb.CalculatesAll.to_month_quarter')],/* '累计值转月/季值' */
  234. [64,this.$t('Edb.CalculatesAll.to_month_quarter')],/* '累计值转月/季值' */
  235. [65,this.$t('Edb.CalculatesAll.cumulate')],/* '累计值' */
  236. [66,this.$t('Edb.CalculatesAll.cumulate')],/* '累计值' */
  237. [75,this.$t('Edb.CalculatesAll.day_mean')]/* '日均值' */
  238. ]),//标题
  239. saveBtnMap: new Map([
  240. [6,this.$t('Edb.CalculateBtns.on_year')],/* '同比值计算' */
  241. [7,this.$t('Edb.CalculateBtns.differ')],/* '同差值计算' */
  242. [8,this.$t('Edb.CalculateBtns.n_move_average')],/* '移动平均计算' */
  243. [12,this.$t('Edb.CalculateBtns.n_rate')],/* '环比值计算' */
  244. [13,this.$t('Edb.CalculateBtns.n_differ')],/* '环差值计算' */
  245. [14,this.$t('Edb.CalculateBtns.up_conver')],/* '升频计算' */
  246. [32,this.$t('Edb.CalculateBtns.on_year')],/* '同比值计算' */
  247. [33,this.$t('Edb.CalculateBtns.differ')],/* '同差值计算' */
  248. [39,this.$t('Edb.CalculateBtns.n_move_average')],/* '移动平均计算' */
  249. [43,this.$t('Edb.CalculateBtns.n_rate')],/* '环比值计算' */
  250. [44,this.$t('Edb.CalculateBtns.n_differ')],/* '环差值计算' */
  251. [45,this.$t('Edb.CalculateBtns.up_conver')],/* '升频计算' */
  252. [5,this.$t('Edb.CalculateBtns.to_month')],/* '转月值计算' */
  253. [61,this.$t('Edb.CalculateBtns.to_quarter')],/* '转季值计算' */
  254. [62,this.$t('Edb.CalculateBtns.cumulate')],/* '累计值计算' */
  255. [63,this.$t('Edb.CalculateBtns.cumulate_oneyear')],/* '年初至今计算' */
  256. [42,this.$t('Edb.CalculateBtns.to_month')],/* '转月值计算' */
  257. [64,this.$t('Edb.CalculateBtns.to_quarter')],/* '转季值计算' */
  258. [65,this.$t('Edb.CalculateBtns.cumulate')],/* '累计值计算' */
  259. [66,this.$t('Edb.CalculateBtns.cumulate_oneyear')],/* '年初至今计算' */
  260. [75,this.$t('Edb.CalculateBtns.day_mean')],/* '日均值计算' */
  261. ]),//保存文案
  262. unitArr,
  263. options: [],
  264. levelProps: {
  265. label: 'ClassifyName',
  266. value: 'ClassifyId',
  267. children: 'Children',
  268. checkStrictly: true
  269. },
  270. frequencyArr,
  271. fre_options: ['天','周','月','季','年'],
  272. moveTypeOpions: [
  273. {
  274. label: '领先',
  275. key: 1
  276. },
  277. {
  278. label: '滞后',
  279. key: 2
  280. },
  281. ],
  282. loading:false,
  283. search_have_more: false,
  284. search_page: 1,
  285. current_search: '',
  286. sourceList:[]
  287. };
  288. },
  289. methods: {
  290. /* 搜索指标 */
  291. searchTarget(query) {
  292. this.search_page = 1;
  293. this.current_search = query;
  294. this.searchApi(this.current_search);
  295. },
  296. /* 聚焦获取当前检索 */
  297. inputFocusHandle(e) {
  298. this.search_page = 1;
  299. this.current_search = e.target.value;
  300. this.searchApi(this.current_search);
  301. },
  302. async searchApi(query,page=1) {
  303. const res = this.edbSource === 'predict'
  304. ? await preDictEdbInterface.edbSearch({
  305. Keyword: query,
  306. CurrentIndex: page,
  307. FilterSource: this.type === 45 ? 3 : this.type === 66 ? 6 : 1,
  308. Frequency: this.type===64?'季度': ''
  309. })
  310. : await dataBaseInterface.targetSearchByPage({
  311. KeyWord:query,
  312. CurrentIndex: page,
  313. FilterSource: this.type === 14 ? 3 : this.type === 63 ? 6 : 1,
  314. Frequency: this.type===61?'季度': ''
  315. })
  316. if(res.Ret !== 200) return
  317. const { List,Paging } = res.Data;
  318. this.search_have_more = page < Paging.Pages;
  319. this.searchOptions = page === 1 ? List : this.searchOptions.concat(List);
  320. },
  321. searchLoad() {
  322. if(!this.search_have_more) return;
  323. this.searchApi(this.current_search,++this.search_page)
  324. },
  325. /* 选中指标 显示开始日期结束日期 */
  326. chooseTarget(val) {
  327. if (val) {
  328. const choose_obj = this.searchOptions.find(item => item.EdbInfoId === val);
  329. this.targetList.forEach(list => {
  330. if (list.target === val) {
  331. let default_opt = this.setDefaultOption(choose_obj,list);
  332. list.start_date = choose_obj.StartDate;
  333. list.end_date = choose_obj.EndDate;
  334. list.targetName = default_opt.targetName;
  335. list.unit = default_opt.unit;
  336. list.frequency = default_opt.frequency;
  337. list.menu = default_opt.menu||0
  338. }
  339. });
  340. }
  341. },
  342. /* 添加额外的指标列 */
  343. addTargetHandle() {
  344. if(this.targetList.length === 26) this.$message.warning(this.$t('EtaBasePage.num_overrun_msg'))
  345. let tag = this.targetList[this.targetList.length-1].tag;
  346. let index = tag_arr.findIndex(item => item === tag);
  347. const item = {
  348. tag: tag_arr[index+1],
  349. target: '',
  350. start_date: '',
  351. end_date: '',
  352. targetName: '',
  353. unit: '',
  354. menu: '',
  355. frequency: '',
  356. n_num: 1,
  357. emptyType:0
  358. };
  359. this.targetList.push(item);
  360. },
  361. /* 清空指标和关联日期 */
  362. clearHandle(index) {
  363. this.targetList[index].start_date = '';
  364. this.targetList[index].end_date = '';
  365. this.targetList[index].targetName = '';
  366. this.targetList[index].unit = '';
  367. this.targetList[index].menu = '';
  368. this.targetList[index].frequency = '';
  369. this.targetList[index].n_num = 1;
  370. },
  371. // 删除指标
  372. delTarget(index) {
  373. this.targetList.splice(index, 1);
  374. },
  375. /* 获取目录结构 */
  376. async getMenu() {
  377. const res = this.edbSource === 'predict'
  378. ? await preDictEdbInterface.classifyListV2()
  379. : await dataBaseInterface.menuListV3({ClassifyType:2})
  380. if (res.Ret !== 200) return
  381. //this.edbSource !== 'predict' && this.filterNodes(res.Data.AllNodes);
  382. // this.options = res.Data.AllNodes || [];
  383. this.filterNodes(res.Data.AllNodes||[]);
  384. this.options = res.Data.AllNodes || [];
  385. },
  386. // 递归改变第三级目录结构
  387. filterNodes(arr) {
  388. arr.length &&
  389. arr.forEach((item) => {
  390. item.Children.length && this.filterNodes(item.Children);
  391. if (!item.Children.length) {
  392. delete item.Children;
  393. }
  394. });
  395. },
  396. /* 过滤负数 小数点*/
  397. filterCode(item) {
  398. item.moveVal=item.moveVal.replace(/[^\.\d]/g,'').replace('.','');
  399. },
  400. init() {
  401. this.searchOptions = [];
  402. this.targetList = [
  403. {
  404. tag: tag_arr[0],
  405. target: '',
  406. start_date: '',
  407. end_date: '',
  408. targetName: '',
  409. unit: '',
  410. menu: '',
  411. frequency: '',
  412. n_num: 1,
  413. emptyType:0,
  414. },
  415. {
  416. tag: tag_arr[1],
  417. target: '',
  418. start_date: '',
  419. end_date: '',
  420. targetName: '',
  421. unit: '',
  422. menu: '',
  423. frequency: '',
  424. n_num: 1,
  425. emptyType:0,
  426. },
  427. ]
  428. // this.$refs.form.resetFields();
  429. },
  430. /* 保存 */
  431. async saveHandle() {
  432. let filterArr = this.targetList.filter(item=> item.target);
  433. if(!filterArr.length) return this.$message.warning('请选择指标');
  434. let isEnough = filterArr.every(item => item.targetName&&item.unit&&item.menu&&item.frequency)
  435. console.log(isEnough)
  436. if(!isEnough) return this.$message.warning('请填写完整信息');
  437. let params = filterArr.map(item => ({
  438. CalculateId: item.tag,
  439. CalculateInfo: {
  440. ClassifyId: Array.isArray(item.menu)?item.menu[item.menu.length - 1]:item.menu,
  441. EdbName: item.targetName,
  442. Formula: String(item.n_num),
  443. Frequency:item.frequency,
  444. FromEdbInfoId: item.target,
  445. MoveFrequency: "天",
  446. MoveType: 1,
  447. Source: this.type,
  448. Unit: item.unit,
  449. EmptyType:item.emptyType
  450. }
  451. }))
  452. const res = this.edbSource === 'predict'
  453. ? await preDictEdbInterface.batchCalculateTargetAdd(params)
  454. : await dataBaseInterface.batchCalculateTargetAdd(params)
  455. if(res.Ret !== 200) return
  456. const { Fail,Success } = res.Data;
  457. if(Fail.length) {
  458. let message = '';
  459. Fail.forEach(item => {
  460. message+=`${item.CalculateId}:${item.Msg}</br>`
  461. })
  462. this.$message({
  463. dangerouslyUseHTMLString: true,
  464. message,
  465. type: 'error'
  466. })
  467. this.dealFailHandle(Fail)
  468. }else {
  469. // this.$message.success('添加成功');
  470. this.$message.success(this.$t('MsgPrompt.add_msg'));
  471. this.init();
  472. this.$emit('addCallBack','add',{ code:Success[0].UniqueCode,id:Success[0].EdbInfoId,classifyId:Success[0].ClassifyId});
  473. }
  474. },
  475. /* 处理失败 */
  476. dealFailHandle(arr) {
  477. let failTagArr = arr.map(_ =>_.CalculateId);
  478. this.targetList = this.targetList.filter(_ => failTagArr.includes(_.tag));
  479. },
  480. /* 关闭弹窗 */
  481. cancelHandle(type) {
  482. this.init()
  483. this.$emit('cancel');
  484. type==='cancel' && this.$emit('openPrev');
  485. },
  486. // N数值变化,名称也变化
  487. NchangeHandle(tag) {
  488. let obj = this.targetList.find(item => item.tag === tag);
  489. const edbInfo = this.searchOptions.find(item => item.EdbInfoId === obj.target);
  490. let edbName = this.$parent.currentLang==='en'?edbInfo.EdbNameEn:edbInfo.EdbName;
  491. const name_map = {
  492. 8: edbName,
  493. 12: `${edbName}${obj.n_num}${obj.frequency.slice(0,1)}环比`,
  494. 13: `${edbName}${obj.n_num}${obj.frequency.slice(0,1)}环差`,
  495. 39: edbName,
  496. 43: `${edbName}${obj.n_num}${obj.frequency.slice(0,1)}环比`,
  497. 44: `${edbName}${obj.n_num}${obj.frequency.slice(0,1)}环差`,
  498. }
  499. obj.targetName = name_map[this.type] || '';
  500. },
  501. /* 单位默认同步基础指标
  502. 同比 同差 频度同步 单位无
  503. 转月 平均值 频度单位同步
  504. 同比 同差值:默认名称为指标名称+同比/同差
  505. n数值环比/环差值计算:默认名称为指标名称+N+频度+环比/环差
  506. 转月 平均计算 升频默认指标名称同步
  507. */
  508. setDefaultOption(obj,list) {
  509. let edbName = this.$parent.currentLang==='en'?obj.EdbNameEn:obj.EdbName;
  510. let unit = this.$parent.currentLang ==='en'?obj.UnitEn:obj.Unit;
  511. switch (this.type) {
  512. case 6:
  513. case 32:
  514. return {
  515. targetName: `${edbName}同比`,
  516. unit: '无',
  517. frequency: obj.Frequency
  518. }
  519. case 7:
  520. case 33:
  521. return {
  522. targetName: `${edbName}同差`,
  523. unit,
  524. frequency: obj.Frequency
  525. }
  526. case 8:
  527. case 39:
  528. return {
  529. targetName: edbName,
  530. unit,
  531. frequency: obj.Frequency
  532. }
  533. case 14:
  534. case 45: return {
  535. targetName: edbName,
  536. unit,
  537. frequency: '日度'
  538. }
  539. case 12:
  540. case 43:
  541. return{
  542. targetName: `${edbName}${list.n_num}${obj.Frequency.slice(0,1)}环比`,
  543. unit: '无',
  544. frequency: obj.Frequency
  545. }
  546. case 13:
  547. case 44:
  548. return {
  549. targetName: `${edbName}${list.n_num}${obj.Frequency.slice(0,1)}环差`,
  550. unit: '无',
  551. frequency: obj.Frequency
  552. }
  553. case 5:
  554. case 42:
  555. return {
  556. targetName: edbName,
  557. unit,
  558. frequency: obj.Frequency
  559. }
  560. case 61:
  561. case 64:
  562. return {
  563. targetName: edbName,
  564. unit: '无',
  565. frequency: '季度'
  566. }
  567. case 62:
  568. case 65:
  569. return {
  570. targetName: edbName,
  571. unit: '无',
  572. frequency: obj.Frequency
  573. }
  574. case 63:
  575. case 66:
  576. return {
  577. targetName: edbName,
  578. unit: '无',
  579. frequency: obj.Frequency
  580. }
  581. case 75:
  582. return {
  583. targetName: `${edbName}日均值`,
  584. unit,
  585. frequency: obj.Frequency,
  586. menu: obj.ClassifyId,
  587. }
  588. }
  589. }
  590. },
  591. created() {},
  592. mounted() {},
  593. }
  594. </script>
  595. <style lang='scss' scoped>
  596. .batch-computed-dialog {
  597. position: relative;
  598. div::-webkit-scrollbar {
  599. width: 6px !important;
  600. }
  601. .el-input-number .el-input__inner {
  602. padding: 0 34px 0 4px;
  603. }
  604. .el-dialog__body {
  605. max-height: 750px;
  606. overflow: auto;
  607. }
  608. .el-cascader .el-input {
  609. width: 100%;
  610. }
  611. .cont {
  612. padding: 0 40px ;
  613. .label-cont {
  614. display: flex;
  615. align-items: center;
  616. margin-bottom: 15px;
  617. li {
  618. cursor: pointer;
  619. font-size: 16px;
  620. margin-right: 24px;
  621. &:hover {
  622. color: #409EFF;
  623. }
  624. &.act {
  625. color: #409EFF;
  626. }
  627. }
  628. }
  629. .target-ul {
  630. display: flex;
  631. flex-wrap: wrap;
  632. justify-content: space-between;
  633. .target-li {
  634. position: relative;
  635. margin-bottom: 30px;
  636. .li-tag {
  637. font-size: 16px;
  638. margin-right: 8px;
  639. }
  640. .del-tag {
  641. position: absolute;
  642. right: -30px;
  643. top: 12px;
  644. font-size: 16px;
  645. cursor: pointer;
  646. }
  647. .target-date {
  648. color: #5882ef;
  649. position: absolute;
  650. bottom: -25px;
  651. left: 24px;
  652. }
  653. }
  654. }
  655. .add-icon {
  656. font-size: 16px;
  657. color: #5882ef;
  658. cursor: pointer;
  659. }
  660. .form-ul {
  661. padding-top: 20px;
  662. margin-top: 20px;
  663. border-top: 1px dashed #AAB4CC;
  664. .form-li {
  665. display: flex;
  666. align-items: center;
  667. margin-bottom: 15px;
  668. }
  669. }
  670. }
  671. .dia-bot {
  672. padding: 20px 0 30px;
  673. display: flex;
  674. justify-content: center;
  675. }
  676. .tip-cont {
  677. padding: 30px;
  678. }
  679. .tip-label {
  680. position: absolute;
  681. bottom: 30px;
  682. right: 30px;
  683. color: #409EFF;
  684. cursor: pointer;
  685. }
  686. }
  687. </style>