办公模块阶段代码提交

init
gongdi 4 years ago
parent 9a96d1614a
commit d81020bca9

@ -0,0 +1,18 @@
export default {
/*
* 工作计划查询支持个人部门机构
* */
"listSuperfusionWorkPlan":{
url:'/intellioa/workPlan/listSuperfusionWorkPlan',
method:'get',
isTestLogin:true
},
/*
* 修改工作计划完成状态批量完成和批量取消
* */
"changeWorkPlanState":{
url:'/intellioa/workPlan/changeWorkPlanState',
method:'post',
isTestLogin:true
},
}

@ -4,23 +4,14 @@
<DateChange type="month" @changeDate="changeDate"></DateChange> <DateChange type="month" @changeDate="changeDate"></DateChange>
<div class="plan-list-div"> <div class="plan-list-div">
<a-timeline mode="alternate"> <a-timeline mode="alternate">
<a-timeline-item>Create a services site 2015-09-01</a-timeline-item> <a-timeline-item v-for="(item,index) in planList" :key="item.plan_id">
<a-timeline-item color="green"> <div slot="dot" >
Solve initial network problems 2015-09-01 <div v-if="item.finish_flag == 1" class="completed"><a-icon type="check" /></div>
</a-timeline-item> <div v-if="item.finish_flag == 0" class="no-completed"></div>
<a-timeline-item> </div>
<a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;" /> <div :class="item.finish_flag == 1?'completed-content':'no-completed-content'" @mouseenter="showDoFinish(item,index)" @mouseleave="hideDoFinish(item,index)">{{item.plan_content}}
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque <div v-if="item.finish_flag == 0 && item.showDoFinish" class="do-finish" v-on:click="doFinish(item,index)" >完成<a-icon type="check" /></div>
laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto </div>
beatae vitae dicta sunt explicabo.
</a-timeline-item>
<a-timeline-item color="red">
Network problems being solved 2015-09-01
</a-timeline-item>
<a-timeline-item>Create a services site 2015-09-01</a-timeline-item>
<a-timeline-item>
<a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;" />
Technical testing 2015-09-01
</a-timeline-item> </a-timeline-item>
</a-timeline> </a-timeline>
</div> </div>
@ -29,8 +20,9 @@
<script> <script>
import TabComp from '../common/tabComp.vue'; import TabComp from '../common/tabComp.vue';
import DateChange from '../common/dateChange.vue'; import DateChange from '../common/dateChange.vue';
import {Timeline,Icon} from 'ant-design-vue'; import {Timeline,Icon,Modal} from 'ant-design-vue';
import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig'; import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig';
import interConfig from './interConfig';
export default{ export default{
data(){ data(){
return { return {
@ -39,7 +31,12 @@
{title:"我的计划"}, {title:"我的计划"},
// {title:""}, // {title:""},
// {title:""}, // {title:""},
] ],
planList:[],
pageNumber: 1,
pageSize: 10,
totalPage: 0,
totolNum: 0,
} }
}, },
created(){ created(){
@ -54,6 +51,7 @@
if(orgAdmin){ if(orgAdmin){
this.tabArr.push({title:"机构计划"}); this.tabArr.push({title:"机构计划"});
} }
this.getListSuperfusionWorkPlan()
}, },
methods:{ methods:{
tabChange:function (param) { tabChange:function (param) {
@ -63,6 +61,77 @@
}, },
changeDate:function (date) { changeDate:function (date) {
console.log(date) console.log(date)
},
getListSuperfusionWorkPlan:function () {
let param ={
org_id: this.BaseConfig.person_info_my.bureau_id,
dept_id: this.BaseConfig.person_info_my.dep_id,
person_id:this.BaseConfig.userInfo.person_id,
page_number:this.pageNumber,
page_size:this.pageSize,
}
if(this.tabIndex == 0){
param.category_type = 1;
}else if(this.tabIndex == 1){
param.category_type = 2;
}else if(this.tabIndex == 2){
param.category_type = 3;
}
this.InterfaceConfig.callInterface([{
url: interConfig.listSuperfusionWorkPlan.url,
params: param,
method: interConfig.listSuperfusionWorkPlan.method,
isTestLogin: interConfig.listSuperfusionWorkPlan.isTestLogin,
}], (result) => {
this.showLoading = false;
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
this.planList = resData.data.list;
this.planList.forEach((item)=>{
if(item.finish_flag == 0){
this.$set(item,"showDoFinish",false);
}
})
this.totalPage = resData.data.total_page;
this.totolNum = resData.data.total_row;
}
}
})
},
showDoFinish:function (item,index) {
this.$set(this.planList[index],"showDoFinish",true);
},
hideDoFinish:function (item,index) {
this.$set(this.planList[index],"showDoFinish",false);
},
doFinish:function (item,index) {
let param ={
plan_id:item.plan_id,
finish_flag:1,
person_id:this.BaseConfig.userInfo.person_id,
}
this.InterfaceConfig.callInterface([{
url: interConfig.changeWorkPlanState.url,
params: param,
method: interConfig.changeWorkPlanState.method,
isTestLogin: interConfig.changeWorkPlanState.isTestLogin,
}], (result) => {
this.showLoading = false;
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
//this.$set(this.planList[index],"finish_flag",1);
Modal.success({
title:"计划已完成",
content:"",
centered:true,
zIndex:100000
})
this.getListSuperfusionWorkPlan();
}
}
})
} }
}, },
components:{ components:{
@ -83,6 +152,60 @@
min-height: 10rem; min-height: 10rem;
max-height: 20rem; max-height: 20rem;
overflow-y: auto; overflow-y: auto;
padding-top: 0.5rem;
.ant-timeline-item-tail{
border-left: 2px solid #c8e6c9;
}
.ant-timeline-item-head-custom{
padding: 0 !important;
}
.completed{
width: 20px;
height: 20px;
border-radius: 20px;
background-color: #31a8fa;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
.no-completed{
width: 20px;
height: 20px;
border-radius: 20px;
background-color: #ff931f;
}
.completed-content{
background-color: #f2f2f2;
padding: 0.5rem;
border-radius:5px;
}
.no-completed-content{
background-color: rgba(187,222,251,1);
color: white;
padding: 0.5rem;
border-radius:5px;
position: relative;
.do-finish{
color: white;
height: 100%;
position: absolute;
right: 0;
top: 0;
display: flex;
justify-content: center;
background-color: black;
filter: alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
align-items: center;
padding: 0 0.5rem;
cursor: pointer;
}
}
.no-completed-content:hover{
background-color: #31a8fa;
}
} }
} }
</style> </style>
Loading…
Cancel
Save