diff --git a/.env.development b/.env.development
index c675e8b..f15a303 100644
--- a/.env.development
+++ b/.env.development
@@ -4,3 +4,4 @@ ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://safety.115.langye.net/'
+#VUE_APP_BASE_API = http://192.168.60.99:9001/
diff --git a/src/views/lawsfile/index/article.vue b/src/views/lawsfile/index/article.vue
index e5a7647..28c3749 100644
--- a/src/views/lawsfile/index/article.vue
+++ b/src/views/lawsfile/index/article.vue
@@ -92,9 +92,9 @@
-
+
点击上传
@@ -124,7 +124,10 @@
-
+
+ {{item.files.original_name}}
+
@@ -173,6 +176,7 @@
mounted() {},
data() {
return {
+ action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
defaultProps: {
children: 'children',
label: 'name'
@@ -303,13 +307,15 @@
let result = Object.assign(that.form, response);
that.form = result;
let _files = [];
- for (var mod of result.files) {
- let m = Object.assign({}, mod);
+ for (var _mod of result.regulation_article_file) {
+ console.log(_mod.files)
+ let mod = _mod.files;
+ let m = Object.assign({}, mod.files);
m.name = mod.original_name;
_files.push(m);
}
that.fileList = _files;
- this.$refs.tiny.setContent(result.content);
+ that.$refs.tiny.setContent(result.content);
}).catch(error => {
//reject(error)
})
@@ -318,14 +324,18 @@
var that = this;
this.form = this.$options.data().form;
this.fileList = [];
- this.$nextTick(function() {
- that.$refs.tiny.setContent('');
- })
+
this.form.type = parseInt(this.$route.path.split("_")[1]);
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
if (obj) {
that.info(obj);
- } else {}
+ } else {
+ that.$nextTick(function(){
+
+ that.$refs.tiny.setContent("");
+
+ })
+ }
this.dialogFormVisible = true;
},
submitForm(formName) {
diff --git a/src/views/lawsfile/index/articleview.vue b/src/views/lawsfile/index/articleview.vue
index 5f81d7b..7255257 100644
--- a/src/views/lawsfile/index/articleview.vue
+++ b/src/views/lawsfile/index/articleview.vue
@@ -77,8 +77,8 @@
-
- {{item.original_name}}
+
+ {{item.files.original_name}}
diff --git a/vue.config.js b/vue.config.js
index c796791..0c45324 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -44,20 +44,20 @@ module.exports = {
errors: true
},
//before: require('./mock/mock-server.js')
- proxy: {
+ proxy: {
+ '^/uploadApi': {
+ target: process.env.VUE_APP_BASE_API,
+ changeOrigin: true, //配置跨域
+ pathRewrite: {
+ ['^/uploadApi']: process.env.VUE_APP_BASE_API
+ }
+ },
[process.env.VUE_APP_BASE_API]: {
target:process.env.VUE_APP_BASE_API,
changeOrigin: true, //配置跨域
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: process.env.VUE_APP_BASE_API
}
- },
- '^/uploadApi': {
- target: process.env.VUE_APP_BASE_API,
- changeOrigin: true, //配置跨域
- pathRewrite: {
- ['^/uploadApi' ]: process.env.VUE_APP_BASE_API
- }
}
}
},