vWeek.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814
  1. <template>
  2. <div class="vsummary">
  3. <div class="timeDiv">
  4. <div>
  5. <span>时间范围:</span>
  6. <a-button type="default" @click="lastWeekHandle">过去一周</a-button>
  7. <a-range-picker
  8. :disabled-date="disabledDate"
  9. format="YYYY-MM-DD"
  10. style="width: 200px;"
  11. @change="dateChange"
  12. v-model="dateRange"
  13. />
  14. <span v-show="daysFlag">共{{totalSelect}}天</span>
  15. </div>
  16. <div>
  17. <span>消耗:</span>
  18. <a-input-number id="inputNumber" v-model="consumeValue" :min="0" @change="consumeOnChange" />
  19. <span>视频ID:</span>
  20. <a-input class="myinput" v-model="videoID" />
  21. </div>
  22. <a-button type="primary" @click="searchRes">查询</a-button>
  23. </div>
  24. <div style="display:flex;margin-bottom:15px" class="btndiv">
  25. <a-button type="primary" @click="customColumns">自定义列</a-button>
  26. </div>
  27. <a-modal v-model="visible" title="自定义列" on-ok="handleOk" width="65%">
  28. <template slot="footer">
  29. <a-button key="back" @click="handleCancel">取消</a-button>
  30. <a-button key="submit" type="primary" :loading="loading" @click="handleOk">应用</a-button>
  31. </template>
  32. <!-- <a-input-search placeholder="输入要添加的列的名称" style="width: 40%" enter-button @search="onSearch" /> -->
  33. <div class="zhuti">
  34. <div class="addlist">
  35. <p>可添加的列</p>
  36. <div class="selectionList">
  37. <!-- v-for="(item,index) in addColumns" :key="index" -->
  38. <selectComponent :showCol="listNum" @getshowlist="getshowlist" :fixedColLength='columnsFixd.length' />
  39. </div>
  40. </div>
  41. <div class="listNum">
  42. <p>已选{{columns.length}}列</p>
  43. <a-button id="btn" type="link" @click="clearAllList">清空全部</a-button>
  44. <ul class="selectlist">
  45. <li v-for="(item,index) in listNum" :key="index">
  46. <span v-if=" index <6">
  47. <a-icon type="lock" />
  48. <span class="listText">{{item.title}}</span>
  49. </span>
  50. <span v-else-if=" index >5">
  51. <a-icon type="menu" style="color:#ccc" />
  52. <span class="listText">{{item.title}}</span>
  53. <a-icon
  54. type="close"
  55. @click="deleteCol(item,index)"
  56. id="closeStyle"
  57. style="fontSize:12px;"
  58. />
  59. </span>
  60. </li>
  61. </ul>
  62. </div>
  63. </div>
  64. </a-modal>
  65. <a-table
  66. size="middle"
  67. :columns="columns"
  68. :dataSource="data"
  69. bordered
  70. id="outTable"
  71. :pagination="ipagination"
  72. :scroll="{ x: scrollX }"
  73. :loading="loading"
  74. tableLayout="auto"
  75. ref="vSummaryTable"
  76. >
  77. <span slot="operation" slot-scope="text, record">
  78. <a href="javascript:;" @click="opendetail(text, record)">查看明细</a>
  79. </span>
  80. <div slot="videoU" slot-scope="test,records">
  81. <img :src="records.url+'?x-oss-process=video/snapshot,t_0,m_fast'" alt="" style="height:200px;width:112.5px" @click="openVideo(records.url)">
  82. </div>
  83. <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
  84. <span
  85. slot="play25FeedBreakRate"
  86. slot-scope="play25FeedBreakRate"
  87. >{{ play25FeedBreakRate | toPercentage }}</span>
  88. <span slot="playOverRate" slot-scope="playOverRate">{{ playOverRate | toPercentage }}</span>
  89. <span slot="convertRate" slot-scope="convertRate">{{ convertRate | toPercentage }}</span>
  90. <span
  91. slot="downloadStartRate"
  92. slot-scope="downloadStartRate"
  93. >{{ downloadStartRate | toPercentage }}</span>
  94. <span
  95. slot="downloadFinishRate"
  96. slot-scope="downloadFinishRate"
  97. >{{ downloadFinishRate | toPercentage }}</span>
  98. <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
  99. <span
  100. slot="activeRegisterRate"
  101. slot-scope="activeRegisterRate"
  102. >{{ activeRegisterRate | toPercentage }}</span>
  103. <span
  104. slot="gameAddictionRate"
  105. slot-scope="gameAddictionRate"
  106. >{{ gameAddictionRate | toPercentage }}</span>
  107. <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
  108. <span slot="statDatetime" slot-scope="">{{ timedata[0]+'~'+timedata[1]}}</span>
  109. <span slot="convertRate" slot-scope="convertRate">{{ convertRate | toPercentage }}</span>
  110. <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
  111. <span slot="ctr" slot-scope="ctr">{{ ctr | toPercentage }}</span>
  112. <span slot="cpm" slot-scope="cpm">{{ cpm | toPercentage }}</span>
  113. <span slot="activeRate" slot-scope="activeRate">{{ activeRate | toPercentage }}</span>
  114. <span slot="installFinishRate" slot-scope="installFinishRate">{{ installFinishRate | toPercentage }}</span>
  115. <span slot="validPlayRate" slot-scope="validPlayRate">{{ validPlayRate | tofixed }}</span>
  116. <span slot="activePayCost" slot-scope="activePayCost">{{ activePayCost | tofixed }}</span>
  117. <span slot="nextDayOpenCost" slot-scope="nextDayOpenCost">{{ nextDayOpenCost | tofixed }}</span>
  118. <span slot="validPlayCost" slot-scope="validPlayCost">{{ validPlayCost | tofixed }}</span>
  119. <span slot="activeCost" slot-scope="activeCost">{{ activeCost | tofixed }}</span>
  120. <span slot="gameAddictionCost" slot-scope="gameAddictionCost">{{ gameAddictionCost | tofixed }}</span>
  121. <span slot="downloadFinishCost" slot-scope="downloadFinishCost">{{ downloadFinishCost | tofixed }}</span>
  122. <span slot="downloadStartCost" slot-scope="downloadStartCost">{{ downloadStartCost | tofixed }}</span>
  123. <span slot="installFinishCost" slot-scope="installFinishCost">{{ installFinishCost | tofixed }}</span>
  124. </a-table>
  125. <!-- 明细表 -->
  126. <a-modal v-model="visibleDetail" title="详细信息" width="60%" :footer="null" >
  127. <a-button type="default" @click="exportExcel" id="mybtn">导出报表</a-button>
  128. <a-table
  129. :columns="detailConsum"
  130. :data-source="detailData"
  131. bordered
  132. tableLayout="auto"
  133. :pagination="false"
  134. >
  135. <span slot="huanbi" slot-scope="huanbi">{{ huanbi | toPercentage }}</span>
  136. </a-table>
  137. </a-modal>
  138. <!-- 视频详情 -->
  139. <a-modal v-model="Videovisible" title="视频详情" @ok="videoOk" :footer="null" width='50%'>
  140. <video
  141. @click.stop
  142. class="video"
  143. :src="videoUrl"
  144. controls="controls"
  145. style="height:600px;width:100%"
  146. >您的浏览器不支持 video 标签。</video>
  147. </a-modal>
  148. </div>
  149. </template>
  150. <script>
  151. import moment from 'moment'
  152. import { JeecgListMixin } from '@/mixins/ipagination'
  153. import { getAction, postAction, downFile, downFilePost } from '@/api/manage'
  154. import selectComponent from './selectComponent'
  155. const columnsFixd = [
  156. {
  157. title: '时间',
  158. dataIndex: 'statDatetime',
  159. align: 'center',
  160. width: 120,
  161. fixed: 'left',
  162. scopedSlots: { customRender: 'statDatetime' }
  163. },
  164. {
  165. title: '视频',
  166. dataIndex: 'videoU',
  167. align: 'center',
  168. width: 150,
  169. fixed: 'left',
  170. key: 'videoU',
  171. scopedSlots: { customRender: 'videoU' }
  172. },
  173. {
  174. title: '视频ID',
  175. dataIndex: 'signature',
  176. align: 'center',
  177. width: 100,
  178. fixed: 'left'
  179. },
  180. {
  181. title: '视频链接',
  182. dataIndex: 'url',
  183. align: 'center',
  184. width: 150,
  185. fixed: 'left'
  186. },
  187. {
  188. title: '视频描述',
  189. dataIndex: 'materialName',
  190. align: 'center',
  191. width: 100,
  192. fixed: 'left'
  193. },
  194. {
  195. title: '操作',
  196. dataIndex: 'operation',
  197. align: 'center',
  198. scopedSlots: { customRender: 'operation' },
  199. width: 80,
  200. fixed: 'left'
  201. }
  202. ]
  203. let variableCol = [
  204. {
  205. title: '消耗',
  206. dataIndex: 'cost',
  207. scopedSlots: { customRender: 'cost' },
  208. align: 'center',
  209. sorter: (a, b) => a.cost - b.cost
  210. },
  211. {
  212. title: '点击数',
  213. dataIndex: 'clickMaterial',
  214. align: 'center',
  215. scopedSlots: { customRender: 'clickMaterial' },
  216. sorter: (a, b) => a.clickMaterial - b.clickMaterial
  217. },
  218. {
  219. title: '点击率',
  220. dataIndex: 'ctr',
  221. align: 'center',
  222. width: 50,
  223. scopedSlots: { customRender: 'ctr' },
  224. sorter: (a, b) => a.ctr - b.ctr
  225. },
  226. {
  227. title: '展示数',
  228. dataIndex: 'showMaterial',
  229. align: 'center',
  230. scopedSlots: { customRender: 'showMaterial' },
  231. sorter: (a, b) => a.showMaterial - b.showMaterial
  232. },
  233. {
  234. title: '25%进度播放率',
  235. width:170,
  236. dataIndex: 'play25FeedBreakRate',
  237. align: 'center',
  238. scopedSlots: { customRender: 'play25FeedBreakRate' },
  239. sorter: (a, b) => a.play25FeedBreakRate - b.play25FeedBreakRate
  240. },
  241. {
  242. title: '播完率',
  243. dataIndex: 'playOverRate',
  244. align: 'center',
  245. width:100,
  246. tip: '表示广告在投放期内的预估花费金额。当天数据可能会有波动,次日稳定',
  247. scopedSlots: { customRender: 'playOverRate' },
  248. sorter: (a, b) => a.playOverRate - b.playOverRate
  249. },
  250. {
  251. title: '转化数',
  252. dataIndex: 'convertMaterial',
  253. align: 'center',
  254. scopedSlots: { customRender: 'convertMaterial' },
  255. sorter: (a, b) => a.convertMaterial - b.convertMaterial
  256. },
  257. {
  258. title: '转化率',
  259. dataIndex: 'convertRate',
  260. align: 'center',
  261. scopedSlots: { customRender: 'convertRate' },
  262. sorter: (a, b) => a.convertRate - b.convertRate
  263. }
  264. ]
  265. let detailConsum = [
  266. {
  267. title: '客户',
  268. dataIndex: 'advertiserName',
  269. align: 'center',
  270. customRender: (value, row, index) => {
  271. const obj = {
  272. children: value,
  273. attrs: {}
  274. }
  275. if (index === 0) {
  276. obj.attrs.rowSpan = 7
  277. } else {
  278. obj.attrs.rowSpan = 0
  279. }
  280. return obj
  281. }
  282. },
  283. {
  284. title: '视频链接',
  285. dataIndex: 'videoUrl',
  286. align: 'center',
  287. width:250,
  288. customRender: (value, row, index) => {
  289. const obj = {
  290. children: value,
  291. attrs: {}
  292. }
  293. if (index == 0) {
  294. obj.attrs.rowSpan = 7
  295. }else {
  296. obj.attrs.rowSpan = 0
  297. }
  298. return obj
  299. }
  300. },
  301. {
  302. title: '时间',
  303. dataIndex: 'statDatetime',
  304. align: 'center',
  305. width: 120
  306. },
  307. {
  308. title: '消耗',
  309. dataIndex: 'cost',
  310. scopedSlots: { customRender: 'cost' },
  311. align: 'center'
  312. },
  313. {
  314. title: '环比',
  315. dataIndex: 'huanbi',
  316. align: 'center'
  317. }
  318. ]
  319. export default {
  320. data() {
  321. return {
  322. //是否打开视频
  323. Videovisible:false,
  324. videoUrl:'',
  325. columnsFixd,
  326. //明细的表头
  327. detailConsum,
  328. //明细里的数据
  329. detailData: [],
  330. consumeValue: 1000,
  331. //视频ID
  332. videoID: '',
  333. columns: [...columnsFixd, ...variableCol],
  334. data: [],
  335. totalSelect: 0,
  336. daysFlag: false,
  337. dateRange: [],
  338. dataElse: [],
  339. loading: false,
  340. visible: false,
  341. //自定义列的搜索框
  342. searchInput: '',
  343. //弹出框中现实的选中列数
  344. scrollX: 0,
  345. listNum: [],
  346. value: this.text,
  347. editable: false,
  348. //详细信息的开关
  349. visibleDetail: false,
  350. //时间选择 字符串类型
  351. timedata: [],
  352. //记录点开的视频的md5
  353. signature:''
  354. }
  355. },
  356. components: {
  357. selectComponent
  358. },
  359. props: {
  360. text: String
  361. },
  362. mixins: [JeecgListMixin],
  363. methods: {
  364. moment,
  365. //打开视频
  366. openVideo(val){
  367. this.Videovisible=true;
  368. this.videoUrl=val
  369. },
  370. videoOk(){
  371. this.Videovisible=false
  372. },
  373. disabledDate(current) {
  374. // console.log(current)
  375. return current && current > moment().subtract(1, 'day')
  376. },
  377. //过去一周按钮事件
  378. lastWeekHandle() {
  379. let lastStart =
  380. moment()
  381. .subtract(7, 'days')
  382. .format('YYYY-MM-DD')
  383. let lastEnd = moment()
  384. .subtract(1, 'days')
  385. .format('YYYY-MM-DD')
  386. this.dateRange=[moment(lastStart),moment(lastEnd)]
  387. console.log(this.dateRange);
  388. this.timedata=this.dateRange
  389. this.timedata=this.dateRange
  390. // console.log(this.dateRange)
  391. this.totalSelect = 7
  392. this.daysFlag = true
  393. this.timedata=[this.dateRange[0]._i,this.dateRange[1]._i]
  394. postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListWeek', {
  395. startDate: this.timedata[0],
  396. endDate: this.timedata[1],
  397. cost: this.consumeValue,
  398. signature: this.videoID
  399. }).then(res => {
  400. let resArr = []
  401. this.loading = false
  402. console.log(res)
  403. if (res.success) {
  404. let result = res.result
  405. this.data.push({ ...result, key: 1 })
  406. result.map((item, index) => {
  407. item.key = index
  408. })
  409. this.data = result
  410. }
  411. })
  412. },
  413. consumeOnChange() {},
  414. //查询按钮
  415. searchRes() {
  416. this.date = []
  417. this.loading = true
  418. postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListWeek', {
  419. startDate: this.timedata[0],
  420. endDate: this.timedata[1],
  421. cost: this.consumeValue,
  422. signature: this.videoID
  423. }).then(res => {
  424. let resArr = []
  425. this.loading = false
  426. console.log(res)
  427. if (res.success) {
  428. let result = res.result
  429. this.data.push({ ...result, key: 1 })
  430. result.map((item, index) => {
  431. item.key = index
  432. })
  433. this.data = result
  434. }
  435. })
  436. },
  437. //导出报表
  438. exportExcel() {
  439. // var params = {}
  440. // params.projectId = this.projectId
  441. // params.disCount = this.discount
  442. // params.statDate = this.statDate.format('YYYY-MM-DD')
  443. var name = this.data.filter(item => {
  444. return item.signature == this.signature
  445. })[0].projectName
  446. downFilePost('/toutiao/videoReportDaily/bytedanceVideoInfoListDetailExportExcel', {
  447. startDate: this.timedata[0],
  448. endDate: this.timedata[1],
  449. signature: this.signature
  450. }).then(res => {
  451. let blob = new Blob([res], {
  452. type: 'application/vnd.ms-excel'
  453. })
  454. let downloadElement = document.createElement('a')
  455. let href = window.URL.createObjectURL(blob) //创建下载的链接
  456. downloadElement.href = href
  457. downloadElement.download = name + '-' +this.timedata[0] + '-' + this.timedata[1] //下载后文件名
  458. document.body.appendChild(downloadElement)
  459. downloadElement.click() //点击下载
  460. document.body.removeChild(downloadElement) //下载完成移除元素
  461. window.URL.revokeObjectURL(href) //释放掉blob对象
  462. })
  463. },
  464. //日期选择回调
  465. dateChange(data, dataString) {
  466. console.log(data, dataString)
  467. if(data.length){
  468. this.timedata = dataString
  469. this.dateRange[0] = data[0]
  470. this.totalSelect = (data[1]._d - data[0]._d) / (24 * 60 * 60 * 1000) + 1
  471. this.daysFlag = true
  472. if (this.totalSelect > 7) {
  473. this.$message.error('时间跨度太长啦,选小一点好嘛?')
  474. this.daysFlag = false
  475. this.dateRange = []
  476. }
  477. }else{
  478. this.daysFlag=false
  479. this.dateRange=[]
  480. }
  481. },
  482. //弹出框打开,自定义列
  483. customColumns() {
  484. this.visible = true
  485. this.listNum = [...this.columns]
  486. },
  487. //弹出框确定
  488. handleOk(e) {
  489. this.loading = false
  490. this.visible = false
  491. if(this.listNum.length>=10){
  492. let newlist=this.listNum.slice(columnsFixd.length)
  493. console.log(newlist)
  494. this.columns = [...columnsFixd,...newlist]
  495. }
  496. if (this.listNum.length > 12 && this.listNum.length<=13 ) {
  497. this.scrollX =1900
  498. console.log(this.$refs.vSummaryTable)
  499. }
  500. else if(this.listNum.length > 13 && this.listNum.length<=15){
  501. this.scrollX = (this.listNum.length - 12) * 1000
  502. }
  503. else if(this.listNum.length >15 && this.listNum.length<=17){
  504. this.scrollX = (this.listNum.length - 12) * 600
  505. }
  506. else if(this.listNum.length >=18){
  507. this.scrollX = (this.listNum.length - 12) * 400
  508. }else{
  509. this.scrollX = 0
  510. }
  511. if (this.listNum.length == 6) {
  512. this.columns.map((item, index) => {
  513. item.width = 300
  514. })
  515. } else {
  516. this.columns.map((item, index) => {
  517. if (index == 1) {
  518. item.width = 150
  519. } else if (index > 2 && index < 4 && index == 0) {
  520. item.width = 100
  521. }
  522. })
  523. // console.log(2)
  524. }
  525. },
  526. //弹出框取消按钮
  527. handleCancel(e) {
  528. this.visible = false
  529. },
  530. //弹出框里的搜索框
  531. onSearch(value) {
  532. console.log(value)
  533. },
  534. //清空全部按钮的事件
  535. clearAllList() {
  536. this.listNum = [...columnsFixd]
  537. console.log(this.$refs.vSummaryTable)
  538. },
  539. //li展示里的关闭按钮 删除当前被选中的这一个列
  540. deleteCol(item, index) {
  541. this.listNum = this.listNum.filter((item1, num) => {
  542. return num != index
  543. })
  544. },
  545. //表格里的操作 打开明细
  546. showModal() {
  547. this.visibleDetail = true
  548. },
  549. //从自定义列拿选择的项
  550. getshowlist(val) {
  551. console.log(val)
  552. if (val.length) {
  553. console.log(val);
  554. this.listNum = [...this.listNum,...val]
  555. } else {
  556. var arr
  557. arr = this.listNum.filter((item, index) => {
  558. return item.dataIndex == val.dataIndex
  559. })
  560. }
  561. if (arr.length > 0) {
  562. var index
  563. this.listNum.map((item,ind) => {
  564. if(item.dataIndex == val.dataIndex){
  565. index=ind
  566. }
  567. })
  568. console.log(index)
  569. this.listNum.splice(index, 1)
  570. } else {
  571. this.listNum.push(val)
  572. }
  573. },
  574. //点击查看明细按钮的事件
  575. opendetail(text, record) {
  576. console.log(text, record)
  577. this.visibleDetail = true
  578. this.detailData = []
  579. this.signature=record.signature
  580. console.log(this.signature)
  581. postAction('/toutiao/videoReportDaily/bytedanceVideoInfoListDetail', {
  582. startDate: this.timedata[0],
  583. endDate: this.timedata[1],
  584. signature: record.signature
  585. }).then(res => {
  586. let resArr = []
  587. console.log(res)
  588. if (res.success) {
  589. let result = res.result
  590. this.detailData.push({ ...result, key: 1 })
  591. result.map((item, index) => {
  592. item.key = index
  593. })
  594. this.detailData = result
  595. }
  596. })
  597. }
  598. },
  599. activated() {
  600. console.log('activated')
  601. // this.getParticipateList()
  602. this.statDate = moment().subtract(1, 'day')
  603. moment().format('YYYY-MM-DD_HH:mm')
  604. postAction('/toutiao/videoReportDaily/getColumnJson', {
  605. columnType:3,
  606. }).then((res)=>{
  607. // console.log(res)
  608. if(res.success){
  609. // console.log(JSON.parse(res.result))
  610. let columns=JSON.parse(res.result)
  611. if(columns.length){
  612. columns.map((item,index)=>{
  613. if(index>columnsFixd.length-1){
  614. item.sorter=function(a,b){ return a[item.dataIndex]-b[item.dataIndex]}
  615. }})
  616. this.columns=columns
  617. // console.log(this.columns)
  618. }
  619. }
  620. })
  621. },
  622. deactivated() {
  623. let arr = JSON.stringify(this.columns)
  624. // console.log(arr)
  625. postAction('/toutiao/videoReportDaily/saveOrUpdateColumnJson', {
  626. json: arr,
  627. columnType: 3
  628. }).then(res => {
  629. // console.log(res)
  630. })
  631. },
  632. filters: {
  633. toPercentage(val) {
  634. return (val * 100).toFixed(2) + '%'
  635. // return val
  636. },
  637. toshowTime(val) {
  638. // console.log(val, this.timedata)
  639. // return this.timedata[0] + '~' + this.timedata[1]
  640. return val
  641. },
  642. tofixed(val){
  643. return Number(val).toFixed(2)
  644. }
  645. }
  646. }
  647. </script>
  648. <style lang="less" scoped>
  649. .vsummary {
  650. width: 100%;
  651. height: 100%;
  652. }
  653. .timeDiv {
  654. display: flex;
  655. justify-content: space-between;
  656. }
  657. span {
  658. margin-left: 5px;
  659. }
  660. .myinput {
  661. width: 40%;
  662. }
  663. .addlist {
  664. float: left;
  665. width: 70%;
  666. border: 1px solid #eee;
  667. }
  668. .listNum {
  669. float: right;
  670. width: 28%;
  671. border: 1px solid #eee;
  672. position: relative;
  673. }
  674. .zhuti {
  675. margin-top: 15px;
  676. overflow: hidden;
  677. p {
  678. height: 40px;
  679. line-height: 20px;
  680. padding: 10px 15px;
  681. background: rgb(249, 250, 253);
  682. border-bottom: 1px solid #eee;
  683. }
  684. #btn {
  685. position: absolute;
  686. right: 0;
  687. top: 5px;
  688. }
  689. .selectlist {
  690. width:100%;
  691. list-style: none;
  692. margin: 0;
  693. height: 450px;
  694. padding: 0 15px 10px;
  695. overflow: auto;
  696. li {
  697. width: 100%;
  698. padding: 5px 8px;
  699. margin: 6px 0;
  700. border-radius: 10px;
  701. background: rgb(248, 248, 248);
  702. height: 32px;
  703. position: relative;
  704. span {
  705. width: 80%;
  706. height: 100%;
  707. display: inline-block;
  708. margin: 0 10px;
  709. // overflow:hidden;
  710. // text-overflow:ellipsis;
  711. // white-space: nowrap;
  712. }
  713. .listText{
  714. position: absolute;
  715. top: 2;
  716. left: 10;
  717. width: 40%;
  718. overflow: hidden;
  719. white-space: nowrap;
  720. text-overflow: ellipsis;
  721. }
  722. #closeStyle {
  723. position: absolute;
  724. top: 9px;
  725. right: 7px;
  726. }
  727. }
  728. }
  729. }
  730. .addlist {
  731. float: left;
  732. width: 70%;
  733. border: 1px solid #eee;
  734. .selectionList {
  735. padding: 10px 15px;
  736. height: 450px;
  737. overflow: auto;
  738. .leibie {
  739. .leiName {
  740. font-size: 26px;
  741. text-align: left;
  742. }
  743. }
  744. .jutixiang {
  745. display: inline-block;
  746. width: 32%;
  747. box-sizing: border-box;
  748. padding: 10px 3px;
  749. }
  750. }
  751. }
  752. #mybtn {
  753. margin: 0 10px 15px 0;
  754. }
  755. </style>