Commit 6e350e02 authored by wangqinghua's avatar wangqinghua

init

parent 0864042e
<!--编辑意向-->
<template> <template>
<div class="intentionDialog"> <div class="intentionDialog">
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible"> <el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible">
...@@ -9,7 +10,19 @@ ...@@ -9,7 +10,19 @@
<el-input v-model="form.name2" autocomplete="off"></el-input> <el-input v-model="form.name2" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="相关附件" :label-width="formLabelWidth"> <el-form-item label="相关附件" :label-width="formLabelWidth">
<el-input v-model="form.name5" autocomplete="off"></el-input> <el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
</el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -25,11 +38,31 @@ ...@@ -25,11 +38,31 @@
name: "intention-dialog", name: "intention-dialog",
data(){ data(){
return{ return{
fileList:[],
form:{
name1:"",
name2:"",
name3:"",
},
dialogTitle:'', dialogTitle:'',
dialogFormVisible:false, dialogFormVisible:false,
formLabelWidth:"120px"
} }
}, },
methods:{ methods:{
handleRemove(file, fileList) {
const form = new FormData()
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.name }?`);
},
showDialog(){ showDialog(){
this.dialogTitle = "添加意向" this.dialogTitle = "添加意向"
this.dialogFormVisible = true this.dialogFormVisible = true
......
...@@ -52,7 +52,7 @@ router.beforeEach((to,from,next)=>{ ...@@ -52,7 +52,7 @@ router.beforeEach((to,from,next)=>{
next(); next();
}else{ }else{
next({ next({
path:'/login', path:'/meetList',
query:{redirect:to.fullPath} query:{redirect:to.fullPath}
}) })
} }
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
<el-table-column <el-table-column
type="index" type="index"
label="代码显示顺序" label="代码显示顺序"
width="200" width="200">
:index="index">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
......
...@@ -57,9 +57,9 @@ ...@@ -57,9 +57,9 @@
prop="address" prop="address"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="font-size-20"> <span class="font-size-20 pointer">
<i class="el-icon-edit-outline margin-right-10"></i> <i @click="handleEdit(scope.row)" class="el-icon-edit-outline margin-right-10"></i>
<i class="el-icon-view margin-right-10"></i> <i @click="handleDelete(scope.row)" class="el-icon-view margin-right-10"></i>
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</span> </span>
</template> </template>
...@@ -77,11 +77,15 @@ ...@@ -77,11 +77,15 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<intention-dialog ref="intentionDialog"></intention-dialog>
</div> </div>
</template> </template>
<script> <script>
import IntentionDialog from "../components/intentionDialog";
export default { export default {
components: {IntentionDialog},
name: "intention", name: "intention",
data() { data() {
return { return {
...@@ -129,6 +133,9 @@ ...@@ -129,6 +133,9 @@
}, },
handleCurrentChange() { handleCurrentChange() {
},
handleEdit(row){
this.$refs.intentionDialog.showDialog()
} }
} }
} }
......
...@@ -47,11 +47,9 @@ ...@@ -47,11 +47,9 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="font-size-20"> <span class="font-size-20">
<router-link to="/meetManage"> <i @click="handleEdit(scope.row)" class="el-icon-edit-outline margin-right-10"></i>
<i class="el-icon-edit-outline margin-right-10"></i>
</router-link>
<i class="el-icon-view margin-right-10"></i> <i class="el-icon-view margin-right-10"></i>
<i class="el-icon-delete"></i> <i @click="handleDelete(scope.row)" class="el-icon-delete"></i>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -121,9 +119,21 @@ ...@@ -121,9 +119,21 @@
}, },
handleCurrentChange(){}, handleCurrentChange(){},
//去编辑页面
handleEdit(row){
this.$router.push({
path:'/meetManage',
query:{
item:row
}
})
},
//删除
handleDelete(row){
} }
} }
}
</script> </script>
<style scoped> <style scoped>
......
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
data(){ data(){
return { return {
input1:"", input1:"",
item:"",
options:[ options:[
{label:"绝密",value:"1"}, {label:"绝密",value:"1"},
{label:"机密",value:"2"}, {label:"机密",value:"2"},
...@@ -196,6 +197,10 @@ ...@@ -196,6 +197,10 @@
}], }],
} }
}, },
created(){
this.item = this.$route.query.item
console.log(this.item)
},
methods:{ methods:{
showDialog(){ showDialog(){
this.$refs.selectIntentionDialog.showDialog() this.$refs.selectIntentionDialog.showDialog()
......
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