Commit a321021d authored by wangqinghua's avatar wangqinghua

会议意向

parent b34972b9
......@@ -66,6 +66,21 @@ export const meetEnd = params =>req('get','/meeting/end',params);
//获取所有未上会的意向数据
export const getIntentionOfUnUse = params =>req('get','/intention/getIntentionOfUnUse',params);
//会议中新增议程
export const addAgendaByMeet = params =>req('post','/agenda/addAgenda',params);
//会议中修改议程
export const updateAgendaByMeet = params =>req('post','/agenda/updateAgenda',params);
//会议中删除议程
export const removeAgendaByIdByMeet = params =>req('post','/agenda/removeAgendaById',params);
//会议中通过ID获取议程
export const getAgendaByIdByMeet = params =>req('get','/agenda/getAgendaById',params);
//意向列表分页
export const getIntentionPage = params =>req('get','/intention/getIntentionPage',params);
......
export function formatDate(date,fmt){
if(/(y+)/.test(fmt)){
fmt = fmt.replace(RegExp.$1, (date.getFullYear()+'').substr(4-RegExp.$1.length));
}
let o = {
'M+': date.getMonth()+1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
}
for(let k in o){
let str = o[k]+'';
if(new RegExp(`(${k})`).test(fmt)){
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length===1)?str:padLeftZero(str));
}    }
return fmt;
};
function padLeftZero(str){
return ('00'+str).substr(str.length);
}
......@@ -57,19 +57,19 @@
}
},
mounted(){
getAttendInfoList().then(
(res)=>{
this.tableData = res.data
}
)
},
methods:{
handleSelectionChange(val) {
console.log(val)
this.multipleSelection = val;
},
showDialog(){
this.dialogFormVisible = true;
getAttendInfoList().then(
(res)=>{
this.tableData = res.data
}
)
},
submitList(){
this.dialogFormVisible = false;
......
......@@ -7,7 +7,7 @@
<el-col :span="18">
<div class="border padding-10-0">
<template v-for="(item,i) in list">
<p class="padding-5-10 pointer" :class="sIndex == i ? 'select':''" @click="selectIndex(i)"> {{item.name}}</p>
<p class="padding-5-10 pointer" :class="sIndex == i ? 'select':''" @click="selectIndex(i)"> {{item.title}}</p>
</template>
</div>
</el-col>
......@@ -25,7 +25,7 @@
</el-row>
</div>
<div slot="footer" class="dialog-footer text-center">
<el-button size="small" @click="dialogFormVisible = false">保存</el-button>
<el-button size="small" @click="save()">保存</el-button>
<el-button size="small" @click="dialogFormVisible = false">关闭</el-button>
</div>
</el-dialog>
......@@ -39,22 +39,17 @@
data(){
return{
id:"",
title:"",
title:"排序",
sIndex:null,
dialogFormVisible:false,
list:[]
}
},
methods:{
showDialog(title,id){
this.title = title
showDialog(list,type){
this.list = list
this.type = type
this.dialogFormVisible = true
this.id = id
getByRefId({id:id}).then(
(res)=>{
}
)
},
//
selectIndex(i){
......@@ -64,12 +59,9 @@
toTop(){
if (this.sIndex != 0) {
const index = this.sIndex
// this.list.unshift( this.list.splice(this.sIndex,1)[0] )
const a = this.list.splice(index,1)[0]
this.list.unshift(a)
this.sIndex = 0
// this.swapArray(this.list, this.sIndex, 0);
} else {
this.$message.warning('已经处于顶部,无法置顶');
}
......@@ -99,6 +91,13 @@
this.sIndex = index2
arr[index1] = arr.splice(index2,1,arr[index1])[0]
return arr
},
save(){
const data = {
list:this.list,
type:this.type
}
this.$emit("update",this.list,type)
}
}
}
......
......@@ -67,6 +67,7 @@
)
},
done(){
this.dialogFormVisible = false;
this.$emit('update',this.multipleSelection)
}
}
......
<!--选择意向-->
<!--选择特俗议程-->
<template>
<div class="select-intention">
<el-dialog title="选择意向" :visible.sync="dialogFormVisible">
<el-dialog title="选择特俗议程" :visible.sync="dialogFormVisible">
<el-table
:data="tableData"
tooltip-effect="dark"
......
......@@ -2,20 +2,20 @@
<template>
<div class="code">
<el-dialog :title="title" :visible.sync="dialogFormVisible" :before-close="initForm">
<el-checkbox @change="changeCheck" v-model="checked">特殊议程</el-checkbox>
<el-checkbox class="margin-bottom-20" @change="changeCheck" v-model="checked">特殊议程</el-checkbox>
<el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-form-item label="议程主题" prop="title" :label-width="formLabelWidth">
<el-input v-model="form.title" autocomplete="off"></el-input>
<el-input :disabled="disabled" v-model="form.title" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="汇报处室" prop="url" :label-width="formLabelWidth">
<el-input v-model="form.url" autocomplete="off"></el-input>
<el-input :disabled="disabled" v-model="form.url" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="备注" prop="reportDep" :label-width="formLabelWidth">
<el-form-item label="备注" prop="remark" :label-width="formLabelWidth">
<el-input v-model="form.reportDep" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="列席人员" :label-width="formLabelWidth">
<el-input :disabled="true" v-model="attendPerson" autocomplete="off">
<el-button @click="selectPerson" slot="append">选择</el-button>
<el-button v-if="!disabled" @click="selectPerson" slot="append">选择</el-button>
</el-input>
</el-form-item>
<el-form-item label="相关附件" :label-width="formLabelWidth">
......@@ -30,7 +30,7 @@
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer text-center">
<el-button size="small" @click="initForm">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('form')">确 定</el-button>
</div>
......@@ -41,7 +41,7 @@
</template>
<script>
import {updateSpecialAgenda, addSpecialAgenda,getSpecialAgendaById} from "../api/api"
import {addAgendaByMeet, updateAgendaByMeet,getSpecialAgendaById,uploadFile} from "../api/api"
import AttendList from "./attendList";
import SelectSpecialAgenda from "./selectSpecialAgenda";
......@@ -52,17 +52,19 @@
name: "special-dialog",
data() {
return {
checked:"",
fileList:[],
title: "",
checked:"", //是否选择特殊议程
fileList:[], //文件列表
title: "", //弹窗标题
id:"",
disabled:false,
attendPerson:"",
linkSpecial:"",
linkSpecial:"", //选择特殊议程
form: {
title: "",
reportDep: "",
linkAttends: null,
linkAttends: [],
remark:"",
accessories:[]
},
rules:{
title:[{required:true,message:"请输入议程名称",trigger:'blur'},{min:1,max:20,message:'长度在1到20个字符之间',trigger:'blur'}]
......@@ -92,23 +94,36 @@
)
},
initForm() {
this.disabled = false
this.linkSpecial = null
this.fileList = []
this.$refs['form'].resetFields();
this.form = {
title: "",
url: "",
reportDep: "",
attendPerson: "",
ips: "",
linkAttends: null,
remark:"",
accessories:[]
}
this.attendPerson = ""
this.dialogFormVisible = false
},
//选择列席人员
//选择列席人员弹窗
selectPerson(){
this.$refs.attendList.showDialog()
},
handleUpload(){
handleUpload(file,fileList){
const formData = new FormData()
formData.append('file',file.raw)
uploadFile(formData).then(
(res)=>{
const d = {
name: res.data.name,
saveName: res.data.saveName,
}
this.form.accessories.push(d)
}
)
},
//选择特殊议程
changeCheck(){
......@@ -121,13 +136,15 @@
this.form.linkAttends = ""
}
},
//获取特殊议程
//获取特殊议程数据
getInfo(data){
this.disabled = data === null ? false: true
this.form.title = data.title
this.form.remark = data.remark
this.form.linkAttends = data.linkAttends
this.linkSpecial = data.id
},
//选择列席人员
getPerson(data){
this.attendPerson = ""
this.form.linkAttends = data.map(e=>{
......@@ -140,38 +157,51 @@
this.attendPerson = this.attendPerson.substr(0,this.attendPerson.length -1)
},
//提交
submitForm(formName) {
this.$refs[formName].validate((valid)=>{
console.log(valid)
console.log(this.form)
if(valid){
if (this.title == "添加议程") {
addSpecialAgenda(this.form).then(
(res) => {
this.dialogFormVisible = false;
this.$message.success('添加成功')
this.$emit('update', res.data)
this.form.name = ""
submitForm() {
let data;
this.form.accessories.forEach((e,index)=>{
e.sortNum = index +1
})
if(this.checked){ //特殊议程
data = {
remark : this.form.remark,
accessories:this.form.accessories,
linkSpecial:this.linkSpecial
}
}else{
data = {
title:this.form.title,
reportDep:this.form.reportDep,
remark:this.form.remark,
linkAttends:this.form.linkAttends,
accessories:this.form.accessories,
}
}
if(this.title == '添加议程'){
this.create(data);
}else{
this.update(data)
}
},
create(data){
addAgendaByMeet(data).then(
(res)=>{
this.$message.success("新增议程成功")
this.dialogFormVisible = false
this.$emit('update',res.data)
this.initForm()
}
)
} else {
this.form.id = this.id
updateSpecialAgenda(this.form).then(
(res) => {
this.dialogFormVisible = false;
this.$emit('update', res.data)
this.$message.success('编辑成功')
this.form.name = ""
},
update(data){
updateAgendaByMeet(data).then(
(res)=>{
this.$message.success("修改议程成功")
this.dialogFormVisible = false
this.initForm()
}
)
}
}else{
return false
}
})
}
}
}
</script>
......
......@@ -7,20 +7,12 @@
<span>意向主题:</span>
<el-input style="width: 180px;" size="small"
placeholder="会议名称"
v-model="input1">
v-model="form.title">
</el-input>
</el-col>
<el-col :span="8">
<span>汇报处室:</span>
<el-input style="width: 180px;" size="small"
placeholder="会议名称"
v-model="input2">
</el-input>
</el-col>
<el-col class="text-right" :span="8">
<el-col :offset="8" class="text-right" :span="8">
<el-button size="small" plain>查询</el-button>
<el-button size="small" @click="handleAdd" plain>添加</el-button>
<el-button size="small" @click="handleEdit" plain>编辑测试</el-button>
</el-col>
</el-row>
<div class="margin-20-0">
......@@ -31,16 +23,12 @@
width="90">
</el-table-column>
<el-table-column
prop="name"
prop="title"
label="意向主题"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="汇报处室">
</el-table-column>
<el-table-column
prop="address"
prop="remark"
cell-class-name="text-center"
label="备注">
</el-table-column>
......@@ -48,9 +36,14 @@
prop="address"
cell-class-name="text-center"
label="上会情况">
<template slot-scope="scope">
<span v-if="scope.row.currentStatus == 0">未上会</span>
<span v-if="scope.row.currentStatus == 1">待上会</span>
<span v-if="scope.row.currentStatus == 2">已上会</span>
</template>
</el-table-column>
<el-table-column
prop="address"
prop="meetingName"
cell-class-name="text-center"
label="已关联会议名称">
</el-table-column>
......@@ -59,9 +52,9 @@
label="操作">
<template slot-scope="scope">
<span class="font-size-20 pointer">
<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-delete"></i>
<i v-if="scope.row.currentStatus == 0 || scope.row.currentStatus == 1" @click="handleEdit(scope.row)" class="el-icon-edit-outline margin-right-10"></i>
<i v-if="scope.row.currentStatus == 2" class="el-icon-view margin-right-10"></i>
<i v-if="scope.row.currentStatus == 0 || scope.row.currentStatus == 1" @click="handleDelete(scope.row)" class="el-icon-delete"></i>
</span>
</template>
</el-table-column>
......@@ -71,10 +64,10 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-sizes="[10, 20, 40]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="400">
:total="total">
</el-pagination>
</div>
</div>
......@@ -84,27 +77,42 @@
<script>
import IntentionDialog from "../components/intentionDialog";
import {getIntentionPage} from "../api/api"
export default {
components: {IntentionDialog},
name: "intention",
data() {
return {
input1:"",
input2:"",
form:{
title:"",
pageNo:'1',
pageSize:'10'
},
total:null,
currentPage:1,
tableData: [],
}
},
mounted(){
this.getList()
},
methods: {
getList(){
console.log('getlist')
getIntentionPage(this.form).then(
(res)=>{
this.tableData = res.data.data
this.total = res.data.count
}
)
},
//更改每页条数
handleSizeChange() {
handleSizeChange(val) {
this.form.pageSize = val
this.getList()
},
handleCurrentChange() {
handleCurrentChange(val) {
this.form.pageNo = val
this.getList()
},
handleAdd(){
this.$refs.intentionDialog.showDialog()
......
......@@ -35,6 +35,9 @@
<el-table-column
prop="meetingTime"
label="会议日期">
<template slot-scope="scope">
{{scope.row.meetingTime | formatDate}}
</template>
</el-table-column>
<el-table-column
prop="remark"
......@@ -57,10 +60,10 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-sizes="[10, 20, 40]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="400">
:total="total">
</el-pagination>
</div>
</div>
......@@ -69,13 +72,14 @@
<script>
import {getMeetingPage,removeMeetingById} from '../api/api'
import {formatDate} from "../common/date";
export default {
name: "meet-list",
data() {
return {
currentPage: 1,
input1: "",
total:null,
form: {
pageNo: '1',
pageSize: '10',
......@@ -93,6 +97,7 @@
getMeetingPage(this.form).then(
(res) => {
this.tableData = res.data.data
this.total = res.data.count
}
)
},
......@@ -101,12 +106,14 @@
this.getList()
},
//更改每页条数
handleSizeChange() {
handleSizeChange(val) {
this.form.pageSize = val
this.getList()
},
//翻页
handleCurrentChange() {
handleCurrentChange(val) {
this.form.pageNo = val
this.getList()
},
//新增会议
handleAdd(){
......@@ -136,6 +143,13 @@
)
})
}
},
filters:{
formatDate(time){
let date = new Date(time);
return formatDate(date,'yyyy-MM-dd hh:mm');
}
}
}
</script>
......
......@@ -93,23 +93,29 @@
width="90">
</el-table-column>
<el-table-column
prop="name"
prop="title"
label="意向/议程主题"
width="180">
</el-table-column>
<el-table-column
prop="address"
prop="accessories"
label="附件名称">
<template slot-scope="scope">
<p v-for="item of scope.row.accessories">{{item.name}}</p>
</template>
</el-table-column>
<el-table-column
prop="address"
prop="reportDep"
cell-class-name="text-center"
label="汇报处室">
</el-table-column>
<el-table-column
prop="address"
prop="linkAttends"
cell-class-name="text-center"
label="列席人员">
<template slot-scope="scope">
<p v-for="item of scope.row.linkAttends">{{item.name}}</p>
</template>
</el-table-column>
<el-table-column
prop="address"
......@@ -127,16 +133,17 @@
</div>
<div class="text-center margin-top-20">
<el-button size="small" plain>预览</el-button>
<el-button size="small" plain>导出</el-button>
<el-button @click="showIndexDialog" size="small" plain>议程排序</el-button>
<el-button size="small" plain>办结</el-button>
<el-button :disabled="true" size="small" plain>导出</el-button>
<el-button @click="showIndexDialog('agenda')" size="small" plain>议程排序</el-button>
<el-button @click="showIndexDialog('intention')" size="small" plain>意向排序</el-button>
<el-button :disabled="true" size="small" plain>办结</el-button>
<el-button @click="doEnd" size="small" plain>结束</el-button>
</div>
</div>
</div>
</div>
<select-intention-dialog ref="selectIntentionDialog" @update="selectIntention"></select-intention-dialog>
<index-dialog ref="indexDialog"></index-dialog>
<index-dialog ref="indexDialog" @update="updateTableData"></index-dialog>
<special-dialog ref="specialDialog" @update="getAgenda"></special-dialog>
</div>
</template>
......@@ -145,7 +152,7 @@
import ElRow from "element-ui/packages/row/src/row";
import SelectIntentionDialog from "../components/selectIntentionDialog";
import IndexDialog from "../components/indexDialog";
import {addMeeting,updateMeeting,getMeetingById,meetEnd} from "../api/api"
import {addMeeting,updateMeeting,getMeetingById,meetEnd,getAgendaByIdByMeet} from "../api/api"
import SpecialDialog from "../components/specialDialog";
export default {
components: {
......@@ -186,7 +193,14 @@
for(const i in this.form){
this.form[i] = res.data[i]
}
console.log(this.form)
res.data.intentionList.forEach(e=>{
e.type ="intention"
this.tableData.push(e)
})
res.data.agendaList.forEach(d=>{
d.type ="agenda"
this.tableData.push(d)
})
}
)
}
......@@ -196,23 +210,60 @@
showDialog() {
this.$refs.selectIntentionDialog.showDialog()
},
showIndexDialog() {
this.$refs.indexDialog.showDialog("议程排序")
showIndexDialog(type) {
let list = []
if(type === "intention"){
this.tableData.forEach(e=>{
if(e.type === 'intention'){
list.push(e)
}
})
}else{
this.tableData.forEach(e=>{
if(e.type === 'agenda'){
list.push(e)
}
})
}
this.$refs.indexDialog.showDialog(list,type)
},
//选择议程窗口
showAgendaDialog(){
this.$refs.specialDialog.showAddDialog()
this.$refs.specialDialog.showAddDialog("添加议程")
},
//选择意向
selectIntention(data){
this.tableData = data
data.forEach(e=>{
e.type = "intention"
})
this.form.intentionList.push(data)
this.tableData = this.tableData.concat(data)
},
//选择议程
getAgenda(data){
this.form.agendaList = data
getAgendaByIdByMeet({id:data}).then(
(res)=>{
res.data.type = "agenda"
this.form.agendaList.push(res.data)
this.tableData.push(res.data)
}
)
},
//保存
save(){
this.tableData.forEach((e,index)=>{
if(e.type === "agenda"){ //议程
this.form.agendaList.push({
id:e.id,
sortNum:index +1
})
}else{
this.form.intentionList.push({
id:e.id,
sortNum:index +1
})
}
})
if(this.item){
this.update()
}else{
......@@ -223,15 +274,22 @@
create(){
addMeeting(this.form).then(
(res)=>{
this.$message.success("新增会议成功")
this.$router.push({
path:'meetList'
})
}
)
},
//修改
update(){
this.form.id = this.item.id
updateMeeting(this.form).then(
(res)=>{
this.$message.success("修改会议成功")
this.$router.push({
path:'meetList'
})
}
)
},
......@@ -239,9 +297,21 @@
doEnd(){
meetEnd({id:this.item.id}).then(
(res)=>{
this.$message.success("会议结束")
this.$router.push({
path:'meetList'
})
}
)
},
updateTableData(data){
console.log(data)
if(data.type === 'intention'){
this.form.intentionList = data.list
}else{
this.form.agendaList = data.list
}
this.tableData = this.form.intentionList.concat(this.form.agendaList)
}
}
}
......
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