|
|
|
|
@ -92,9 +92,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件" prop="file_list">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/uploadApi/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther" :action="action"
|
|
|
|
|
:on-remove="handleRemove" :before-remove="beforeRemove" :on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -124,7 +124,10 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件" prop="file_list">
|
|
|
|
|
|
|
|
|
|
<el-link v-for="item in form.regulation_article_file" target="_blank" :href="item.files.url"
|
|
|
|
|
type="primary">
|
|
|
|
|
{{item.files.original_name}}
|
|
|
|
|
</el-link>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
@ -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) {
|
|
|
|
|
|