Commit e3c927e5 authored by ganjingcun's avatar ganjingcun

a

parent e36ec360
...@@ -28,24 +28,24 @@ ...@@ -28,24 +28,24 @@
<el-dialog :title="username" size="large" v-model="dialogFormVisible"> <el-dialog :title="username" size="large" v-model="dialogFormVisible">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="URL" :label-width="formLabelWidth"> <el-form-item label="URL" :label-width="formLabelWidth">
<el-input v-model="avatar_url" auto-complete="off"></el-input> <el-input v-model="avatar_url_new" auto-complete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="类型" :label-width="formLabelWidth"> <!--<el-form-item label="类型" :label-width="formLabelWidth">
<el-select v-model="form.region" placeholder="请选择类型"> <el-select v-model="form.region" placeholder="请选择类型">
<el-option label="一" value="shanghai"></el-option> <el-option label="一" value="shanghai"></el-option>
<el-option label="二" value="beijing"></el-option> <el-option label="二" value="beijing"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item label="描述" :label-width="formLabelWidth"> <el-form-item label="描述" :label-width="formLabelWidth">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 6}" placeholder="请输入内容" v-model="form.desc"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 6}" placeholder="请输入内容" v-model="form.desc_new">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button> <el-button @click="cancelModify">取 消</el-button>
<el-button type="primary" @click="submitModify">确 定</el-button> <el-button type="primary" @click="submitModify">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
<script> <script>
import querystring from 'querystring'; import querystring from 'querystring';
import unknow from '../assets/img/unknow.jpeg'
import API from '../api' import API from '../api'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from 'moment' import moment from 'moment'
...@@ -71,7 +70,8 @@ ...@@ -71,7 +70,8 @@
data() { data() {
return { return {
username: "", username: "",
avatar_url: unknow, avatar_url: "assets/img/unknow.jpeg",
avatar_url_new: "",
input3: 'asdasd', input3: 'asdasd',
dialogTableVisible: false, dialogTableVisible: false,
dialogFormVisible: false, dialogFormVisible: false,
...@@ -83,7 +83,9 @@ ...@@ -83,7 +83,9 @@
delivery: false, delivery: false,
type: [], type: [],
resource: '', resource: '',
desc: '' desc: '',
desc_new: '',
}, },
formLabelWidth: '40px', formLabelWidth: '40px',
isNew: true, isNew: true,
...@@ -118,18 +120,23 @@ ...@@ -118,18 +120,23 @@
}, },
methods: { methods: {
cancelModify: function(){
this.dialogFormVisible = false
},
submitModify: function () { submitModify: function () {
var param = { var param = {
user: this.user.username, user: this.user.username,
name: this.username, name: this.username,
desc: this.form.desc, desc: this.form.desc_new,
url: this.avatar_url, url: this.avatar_url_new,
isNew: this.isNew isNew: this.isNew
} }
API.saveDeck(param).then((res) => { API.saveDeck(param).then((res) => {
console.log(res.data) console.log(res.data)
this.dialogFormVisible = false this.dialogFormVisible = false
this.isNew = false
this.form.desc = this.form.desc_new
this.avatar_url = this.avatar_url_new
this.$notify({ this.$notify({
title: '操作成功', title: '操作成功',
message: '感谢您的提交!', message: '感谢您的提交!',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment