job_solve.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <el-container style="border: #000000;height: 100%;" v-if="visible">
  3. <avue-form ref="form" v-model="jobSolve" :option="option" @submit="submit">
  4. </avue-form>
  5. </el-container>
  6. </template>
  7. <script>
  8. import {
  9. update
  10. } from "@/api/order/deviceorder";
  11. export default {
  12. props: {
  13. visible: "",
  14. jobSolve: {},
  15. },
  16. data() {
  17. return {
  18. option: {
  19. emptyBtn: true,
  20. submitBtn: true,
  21. group: [{
  22. icon: 'el-icon-discover',
  23. label: '告警设备',
  24. prop: 'group1',
  25. column: [{
  26. label: '设备类型',
  27. prop: 'deviceType',
  28. span: 10,
  29. type: "select",
  30. dataType: "number",
  31. dicUrl: "/api/blade-system/dict-biz/dictionary?code=device_type",
  32. props: {
  33. label: "dictValue",
  34. value: "dictKey"
  35. },
  36. disabled: true
  37. }, {
  38. label: '设备名称',
  39. prop: 'deviceName',
  40. span: 14,
  41. disabled: true
  42. }, {
  43. label: '安装位置',
  44. prop: 'alarmPosition',
  45. row: true,
  46. span: 20,
  47. disabled: true
  48. }]
  49. }, {
  50. icon: 'el-icon-edit-outline',
  51. label: '工单处理',
  52. prop: 'group2',
  53. column: [{
  54. label: '告警时间',
  55. prop: 'alarmTime',
  56. row: true,
  57. span: 12,
  58. disabled: true
  59. }, {
  60. label: '处理人',
  61. prop: 'handler',
  62. span: 12,
  63. }, {
  64. label: '联系方式',
  65. prop: 'phone',
  66. row: true,
  67. span: 12
  68. }, {
  69. label: '处理状态',
  70. prop: 'jobStatus',
  71. type: "select",
  72. dicUrl: "/api/blade-system/dict-biz/dictionary?code=job_status",
  73. dataType: "number",
  74. props: {
  75. label: "dictValue",
  76. value: "dictKey"
  77. },
  78. span: 12
  79. },
  80. {
  81. label: '处理备注',
  82. prop: 'remark',
  83. type: "textarea",
  84. span: 20
  85. }
  86. ]
  87. }]
  88. },
  89. }
  90. },
  91. mounted() {
  92. console.log(this.jobSolve.jobStatus)
  93. if (this.jobSolve.jobStatus == 2) {
  94. this.option.submitBtn = false;
  95. this.option.emptyBtn = false;
  96. } else {
  97. this.option.submitBtn = true;
  98. this.option.emptyBtn = true;
  99. }
  100. },
  101. methods: {
  102. init() {
  103. this.option.submitBtn = true;
  104. this.option.emptyBtn = true;
  105. },
  106. submit() {
  107. update(this.jobSolve).then(() => {
  108. this.$message({
  109. type: "success",
  110. message: "操作成功!"
  111. });
  112. this.$emit("close-dialog", "取消");
  113. })
  114. },
  115. handleCancel() {
  116. this.$emit("close-dialog", "取消");
  117. }
  118. }
  119. }
  120. </script>
  121. <style>
  122. </style>