tjDialog.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="container">
  3. <view class="example">
  4. <uni-forms ref="form" :model="tjform" labelWidth="100px">
  5. <uni-forms-item label="图斑编号:" name="dkbh">
  6. <uni-easyinput v-model="tjform.dkbh" disabled />
  7. </uni-forms-item>
  8. <div class="tit">
  9. 确定对该图斑数据进行提交吗?提交后无法进行修改。
  10. </div>
  11. <div v-for="(note, nkey) in JSON.parse(tjform.notes)" :key="nkey">
  12. {{ note.stepValue }}:{{ note.notes }}
  13. </div>
  14. <div>提交数据包括图斑核查数据、审核数据、合法性判定数据。</div>
  15. </uni-forms>
  16. <button type="primary" @click="submit">确 定</button>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import {
  22. getTjInfo,
  23. tjWork
  24. } from "@/api/dkjbxx.js";
  25. export default {
  26. data() {
  27. return {
  28. obj: {},
  29. tjform: {
  30. "id": "",
  31. "confirmState": "",
  32. "confirmType": "",
  33. "confirmNotse": "",
  34. "auditflowStep": "WYQR"
  35. },
  36. }
  37. },
  38. onLoad() {
  39. let obj = uni.$globalData || {}
  40. let pram = {
  41. dkid: obj.dkjdxxId,
  42. auditflowStep: 'WYTJ',
  43. auditflowId: obj.auditflowId,
  44. fieldworkId: obj.id
  45. };
  46. this.getInfo(pram)
  47. },
  48. onReady() {
  49. // this.$refs.form.setRules(this.rules)
  50. },
  51. methods: {
  52. getInfo(pram) {
  53. getTjInfo(pram).then(response => {
  54. if (response.data)
  55. this.tjform = response.data
  56. else
  57. this.$modal.msgError("提交信息获取失败")
  58. this.tjform.dkbh = uni.$globalData.dkbh
  59. this.tjform.auditflowStep = pram.auditflowStep
  60. })
  61. },
  62. submit(ref) {
  63. this.$refs.form.validate().then(res => {
  64. tjWork(this.tjform).then(response => {
  65. this.$modal.msgSuccess("提交成功")
  66. this.$tab.navigateTo('/pages/index')
  67. })
  68. })
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss">
  74. page {
  75. background-color: #ffffff;
  76. }
  77. .example {
  78. padding: 15px;
  79. background-color: #fff;
  80. }
  81. .segmented-control {
  82. margin-bottom: 15px;
  83. }
  84. .button-group {
  85. margin-top: 15px;
  86. display: flex;
  87. justify-content: space-around;
  88. }
  89. .form-item {
  90. display: flex;
  91. align-items: center;
  92. flex: 1;
  93. }
  94. .button {
  95. display: flex;
  96. align-items: center;
  97. height: 35px;
  98. line-height: 35px;
  99. margin-left: 10px;
  100. }
  101. </style>