index.vue 907 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="systemForm-box">
  3. <view class="herader">系统表单</view>
  4. <!--商品关联系统表单-->
  5. <view class='wrapper borRadius14' v-if="systemFormValue">
  6. <systemFrom :value="systemFormValue"></systemFrom>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import systemFrom from '../components/systemFrom/index.vue';
  12. import {systemFromDetail} from '@/api/api'
  13. export default {
  14. components: {
  15. systemFrom
  16. },
  17. data() {
  18. return {
  19. systemFormValue: ''
  20. }
  21. },
  22. onLoad(options) {
  23. this.getInfo(options.id)
  24. },
  25. methods:{
  26. getInfo(id){
  27. systemFromDetail(id).then(res=>{
  28. this.systemFormValue=this.$util.objToArr(JSON.parse(res.data.formValue))
  29. })
  30. }
  31. }
  32. }
  33. </script>
  34. <style scoped lang="scss">
  35. .systemForm-box{
  36. .herader{
  37. height: 100rpx;
  38. line-height: 100rpx;
  39. background: #fff;
  40. text-align: center;
  41. border: 2rpx solid #d5d5d5;
  42. }
  43. }
  44. </style>