tjDialog.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. if (uni.$globalData && uni.$globalData.dkbh)
  59. this.tjform.dkbh = uni.$globalData.dkbh
  60. if (pram && pram.auditflowStep)
  61. this.tjform.auditflowStep = pram.auditflowStep
  62. })
  63. },
  64. submit(ref) {
  65. this.$refs.form.validate().then(res => {
  66. tjWork(this.tjform).then(response => {
  67. this.$modal.msgSuccess("提交成功")
  68. this.$tab.navigateTo('/pages/index')
  69. })
  70. })
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss">
  76. page {
  77. background-color: #ffffff;
  78. }
  79. .example {
  80. padding: 15px;
  81. background-color: #fff;
  82. }
  83. .segmented-control {
  84. margin-bottom: 15px;
  85. }
  86. .button-group {
  87. margin-top: 15px;
  88. display: flex;
  89. justify-content: space-around;
  90. }
  91. .form-item {
  92. display: flex;
  93. align-items: center;
  94. flex: 1;
  95. }
  96. .button {
  97. display: flex;
  98. align-items: center;
  99. height: 35px;
  100. line-height: 35px;
  101. margin-left: 10px;
  102. }
  103. </style>