| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <html>
- <head>
- </head>
- <body>
- <div id="space-content">
- <div class="space-form-infor">
- <el-form method="post" :model="obj" ref="obj" label-width="100px">
- <el-form-item label="名称">
- <el-input clearable v-model="obj.name"></el-input>
- </el-form-item>
- <el-form-item label="类型">
- {{obj.type}}
- </el-form-item>
- <el-form-item label="大小">
- {{obj.size}}
- </el-form-item>
- <el-form-item label="创建人">
- {{obj.personName}}
- </el-form-item>
- <el-form-item label="创建时间">
- {{obj.createTime}}
- </el-form-item>
- </el-form>
- </div>
- <div class="space-form-btn">
- <el-button type="primary" icon="el-icon-circle-check" :loading="loading" @click="changeFileName">保存</el-button>
- <el-button icon="el-icon-circle-close" onclick="space.allFunction.closeDialog();">关闭</el-button>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- space.vue = new Vue({
- el: space.appContent,
- data() {
- return {
- serviceURI: {
- initURL: "@service{ name:`uploadFile_info` }@",
- changeFileNameURL: "@service{ name:`uploadFile_change` }@"
- },
- obj: {},
- winInterval: undefined,
- loading: false
- };
- },
- created: function() {
- var _this = this;
- this.winInterval = setInterval(function() {
- if(!window.CMS) {
- return;
- }
-
- window.clearInterval(_this.winInterval);
-
- space.utils.ajax({
- url: _this.serviceURI.initURL,
- dataType: 'json',
- data: {
- "contentId": window.CMS.contentId,
- "fileId": window.CMS.fileId
- },
- callback: function(data) {
- _this.obj = data.data;
- }
- })
- }, 100);
- },
- methods: {
-
- changeFileName() {
- var _this = this;
- space.utils.ajax({
- url: _this.serviceURI.changeFileNameURL,
- dataType: 'json',
- data: {
- "contentId": window.CMS.contentId,
- "fileId": window.CMS.fileId,
- "name": _this.obj.name
- },
- callback: function(data) {
-
- if (data.code == "success") {
- window.CMS.success(_this.obj.name);
- window.parentWin.space.message.success("保存成功");
- space.allFunction.closeDialog();
- } else {
- space.message.error("系统繁忙,请稍后再试");
- }
-
- }
- })
-
- }
-
-
- }
- })
- </script>
- </html>
|