imp08.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="impDiv" @click.stop="void(0)" :style="{width:width+'px',top:xy.top+'px',left:xy.left-width+'px'}">
  3. <div class="triangle"></div>
  4. <div class="" style="text-align: center;margin-top:0%;width: 100%;letter-spacing: 5px;color: #cdd2fb;font-size: 18px;">
  5. <span style="position: relative;">产能预期天数<el-input v-model="preday" type="number" placeholder="选择" style="width: 100px;"/>
  6. <el-button style="margin:10px" @click="impdata">导出</el-button>
  7. </span>
  8. </div>
  9. <div>
  10. </div>
  11. </div>
  12. </template>
  13. <style>
  14. @import '../../styles/main.css';
  15. .el-date-editor.el-input, .el-date-editor.el-input__wrapper{
  16. width:150px;
  17. }
  18. .el-input__wrapper{
  19. background-color:#1f4774;
  20. box-shadow: 0 0 0 1px #7f9bdd inset !important;
  21. }
  22. .el-input__wrapper input{
  23. border:0px !important;
  24. color:#fff;
  25. }
  26. </style>
  27. <script>
  28. import { ref,onMounted,watch } from 'vue';
  29. import api from "@/api/system";
  30. import { ElDatePicker,ElMessage } from 'element-plus';
  31. import 'element-plus/dist/index.css'; // 确保导入样式文件
  32. import * as echarts from 'echarts';
  33. export default {
  34. props:{
  35. xy:{
  36. type:Object
  37. }
  38. },
  39. setup(props,{emit}){
  40. const width=ref(300)
  41. let preday=ref(7);
  42. function impquery(){
  43. }
  44. function impdata(){
  45. if(preday.value=='' || preday.value==null){
  46. ElMessage({
  47. message: "未输入预期天数",
  48. type: "error"
  49. })
  50. return;
  51. }
  52. window.open(ApiServer + "/api/export/yarn-specifications?day="+preday.value)
  53. }
  54. onMounted(()=>{
  55. })
  56. return{
  57. width,
  58. preday,
  59. impdata,
  60. impquery,
  61. }
  62. }
  63. }
  64. </script>