addGatepost.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <!-- 添加门岗信息 -->
  3. <div class="addWagonLoad">
  4. <PageTitle>返回</PageTitle>
  5. <el-divider content-position="left">门岗信息</el-divider>
  6. <div class="form-box" style="margin-right: 10rem">
  7. <!-- 287 -->
  8. <dil-form :formId="328" v-model="form1" ref="from1">
  9. </dil-form>
  10. </div>
  11. <div class="button-box">
  12. <el-button @click="cancel">取消</el-button>
  13. <el-button type="primary" @click="makeSure">确定</el-button>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import PageTitle from "@/components/Page/Title";
  19. export default {
  20. components: { PageTitle },
  21. data() {
  22. return {
  23. form1: {},
  24. startTime:'',
  25. endTime:'',
  26. value: undefined,
  27. drawer: false,
  28. direction: 'btt',
  29. materialName:"",
  30. gatepostRules:"",
  31. inputText:"",
  32. entityOutTypeList:{},
  33. };
  34. },
  35. mounted() {},
  36. methods: {
  37. makeSure() {
  38. console.log(this.form1)
  39. let RmsGatepost={
  40. gatepostName:this.form1.gatepostName,
  41. gatepostLongitude:this.form1.gatepostLongitude,
  42. gatepostLatitude:this.form1.gatepostLatitude,
  43. gatepostPriority:this.form1.gatepostPriority
  44. };
  45. if(
  46. RmsGatepost.gatepostName==null ||
  47. RmsGatepost.gatepostLongitude==null ||
  48. RmsGatepost.gatepostLatitude==null ||
  49. RmsGatepost.gatepostPriority==null
  50. )this.$message.error("存在空值!");
  51. else
  52. this.axios
  53. .post(
  54. "/api/v1/rms/insertGatepost",
  55. RmsGatepost
  56. )
  57. .then((res) => {
  58. if (res.data.code == 200) {
  59. this.$message({
  60. type: "success",
  61. message: "新增成功!",
  62. });
  63. // this.$refs.table.refreshData();
  64. this.$router.go(-1);
  65. } else {
  66. this.$message.error("新增失败,可能存在重复!");
  67. }
  68. this.$refs['table'].resetField();
  69. });
  70. },
  71. // 取消
  72. cancel() {
  73. this.$router.go(-1);
  74. },
  75. handleClose(done) {
  76. done();
  77. }
  78. }
  79. };
  80. </script>
  81. <style lang='scss' scoped>
  82. </style>
  83. <style lang='scss' scoped>
  84. .form-box {
  85. padding: 20px 30px;
  86. margin-left: 330px;
  87. }
  88. .button-box {
  89. padding: 20px 30px;
  90. margin-left: 460px;
  91. }
  92. .btn-left {
  93. margin-left: 470px;
  94. }
  95. .input {
  96. margin-left: 90px;
  97. }
  98. .label{
  99. margin-left: 445px;
  100. margin-bottom: -30px;
  101. font: bold;
  102. font-size: 1rem;
  103. padding-left: -30px;
  104. font-family:Arial, Helvetica, sans-serif;
  105. margin-bottom:20px;
  106. }
  107. .label2{
  108. margin-left: 425px;
  109. margin-bottom: -30px;
  110. font: bold;
  111. font-size: 1rem;
  112. font-family:Arial, Helvetica, sans-serif
  113. }
  114. .label1{
  115. margin-left: 345px;
  116. margin-bottom: -30px;
  117. font: bold;
  118. }
  119. .common{
  120. font-weight: 700;
  121. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
  122. Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  123. font-size: 1rem;
  124. cursor: default;
  125. color: #2c3e50;
  126. }
  127. .f1{
  128. margin-top: -2.5rem;
  129. margin-left: 17.5rem;
  130. }
  131. .f11{
  132. margin-top: -3rem;
  133. // margin-left: 29rem;
  134. }
  135. .f2{
  136. margin-top: -2.5rem;
  137. margin-left: 10.5rem;
  138. }
  139. .f3{
  140. margin-top: -2.5rem;
  141. margin-left: 10.5rem;
  142. }
  143. </style>