devAiEdit.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div id="devAiEdit w-full" style="width:100%">
  3. <div class="page-header">
  4. <div class="page-title">
  5. <el-button icon="el-icon-back" size="mini" style="font-size: 20px; color: #000;" type="text" @click="back" ></el-button>
  6. <el-divider direction="vertical"></el-divider>
  7. {{ $t('aiManager.title') }}
  8. </div>
  9. <div class="page-header-btn">
  10. </div>
  11. </div>
  12. <el-container v-loading="isLoading" style="min-height: 82vh;flex-direction: column;" >
  13. </el-container>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: "devAiEdit",
  19. data(){
  20. return {
  21. //
  22. aiId: this.$route.params.aiId,
  23. isLoading: false,
  24. }
  25. },
  26. mounted() {
  27. this.loadAiData();
  28. },
  29. methods:{
  30. back(){
  31. this.$router.back();
  32. if (this.deviceId === "" ) {
  33. this.beforeUrl = "/deviceList"
  34. }
  35. },
  36. loadAiData(){
  37. let that = this;
  38. this.$axios.axios({
  39. method: 'post',
  40. url: '/api/device/ai/edit/' + that.aiId
  41. }).then((res) => {
  42. console.log("获取ai数据结果:" + JSON.stringify(res));
  43. }).catch((e) => {
  44. console.error(e)
  45. that.$message({
  46. showClose: true,
  47. message: e,
  48. type: 'error'
  49. });
  50. });
  51. }
  52. }
  53. }
  54. </script>
  55. <style scoped>
  56. </style>