taskForm.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="">
  3. <view v-for="(item,index) in datasource" :key="index">
  4. <u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
  5. <u-row v-for="(key,index1) in tableField" :key="index1">
  6. <u-col :span="12">
  7. <u-form-item :label="key.label" prop="categoryName" borderBottom>
  8. <u--input style="width: 100%;" :title='item[key.field]' disabled
  9. v-model="item[key.field]"></u--input>
  10. </u-form-item>
  11. </u-col>
  12. </u-row>
  13. </u--form>
  14. <u-gap height="40" bgColor="#f0f0f0"></u-gap>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import {
  20. contactApplyList
  21. } from '@/api/wt/index.js'
  22. export default {
  23. props: {
  24. businessId: {
  25. default: ''
  26. },
  27. taskDefinitionKey: {
  28. default: ''
  29. },
  30. },
  31. data() {
  32. return {
  33. datasource: [],
  34. form:{},
  35. tableField: [{
  36. label: '客户编码',
  37. field: 'code',
  38. },
  39. {
  40. label: '客户名称',
  41. field: 'name',
  42. },
  43. {
  44. label: '客户代号',
  45. field: 'serialNo',
  46. },
  47. ],
  48. }
  49. },
  50. async mounted() {
  51. await this.getDetailData(this.businessId);
  52. },
  53. methods: {
  54. async getDetailData(id) {
  55. const data = await contactApplyList(id);
  56. this.datasource = data.contactList
  57. }
  58. }
  59. }
  60. </script>
  61. <style>
  62. </style>