index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <el-dialog
  3. :title="title"
  4. :center="true"
  5. align="left"
  6. top="8vh"
  7. width="1040px"
  8. @close="showModelThis = false"
  9. :close-on-click-modal="false"
  10. :visible.sync="showModelThis"
  11. v-loading="loading"
  12. element-loading-text="拼命加载中"
  13. element-loading-spinner="el-icon-loading"
  14. element-loading-background="rgba(0, 0, 0, 0.8)"
  15. append-to-body
  16. >
  17. <show-goods-data-table style="margin:-20px 0 0 0"
  18. :newTime="newTime"
  19. v-if="newTime !== ''"
  20. :type="type"
  21. :skucode="skuCode"
  22. :spucode="spuCode"
  23. :iscgd="iscgd"
  24. :border="true"
  25. >
  26. </show-goods-data-table>
  27. </el-dialog>
  28. </template>
  29. <script>
  30. export default {
  31. name: "showGoodsDataTableModal",
  32. props: ["showModel", 'title',"type", "skuCode", "spuCode", "iscgd"],
  33. data() {
  34. return {
  35. newTime: "",
  36. loading: true,
  37. showModelThis:this.showModel
  38. };
  39. },
  40. watch: {
  41. showModel: function (val) {
  42. this.showModelThis = val;
  43. if (val) {
  44. this.loading = true;
  45. this.getNewTime();
  46. }
  47. },
  48. showModelThis(val) {
  49. if (!val) {
  50. this.$emit("cancel");
  51. }
  52. },
  53. },
  54. methods: {
  55. getNewTime() {
  56. this.newTime = new Date().valueOf() + "";
  57. this.loading = false;
  58. },
  59. },
  60. };
  61. </script>
  62. <style>
  63. </style>