From 546c0df2c7d278cb2a3e6fa6fc2ff730d410fdbd Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期二, 25 一月 2022 16:54:48 +0800
Subject: [PATCH] more
---
src/components/Administrator/Edit.vue | 47 ++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/src/components/Administrator/Edit.vue b/src/components/Administrator/Edit.vue
index b9c3b0f..16e10cc 100644
--- a/src/components/Administrator/Edit.vue
+++ b/src/components/Administrator/Edit.vue
@@ -1,11 +1,25 @@
<template>
<div class="box">
+ <el-row><h3 style="margin-top: 0px">{{ $route.query.title }}</h3></el-row>
鏂伴椈鏍囬锛�<el-input v-model="title" placeholder="璇疯緭鍏ユ柊闂绘爣棰�"></el-input><br/><br/>
- 鍙戝竷鏃ユ湡锛�<el-date-picker v-model="releaseTime" placeholder="璇烽�夋嫨鏂伴椈鍙戝竷鏃ユ湡"></el-date-picker><br/><br/>
+ 鍙戝竷鏃ユ湡锛�<el-date-picker format="yyyy 骞� MM 鏈� dd 鏃�" value-format="yyyy-MM-dd" v-model="releaseTime" placeholder="璇烽�夋嫨鏂伴椈鍙戝竷鏃ユ湡"></el-date-picker><br/><br/>
+ <!-- <el-upload
+ class="upload-demo"
+ ref="upload"
+ drag
+ action
+ :auto-upload="false"
+ :http-request="httpRequest"
+ multiple
+ :file-list="fileList">
+ <i class="el-icon-upload"></i>
+ <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+ <div class="el-upload__tip" slot="tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
+ </el-upload><br/> -->
鏂伴椈鍐呭锛�<quill-editor ref="text" v-model="content" class="myQuillEditor" :options="editorOption" />
- <div class="btn">
+ <el-row style="margin-top:50px;">
<el-button type="success" @click="submit">鍙戝竷</el-button>
- </div>
+ </el-row>
</div>
</template>
<script>
@@ -32,6 +46,7 @@
size: 10000000, // 鍙�夊弬鏁� 鍥剧墖澶у皬锛屽崟浣嶄负Kb, 1M = 1024Kb
accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg' // 鍙�� 鍙笂浼犵殑鍥剧墖鏍煎紡
} , //缂栬緫鍣ㄦ柊闂诲璞�
+ fileList:[],
}
},
created(){
@@ -39,7 +54,33 @@
this.newsCategoryId = this.$route.query.id
},
methods:{
+ // jsonData(formData){ var jsonData = {}; formData.forEach((value, key) => jsonData[key] = value); return jsonData },
+ // httpRequest(params){
+ // const pictureFile = params.file;
+ // const newsCategoryId = this.newsCategoryId;
+ // const content = this.content;
+ // const title = this.title;
+ // const releaseTime = this.releaseTime;
+ // var formData = new FormData();
+ // formData.append("pictureFile",pictureFile)
+ // formData.append("newsCategoryId",newsCategoryId)
+ // formData.append("content",content)
+ // formData.append("title",title)
+ // formData.append("releaseTime",releaseTime)
+ // console.log(this.jsonData(formData));
+ // add(this.jsonData(formData)).then(res => {
+ // console.log(res);
+ // if(res.code !== 200){
+ // return this.$message.error('鍙戝竷鏂伴椈澶辫触锛岃閲嶈瘯锛�')
+ // }else{
+ // this.$message.success('鏂伴椈鍙戝竷鎴愬姛锛�')
+ // console.log(this.content);
+ // this.$router.go(-1)
+ // }
+ // })
+ // },
submit(){
+ // this.$refs.upload.submit();
const data = {
newsCategoryId:this.newsCategoryId,
content:this.content,
--
Gitblit v1.8.0