batchComptedDialog.vue 20 KB

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