dataEdit.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. <!--
  2. * @Description: 新增/编辑弹框
  3. * @Author: Sugar.
  4. * @Date: 2023-11-24 13:55:00
  5. * @LastEditors: Sugar.
  6. * @LastEditTime: 2023-11-24 13:55:00
  7. * @FilePath: \cattle_webui\src\views\otaMr\dialog\dataEdit.vue
  8. * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
  9. -->
  10. <template>
  11. <el-dialog
  12. :title="title"
  13. :visible.sync="open"
  14. width="70vw"
  15. append-to-body
  16. :close-on-click-modal="false"
  17. @close="cancel"
  18. >
  19. <div class="dialog">
  20. <div>
  21. <el-form :model="form" ref="form" size="small" :rules="rules" :inline="true" label-width="68px">
  22. <el-form-item label="商品类目ID" prop="category" label-width="110px">
  23. <el-select
  24. v-model="form.category"
  25. placeholder="商品类目ID"
  26. clearable
  27. style="width: 240px"
  28. >
  29. <el-option
  30. v-for="dict in dict.type.maoyan_category"
  31. :key="dict.value"
  32. :label="dict.label"
  33. :value="dict.value"
  34. />
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item label="城市" prop="cityId">
  38. <el-cascader
  39. v-model="form.cityId"
  40. :options="cityList"
  41. style="width: 400px;"
  42. :props="{
  43. children: 'child',
  44. label: 'name',
  45. value: 'value',
  46. checkStrictly: true,
  47. emitPath: false,
  48. }"
  49. clearable></el-cascader>
  50. </el-form-item>
  51. </el-form>
  52. </div>
  53. <el-table
  54. row-key="tableId"
  55. ref="tables"
  56. v-loading="loading"
  57. :data="goodsList"
  58. border
  59. @selection-change="handleSelectionChange">
  60. <el-table-column type="selection" width="55"></el-table-column>
  61. <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
  62. <el-table-column label="座位类型" align="center" prop="priceName" />
  63. <el-table-column label="开始时间" align="center" prop="timeStart" />
  64. <el-table-column label="结束时间" align="center" prop="timeEnd" />
  65. <el-table-column label="猫眼排期状态" align="center" prop="status">
  66. <template slot-scope="scope">
  67. <dict-tag :options="dict.type.tiktok_scheduling_status" :value="scope.row.status"/>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  71. <template slot-scope="scope">
  72. <el-button
  73. size="mini"
  74. type="text"
  75. v-if="scope.row.status"
  76. @click="openCalendarFun(scope.row)"
  77. >日历价格配置</el-button>
  78. <!-- <el-button
  79. size="mini"
  80. type="text"
  81. @click="submitForm1(scope.row)"
  82. >{{ scope.row.status == 1 ? '下架':'上架' }}</el-button> -->
  83. </template>
  84. </el-table-column>
  85. </el-table>
  86. </div>
  87. <span slot="footer" class="dialog-footer">
  88. <el-button @click="cancel">取消</el-button>
  89. <el-button
  90. type="primary"
  91. @click="submitForm"
  92. :disabled="!multipleSelection || multipleSelection.length == 0"
  93. :loading="loading"
  94. >
  95. <span v-if="loading">提交中...</span>
  96. <span v-else>推送已选</span>
  97. </el-button>
  98. </span>
  99. <!-- 选择日期 价格 -->
  100. <el-dialog
  101. :visible.sync="openCalendar"
  102. width="70%"
  103. class="text-dia-log-class"
  104. append-to-body
  105. :close-on-click-modal="false"
  106. @close="openPrice = false"
  107. >
  108. <div class="dialog calendar-dialog" v-loading="calendarLoading">
  109. <div>
  110. <el-button type="primary" @click="openCalendarPrice()">价格设置</el-button>
  111. <el-button type="primary" @click="checkIsClear()">一键清空</el-button>
  112. </div>
  113. <el-calendar v-model="timeValue">
  114. <template
  115. slot="dateCell"
  116. slot-scope="{date, data}">
  117. <div :class="['calendar_box', selectTime(data)]" @mouseover="mouseoverFun(data)" @click.stop="clickTimeFun(data)">
  118. <span>{{ data.day.split('-').slice(1).join('-') }}</span>
  119. <div style="width: 100%; display: flex;flex-wrap: wrap;" >
  120. <div
  121. :key="index"
  122. v-for="(item,index) in getPerFormList(data)"
  123. >
  124. {{ item.title }}:{{ item.money }}
  125. </div>
  126. </div>
  127. </div>
  128. </template>
  129. </el-calendar>
  130. </div>
  131. <span slot="footer" class="dialog-footer">
  132. <el-button @click="openCalendar = false">返回</el-button>
  133. </span>
  134. </el-dialog>
  135. <!-- 设置价格 -->
  136. <el-dialog
  137. title="价格设置"
  138. :visible.sync="openPrice"
  139. width="400px"
  140. class="text-dia-log-class"
  141. append-to-body
  142. :close-on-click-modal="false"
  143. @close="openPrice = false"
  144. >
  145. <div v-loading="priceLoading">
  146. <el-form :model="formPrice" ref="formPrice" size="small" :rules="rulesPrice" label-width="100px">
  147. <el-form-item label="日期区间">
  148. {{ showDate() }}
  149. </el-form-item>
  150. <el-form-item label="票面价" prop="originalAmount">
  151. <el-input-number v-model="formPrice.originalAmount" controls-position="right" :min="0"></el-input-number>
  152. </el-form-item>
  153. <el-form-item label="售卖价格" prop="saleAmount">
  154. <el-input-number v-model="formPrice.saleAmount" controls-position="right" :min="0"></el-input-number>
  155. </el-form-item>
  156. <el-form-item label="结算价" prop="costAmount">
  157. <el-input-number v-model="formPrice.costAmount" controls-position="right" :min="0"></el-input-number>
  158. </el-form-item>
  159. </el-form>
  160. </div>
  161. <span slot="footer" class="dialog-footer">
  162. <el-button @click="openPrice = false">返回</el-button>
  163. <el-button @click="submitFormPrice('formPrice','calendarPrice')">提交</el-button>
  164. </span>
  165. </el-dialog>
  166. </el-dialog>
  167. </template>
  168. <script>
  169. import {
  170. pushById,
  171. getCalendarPriceApi,
  172. setCalendarPriceApi,
  173. getPushListApi,
  174. deleteCalendarPriceApi,
  175. getCityListApi
  176. } from "@/api/otaMr/maoyan";
  177. import moment from "moment"
  178. export default {
  179. name: "dataEdit",
  180. dicts: ['maoyan_category','tiktok_scheduling_status'],
  181. data() {
  182. return {
  183. title: "编辑",
  184. model: "EDIT",
  185. open: false,
  186. loading: false,
  187. goodsList: [],
  188. form: {},
  189. rules: {
  190. poiId: [{ required: true, message: "请输入门店POIID", trigger: ["change","blur"] }],
  191. category: [{ required: true, message: "请选择商品类目ID", trigger: ["change","blur"] }],
  192. cityId: [{ required: true, message: "请选择城市", trigger: ["change","blur"] }],
  193. },
  194. multipleSelection: [],
  195. openCalendar: false,
  196. timeValue: new Date(),
  197. timeValueObj: {
  198. prev: null,
  199. next: null,
  200. hover: null
  201. },
  202. calendarLoading: false,
  203. perFormList: [],
  204. openPrice: false,
  205. priceLoading: false,
  206. formPrice: {},
  207. rulesPrice: {
  208. originalAmount: [{ required: true, message: "请输入票面价", trigger: ["change","blur"] }],
  209. saleAmount: [{ required: true, message: "请输入售卖价格", trigger: ["change","blur"] }],
  210. costAmount: [{ required: true, message: "请输入结算价", trigger: ["change","blur"] }],
  211. },
  212. seatTypeId: null,
  213. calendarId: null,
  214. cityList: []
  215. };
  216. },
  217. created() {
  218. this.getCityListFun()
  219. },
  220. methods: {
  221. /**
  222. * 打开弹框
  223. * @date 2023-11-22
  224. * @param {any} obj
  225. * @returns {any}
  226. */
  227. async openDialog(title, obj, type) {
  228. this.open = true;
  229. this.goodsList = []
  230. this.multipleSelection = []
  231. this.timeValueObj = {}
  232. this.form = JSON.parse(JSON.stringify(obj))
  233. await this.getPushListFun(obj,type)
  234. this.$nextTick(()=>{
  235. this.goodsList.forEach((item)=>{
  236. if(item.checkFlag == 1) {
  237. this.$refs.tables.toggleRowSelection(item,true)
  238. }
  239. })
  240. this.$refs["form"].clearValidate()
  241. })
  242. },
  243. /** 获取城市 */
  244. async getCityListFun() {
  245. try {
  246. let res = await getCityListApi()
  247. if(res.code == 200) {
  248. let list = []
  249. list = this.setTreeData(res.data)
  250. console.log("list===",list)
  251. this.cityList = list
  252. }
  253. } catch (error) {
  254. console.error(error)
  255. }
  256. },
  257. setTreeData(list) {
  258. let listCopy = []
  259. list.forEach((item,index)=>{
  260. listCopy.push({
  261. ...item
  262. })
  263. if(item.child && item.child.length>0){
  264. listCopy[index]['child'] = this.setTreeData(item.child)
  265. }else {
  266. listCopy[index]['child'] = null
  267. }
  268. })
  269. return listCopy
  270. },
  271. /** 获取设置的日历价格 */
  272. async getPushListFun(obj,type) {
  273. try {
  274. let res = await getPushListApi({
  275. id: obj.id
  276. })
  277. if(res.code == 200) {
  278. let list = []
  279. if(type == 'yesPush') {
  280. list = res.data
  281. }else {
  282. if( res.data && res.data.length > 0){
  283. obj.sku.forEach((item,index)=>{
  284. let obj1 = JSON.parse(JSON.stringify(item))
  285. res.data.forEach((item1,index1)=>{
  286. if(item1.id == obj1.id){
  287. obj1 = JSON.parse(JSON.stringify(item1))
  288. }
  289. })
  290. list.push({
  291. ...obj1,
  292. tableId: "id_" + index
  293. })
  294. })
  295. this.goodsList = res.data
  296. }else {
  297. obj.sku.forEach((item,index)=>{
  298. list.push({
  299. ...item,
  300. tableId: "id_" + index
  301. })
  302. })
  303. }
  304. }
  305. this.goodsList = JSON.parse(JSON.stringify(list))
  306. }
  307. } catch (error) {
  308. this.loading = false
  309. }
  310. },
  311. /**
  312. * 保存
  313. * @date 2023-11-22
  314. * @returns {any}
  315. */
  316. submitForm() {
  317. this.$refs["form"].validate(async (valid) => {
  318. if (valid) {
  319. try {
  320. if(!this.multipleSelection && this.multipleSelection.length <= 0) {
  321. this.$message.error("请选择上推送的数据!!!");
  322. return
  323. }
  324. let flog = false
  325. let list = []
  326. this.multipleSelection.forEach((item)=>{
  327. list.push({
  328. ...item,
  329. checkFlag: 1
  330. })
  331. // if((!item.actualAmount && item.actualAmount !=0) || (!item.originAmount && item.originAmount !=0)) {
  332. // flog = true
  333. // }
  334. })
  335. // if(flog) {
  336. // this.$message.error("请输入售卖价格和结算价!!!");
  337. // return
  338. // }
  339. this.loading = true;
  340. const { code } = await pushById({
  341. ...this.form,
  342. sku: list
  343. });
  344. if (code === 200) {
  345. this.$message.success("操作成功!");
  346. this.$emit("getList");
  347. this.cancel();
  348. }
  349. } catch (error) {
  350. console.error("error====",error)
  351. } finally {
  352. this.loading = false;
  353. }
  354. }else {
  355. }
  356. })
  357. },
  358. /**
  359. * 重置
  360. * @date 2023-11-22
  361. * @returns {any}
  362. */
  363. reset() {
  364. this.$refs["form"].clearValidate()
  365. },
  366. /**
  367. * 关闭弹框
  368. * @date 2023-11-22
  369. * @returns {any}
  370. */
  371. cancel() {
  372. this.reset();
  373. this.open = false;
  374. },
  375. isCheck(row){
  376. let flog = false
  377. this.multipleSelection.forEach((item,index)=>{
  378. if(item.tableId == row.tableId) {
  379. flog = true
  380. }
  381. })
  382. return flog
  383. },
  384. handleSelectionChange(val) {
  385. console.log("选中了====", val)
  386. this.multipleSelection = val;
  387. },
  388. getPerFormList(data) {
  389. let list = []
  390. this.perFormList.forEach((item,index)=>{
  391. if(item.priceDate && item.priceDate.indexOf(data.day) != -1) {
  392. list = [
  393. { title: '票面价', money: item.originalAmount + '元' },
  394. { title: '售卖价格', money: item.saleAmount + '元' },
  395. { title: '结算价', money: item.costAmount + '元' },
  396. ]
  397. }
  398. })
  399. return list
  400. },
  401. /** 打开价格设置 */
  402. openCalendarPrice(){
  403. if( this.timeValueObj.prev && this.timeValueObj.next ) {
  404. this.openPrice = true
  405. this.formPrice = {}
  406. this.$nextTick(()=>{
  407. this.$refs.formPrice.clearValidate()
  408. })
  409. }else {
  410. this.$message.error("请选择时间区间!!!");
  411. }
  412. },
  413. checkIsClear(){
  414. if (this.timeValueObj.prev && this.timeValueObj.next) {
  415. let minTime = moment(this.timeValueObj.prev).valueOf()
  416. let maxTime = moment(this.timeValueObj.next).valueOf()
  417. let startDate = null
  418. let endDate = null
  419. if (minTime > maxTime) {
  420. startDate = this.timeValueObj.next
  421. endDate = this.timeValueObj.prev
  422. } else {
  423. startDate = this.timeValueObj.prev
  424. endDate = this.timeValueObj.next
  425. }
  426. this.$modal.confirm('确定要清空勾选"' + startDate + '——' + endDate + '"的日期范围内的数据吗?').then(()=> {
  427. this.clearCalendarPrice()
  428. }).catch(() => {});
  429. } else {
  430. this.$message.error("请选择时间区间!!!");
  431. }
  432. },
  433. /** 一键清除 */
  434. async clearCalendarPrice() {
  435. try {
  436. if( this.timeValueObj.prev && this.timeValueObj.next ) {
  437. let minTime = moment(this.timeValueObj.prev).valueOf()
  438. let maxTime = moment(this.timeValueObj.next).valueOf()
  439. let startDate = null
  440. let endDate = null
  441. if(minTime > maxTime){
  442. startDate = this.timeValueObj.next
  443. endDate = this.timeValueObj.prev
  444. }else {
  445. startDate = this.timeValueObj.prev
  446. endDate = this.timeValueObj.next
  447. }
  448. let daysList = [];
  449. let SDate = moment(startDate);
  450. let EDate = moment(endDate);
  451. daysList.push({
  452. "priceDate": SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
  453. });
  454. while (SDate.add(1, "days").isBefore(EDate)) { // 注意这里add方法处理后SDate对象已经改变。
  455. daysList.push({
  456. "priceDate": SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
  457. });
  458. }
  459. if(this.timeValueObj.next != this.timeValueObj.prev){
  460. daysList.push({
  461. "priceDate": EDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
  462. });
  463. }
  464. let res = await deleteCalendarPriceApi({
  465. "id": this.form.id,
  466. "goodsId": this.form.goodsId,
  467. "seatTypeId": this.seatTypeId,
  468. "data": daysList
  469. })
  470. if(res.code == 200) {
  471. this.openPrice = false
  472. this.$modal.msgSuccess(res.msg);
  473. this.getCalendarPrice()
  474. }
  475. }else {
  476. this.$message.error("请选择时间区间!!!");
  477. }
  478. } catch (error) {
  479. }
  480. },
  481. submitFormPrice(formName,funName) {
  482. this.$refs[formName].validate((valid) => {
  483. if (valid) {
  484. this[funName]()
  485. } else {
  486. console.log('error submit!!');
  487. return false;
  488. }
  489. });
  490. },
  491. openCalendarFun(row){
  492. this.seatTypeId = row.seatTypeId
  493. this.calendarId = row.id
  494. this.$set(this,'timeValue',new Date())
  495. this.getCalendarPrice()
  496. },
  497. /** 获取设置的日历价格 */
  498. async getCalendarPrice() {
  499. try {
  500. this.timeValueObj = {}
  501. let res = await getCalendarPriceApi({
  502. "goodsId": this.form.goodsId,
  503. "seatTypeId": this.seatTypeId
  504. })
  505. if(res.code == 200) {
  506. this.openCalendar = true
  507. this.perFormList = res.data
  508. }
  509. } catch (error) {
  510. }
  511. },
  512. /** 设置价格 */
  513. async calendarPrice(type){
  514. try {
  515. if( this.timeValueObj.prev && this.timeValueObj.next ) {
  516. let minTime = moment(this.timeValueObj.prev).valueOf()
  517. let maxTime = moment(this.timeValueObj.next).valueOf()
  518. let startDate = null
  519. let endDate = null
  520. if(minTime > maxTime){
  521. startDate = this.timeValueObj.next
  522. endDate = this.timeValueObj.prev
  523. }else {
  524. startDate = this.timeValueObj.prev
  525. endDate = this.timeValueObj.next
  526. }
  527. let daysList = [];
  528. let SDate = moment(startDate);
  529. let EDate = moment(endDate);
  530. daysList.push({
  531. "id": null,
  532. "priceDate": SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
  533. "originalAmount": this.formPrice.originalAmount,
  534. "saleAmount": this.formPrice.saleAmount,
  535. "costAmount": this.formPrice.costAmount
  536. });
  537. while (SDate.add(1, "days").isBefore(EDate)) { // 注意这里add方法处理后SDate对象已经改变。
  538. daysList.push({
  539. "id": null,
  540. "priceDate": SDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
  541. "originalAmount": this.formPrice.originalAmount,
  542. "saleAmount": this.formPrice.saleAmount,
  543. "costAmount": this.formPrice.costAmount
  544. });
  545. }
  546. if(this.timeValueObj.next != this.timeValueObj.prev){
  547. daysList.push({
  548. "id": null,
  549. "priceDate": EDate.startOf('day').format("YYYY-MM-DD HH:mm:ss"),
  550. "originalAmount": this.formPrice.originalAmount,
  551. "saleAmount": this.formPrice.saleAmount,
  552. "costAmount": this.formPrice.costAmount
  553. });
  554. }
  555. console.log("daysList===",daysList)
  556. daysList.forEach((item,index)=>{
  557. this.perFormList.forEach((item1,index1)=>{
  558. if(moment(item.priceDate).format("YYYY-MM-DD") == moment(item1.priceDate).format("YYYY-MM-DD") ) {
  559. daysList[index].id = item1.id
  560. }
  561. })
  562. })
  563. let res = await setCalendarPriceApi({
  564. "id": this.calendarId,
  565. "goodsId": this.form.goodsId,
  566. "seatTypeId": this.seatTypeId,
  567. "data": daysList
  568. })
  569. if(res.code == 200) {
  570. this.openPrice = false
  571. this.getCalendarPrice()
  572. }
  573. }else {
  574. this.$message.error("请选择时间区间!!!");
  575. }
  576. } catch (error) {
  577. }
  578. },
  579. /** 选中得时间 */
  580. selectTime(data) {
  581. let srt = ''
  582. let newTime = moment(data.day).startOf('day').valueOf()
  583. let newTime1 = moment().startOf('day').valueOf()
  584. if(newTime < newTime1 ) {
  585. return "disable_time"
  586. }
  587. if( this.timeValueObj ) {
  588. if( this.timeValueObj.prev && this.timeValueObj.next ) {
  589. let minTime = moment(this.timeValueObj.prev).valueOf()
  590. let maxTime = moment(this.timeValueObj.next).valueOf()
  591. if(minTime > maxTime){
  592. if(minTime >= newTime && maxTime <= newTime){
  593. srt = 'is-select_time'
  594. }
  595. }else {
  596. if(minTime <= newTime && maxTime >= newTime){
  597. srt = 'is-select_time'
  598. }
  599. }
  600. }else if( this.timeValueObj.prev && !this.timeValueObj.next && this.timeValueObj.hover ){
  601. let minTime = moment(this.timeValueObj.prev).valueOf()
  602. let maxTime = moment(this.timeValueObj.hover).valueOf()
  603. if(minTime > maxTime){
  604. if(minTime >= newTime && maxTime <= newTime){
  605. srt = 'is-select_time_hover'
  606. }
  607. }else {
  608. if(minTime <= newTime && maxTime >= newTime){
  609. srt = 'is-select_time_hover'
  610. }
  611. }
  612. }
  613. }
  614. return srt
  615. },
  616. clickTimeFun(data) {
  617. let newTime1 = moment(data.day).startOf('day').valueOf()
  618. let newTime = moment().startOf('day').valueOf()
  619. if(newTime1 < newTime ) {
  620. return
  621. }
  622. if(moment(data.day).format("YYYY-MM") != moment(this.timeValue).format("YYYY-MM") ) {
  623. return
  624. }
  625. if( !this.timeValueObj || !this.timeValueObj.prev ) {
  626. this.timeValueObj.prev = moment(data.day).format("YYYY-MM-DD")
  627. }else if( this.timeValueObj.prev && !this.timeValueObj.next ){
  628. this.timeValueObj.next = moment(data.day).format("YYYY-MM-DD")
  629. }else if( this.timeValueObj.prev && this.timeValueObj.next ) {
  630. this.timeValueObj.prev = moment(data.day).format("YYYY-MM-DD")
  631. this.timeValueObj.next = null
  632. }
  633. },
  634. mouseoverFun(data) {
  635. if(moment(data.day).format("YYYY-MM") != moment(this.timeValue).format("YYYY-MM") ) {
  636. return
  637. }
  638. if( this.timeValueObj.prev && !this.timeValueObj.next ){
  639. this.timeValueObj.hover = moment(data.day).format("YYYY-MM-DD")
  640. this.timeValue = new Date(this.timeValueObj.hover)
  641. }
  642. },
  643. showDate(){
  644. let srt = ''
  645. let minTime = moment(this.timeValueObj.prev).valueOf()
  646. let maxTime = moment(this.timeValueObj.next).valueOf()
  647. let startDate = null
  648. let endDate = null
  649. if (minTime > maxTime) {
  650. startDate = this.timeValueObj.next
  651. endDate = this.timeValueObj.prev
  652. } else {
  653. startDate = this.timeValueObj.prev
  654. endDate = this.timeValueObj.next
  655. }
  656. return startDate + "至" + endDate
  657. }
  658. },
  659. };
  660. </script>
  661. <style lang="scss" scoped>
  662. .dialog {
  663. padding: 0 30px;
  664. max-height: 65vh;
  665. overflow-y: auto;
  666. }
  667. .dialog {
  668. padding: 0 30px;
  669. .upload-btn {
  670. width: 100px;
  671. height: 100px;
  672. background-color: #fbfdff;
  673. border: dashed 1px #c0ccda;
  674. border-radius: 5px;
  675. i {
  676. font-size: 30px;
  677. margin-top: 20px;
  678. }
  679. &-text {
  680. margin-top: -10px;
  681. }
  682. }
  683. .avatar {
  684. cursor: pointer;
  685. }
  686. }
  687. .calendar-dialog ::v-deep .el-calendar-table .el-calendar-day {
  688. padding: none !important;
  689. height: auto;
  690. }
  691. .calendar_box {
  692. width: 100%;
  693. min-height: 86px;
  694. }
  695. .disable_time {
  696. user-select: none;
  697. cursor: not-allowed;
  698. }
  699. .is-select_time {
  700. background-color: rgba(30,144,255,0.8);
  701. }
  702. .is-select_time_hover {
  703. background-color: rgba(30,144,255,0.4);
  704. }
  705. </style>