addressAdd.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="inspectEdit">
  3. <a-form :model="formAddress" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }"
  4. autocomplete="off">
  5. <a-form-item label="巡检类型:">
  6. <JDictSelectTag v-model:value="formAddress.insType" placeholder="请选择巡检类型" dictCode="ins_type"
  7. style="width: 220px" />
  8. </a-form-item>
  9. <a-form-item label="巡检区域:">
  10. <a-input v-model:value="formAddress.strremark" style="width: 220px" />
  11. </a-form-item>
  12. <a-form-item label="巡检地址:">
  13. <a-input v-model:value="formAddress.strinstallpos" style="width: 220px" />
  14. </a-form-item>
  15. </a-form>
  16. <div class="edit-btn">
  17. <a-button type="primary" @click="confirmAddress">确定</a-button>
  18. <a-button type="success" @click="cancelAddress">取消</a-button>
  19. </div>
  20. </div>
  21. </template>
  22. <script setup lang="ts">
  23. import { ref, reactive, onMounted, watch } from 'vue'
  24. import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
  25. let formAddress = reactive<any>({
  26. insType: '',
  27. strremark: '',
  28. strinstallpos: '',
  29. })
  30. let $emit = defineEmits(['confirmAddress', 'cancelAddress'])
  31. //确定
  32. let confirmAddress = () => {
  33. $emit('confirmAddress', formAddress)
  34. }
  35. //取消
  36. let cancelAddress = () => {
  37. formAddress = {
  38. insType: '',
  39. strremark: '',
  40. strinstallpos: '',
  41. }
  42. $emit('cancelAddress',)
  43. }
  44. onMounted(() => { })
  45. </script>
  46. <style lang="less" scoped>
  47. .inspectEdit {
  48. padding: 10px;
  49. box-sizing: border-box;
  50. .edit-btn {
  51. display: flex;
  52. justify-content: flex-end;
  53. .zxm-btn {
  54. margin: 0px 10px;
  55. }
  56. }
  57. }
  58. :deep(.zxm-input) {
  59. color: #fff;
  60. border: 1px solid #3ad8ff77 !important;
  61. background-color: #ffffff00 !important;
  62. }
  63. </style>