1001910093_edit.jsp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <html>
  3. <head>
  4. </head>
  5. <body>
  6. <div id="space-content">
  7. <div class="space-form-infor">
  8. <el-form method="post" :model="obj" ref="obj" label-width="100px">
  9. <el-form-item label="名称">
  10. <el-input clearable v-model="obj.name"></el-input>
  11. </el-form-item>
  12. <el-form-item label="类型">
  13. {{obj.type}}
  14. </el-form-item>
  15. <el-form-item label="大小">
  16. {{obj.size}}
  17. </el-form-item>
  18. <el-form-item label="创建人">
  19. {{obj.personName}}
  20. </el-form-item>
  21. <el-form-item label="创建时间">
  22. {{obj.createTime}}
  23. </el-form-item>
  24. </el-form>
  25. </div>
  26. <div class="space-form-btn">
  27. <el-button type="primary" icon="el-icon-circle-check" :loading="loading" @click="changeFileName">保存</el-button>
  28. <el-button icon="el-icon-circle-close" onclick="space.allFunction.closeDialog();">关闭</el-button>
  29. </div>
  30. </div>
  31. </body>
  32. <script type="text/javascript">
  33. space.vue = new Vue({
  34. el: space.appContent,
  35. data() {
  36. return {
  37. serviceURI: {
  38. initURL: "@service{ name:`uploadFile_info` }@",
  39. changeFileNameURL: "@service{ name:`uploadFile_change` }@"
  40. },
  41. obj: {},
  42. winInterval: undefined,
  43. loading: false
  44. };
  45. },
  46. created: function() {
  47. var _this = this;
  48. this.winInterval = setInterval(function() {
  49. if(!window.CMS) {
  50. return;
  51. }
  52. window.clearInterval(_this.winInterval);
  53. space.utils.ajax({
  54. url: _this.serviceURI.initURL,
  55. dataType: 'json',
  56. data: {
  57. "contentId": window.CMS.contentId,
  58. "fileId": window.CMS.fileId
  59. },
  60. callback: function(data) {
  61. _this.obj = data.data;
  62. }
  63. })
  64. }, 100);
  65. },
  66. methods: {
  67. changeFileName() {
  68. var _this = this;
  69. space.utils.ajax({
  70. url: _this.serviceURI.changeFileNameURL,
  71. dataType: 'json',
  72. data: {
  73. "contentId": window.CMS.contentId,
  74. "fileId": window.CMS.fileId,
  75. "name": _this.obj.name
  76. },
  77. callback: function(data) {
  78. if (data.code == "success") {
  79. window.CMS.success(_this.obj.name);
  80. window.parentWin.space.message.success("保存成功");
  81. space.allFunction.closeDialog();
  82. } else {
  83. space.message.error("系统繁忙,请稍后再试");
  84. }
  85. }
  86. })
  87. }
  88. }
  89. })
  90. </script>
  91. </html>