tjDialog.vue 2.2 KB

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