待办公文模块阶段代码提交

init
gongdi 4 years ago
parent 22b3353471
commit 4d9262a2d3

@ -0,0 +1,182 @@
<template>
<div class="document-info-div">
<div class="icon-div">
<my-icon type="icon-xinjiangongwen" class="icon-style"></my-icon>
</div>
<div class="info-div" @mouseenter="showButton" @mouseleave="hiddenButton">
<div class="info-row-div">
<span style="font-weight: bolder;width: 100%;overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap"
:title="document.run_name + '('+document.flow_name+')'">{{document.run_name + '(' + document.flow_name + ')'}}</span>
</div>
<div class="info-row-div">
<span class="row-item-div"
:title="document.flow_sequence">编号{{document.flow_sequence && document.flow_sequence !== '' ? document.flow_sequence : '--'}}</span>
<span class="row-item-div" style="margin-left: 5px;text-align: right"
:title="document.data_flag === 1 || document.data_flag === 6? '流转' : '抄送'">流转方式{{document.data_flag === 1 || document.data_flag === 6 ? '流转' : '抄送'}}</span>
</div>
<div class="info-row-div">
<span class="row-item-div" :title="getStep(document)">{{'所在步骤:' + getStep(document)}}</span>
<span class="row-item-div" style="margin-left: 5px;text-align: right"
:title="document.create_time">创建时间{{document.create_time}}</span>
</div>
<div class="superior-png-div">
<img src="./superior.png" style="width:100%;height: 100%"/>
<div class="superior-title-div">上级来文</div>
</div>
<div class="button-div" v-show="showButtonFlag">
<span class="button-span" @click="toHandle(document)"></span>
</div>
</div>
<FusionModalPanel key="publicNoticePanel" v-bind="modalObject" @callback="modalCallback" :style="{display:'block'}">
<component v-if="modalObject.show" :is="childDom" v-bind="modalObject.params"></component>
</FusionModalPanel>
</div>
</template>
<script>
import FusionModalPanel from '../../../../../../../components/common/fusionModal/FusionModalPanel';
export default{
data(){
return {
showButtonFlag:false,
modalObject:{
show:false,
modalTitle:'',
destroyOnClose:true,
OKButton:true,
CancelButton:true,
modalWidth:'50%',
modalClassName:'',
zIndex:100
},
}
},
props: {
document: {
type: Object,
}
},
computed:{
childDom:function () {
return this.modalObject && this.modalObject.url !== ""?() => import(`@/${this.modalObject.url}`):null;
},
},
methods: {
//
getStep: function (item) {
let stepStr = "";
if (item.step_index === null) {
stepStr = "--";
} else if (item.flow_type === 1) {
stepStr = "第" + item.step_index + "步:" + item.node_name;
} else {
stepStr = "第" + item.step_index + "步";
}
return stepStr;
},
//
showButton:function () {
this.showButtonFlag = true;
},
//
hiddenButton:function () {
this.showButtonFlag = false;
},
modalCallback:function () {
this.modalObject.show = false;
},
//
toHandle:function (document) {
document.appId = "handle_document";
this.modalObject.url = "views/superFusionPlatform/application/PopupOfficeApp.vue";
this.modalObject.params = document;
this.modalObject.modalTitle = "公文办理";
this.modalObject.OKButton = false;
this.modalObject.show = true;
}
},
components:{
FusionModalPanel
}
}
</script>
<style scoped lang="scss">
.document-info-div {
width: 100%;
height: 5rem;
display: flex;
background-color: #f2f2f2;
margin-bottom: 0.5rem;
padding-right: 0.5rem;
.icon-div {
width: 4rem;
height: 4rem;
border-radius: 4rem;
background-color: white;
margin: 0.5rem;
display: flex;
justify-content: center;
align-items: center;
.icon-style {
width: 5rem;
display: flex;
justify-content: center;
align-items: center;
font-size: 2.5rem;
color: #31a8fa;
}
}
.info-div {
width: calc(100% - 5rem);
display: flex;
flex-direction: column;
position: relative;
.info-row-div {
width: 100%;
height: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
.row-item-div {
width: calc(100% - 2.5px);
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #aaaaaa;
}
}
.superior-png-div {
width: 4.5rem;
height: 4.5rem;
position: absolute;
top: 0.5rem;
left: 50%;
.superior-title-div {
position: absolute;
color: red;
top: 1.6rem;
left: 0.8rem;
font-size: 12px;
-moz-transform: rotate(327deg);
-webkit-transform: rotate(327deg);
}
}
.button-div{
position: absolute;
top: 0;
right: 0;
bottom:0;
padding: 1rem 0.5rem;
background-color: #31a8fa;
color: white;
display: flex;
justify-content: center;
align-items: center;
opacity: 0.8;
.button-span{
cursor: pointer;
}
}
}
}
</style>

@ -0,0 +1,104 @@
<template>
<div class="document-search-div">
<div class="search-dom-div">
<span>公文级别</span>
<a-select :value="documentLevel" style="width: 100%" @change="levelChange">
<a-select-option v-for="item in documentLevels" :key="item.id">
{{ item.value }}
</a-select-option>
</a-select>
</div>
<div class="search-dom-div">
<span>公文类别</span>
<a-select :value="categoryId" style="width: 100%" @change="categoryChange">
<a-select-option v-for="item in categoryList" :key="item.category_id">
{{ item.category_name }}
</a-select-option>
</a-select>
</div>
</div>
</template>
<script>
import {Select} from 'ant-design-vue';
import InterConfig from './interConfig';
export default{
data(){
return {
documentLevels: [{id: 0, value: "全部"}, {id: 1, value: "上级来文"}, {id: 2, value: "内部办文"}],//
documentLevel: 0,
categoryList: [{category_id: 0, value: "全部"}],//
categoryId: 0,//
}
},
mounted(){
this.getCategoryNoPageList();
},
methods: {
//
levelChange: function (level) {
if (this.documentLevel !== level) {
this.documentLevel = level;
this.callBack();
}
},
//
categoryChange: function (categoryId) {
if (this.categoryId !== categoryId) {
this.categoryId = categoryId;
this.callBack();
}
},
//
callBack: function () {
this.$emit("searchChange", {documentLevel: this.documentLevel, categoryId: this.categoryId})
},
//
getCategoryNoPageList: function () {
let param = {
business_type: 2,
org_id: this.BaseConfig.person_info_my.bureau_id,
}
this.categoryList = [{category_id: 0, category_name: "全部"}];//
this.InterfaceConfig.callInterface([{
url: InterConfig.categoryNoPageList.url,
params: param,
method: InterConfig.categoryNoPageList.method,
isTestLogin: InterConfig.categoryNoPageList.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
let categoryList = resData.data.list;
if (categoryList && categoryList.length > 0) {
for (let i = 0, len = categoryList.length; i < len; i++) {
this.categoryList.push(categoryList[i]);
}
}
}
})
}
},
components: {
ASelect: Select,
ASelectOption: Select.Option,
}
}
</script>
<style scoped lang="scss">
.document-search-div {
width: 100%;
min-height: 3rem;
display: flex;
justify-content: center;
align-items: center;
.search-dom-div {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
.ant-select {
width: calc(100% - 100px) !important;
margin-left: 0.5rem;
}
}
}
</style>

@ -0,0 +1,175 @@
<template>
<div class="document-to-do-div">
<DocumentSearch @searchChange="searchChange"/>
<div class="document-to-do-list-div">
<a-spin :spinning="isLoading"
style="min-height: 10rem;display: flex;justify-content: center;align-items: center;">
<div v-if="!isLoading && dataList.length > 0" class="data-list-div">
<div v-for="item in dataList" class="document-row-div">
<DocumentInfo :document="item"/>
</div>
</div>
<div v-if="!isLoading && dataList.length === 0" class="no-data-div">
<a-empty/>
</div>
</a-spin>
</div>
<div class="page-dom-div">
<a-icon type="left-circle" title="上一页"
:class="'page-icon-dom '+ (pageNumber == 1?'cannot-click':'can-click')"
v-on:click="changePage('previous')"/>
<span class="total-num-span">{{totolNum}}</span>
<a-icon type="right-circle" title="下一页"
:class="'page-icon-dom '+ (pageNumber == totalPage?'cannot-click':'can-click')"
v-on:click="changePage('next')"/>
</div>
</div>
</template>
<script>
/*
* 待办公文
* */
import DocumentSearch from './documentSearch.vue';
import {Spin, Icon, Empty} from 'ant-design-vue';
import InterConfig from './interConfig';
import DocumentInfo from './documentInfo.vue';
export default{
data(){
return {
isLoading: true,
orgSelectType: 0,// 0 1 2
categoryId: "",//
pageNumber: 1,
pageSize: 6,
totolNum: 0,
totalPage: 0,
dataList: [],//
}
},
created(){
this.getDataList();
},
methods: {
//
searchChange: function (param) {
this.orgSelectType = param.documentLevel;
this.categoryId = param.categoryId;
this.pageNumber = 1;
this.getDataList();
},
//
getDataList: function () {
let param = {
page_num: this.pageNumber,
page_size: this.pageSize,
business_type: 2,
person_id: this.BaseConfig.userInfo.person_id,
org_id: this.BaseConfig.person_info_my.bureau_id,
handle_flag: 1,
org_select_type: this.orgSelectType
}
if (this.categoryId !== 0 && this.categoryId !== "") {
param.category_id = this.categoryId;
}
this.isLoading = true;
this.dataList = [];//
this.InterfaceConfig.callInterface([{
url: InterConfig.list_by_handle_flag.url,
params: param,
method: InterConfig.list_by_handle_flag.method,
isTestLogin: InterConfig.list_by_handle_flag.isTestLogin,
}], (result) => {
this.isLoading = false;
let resData = result[0].data;
if (resData.code === 2000) {
let dataList = resData.data.list;
if (dataList && dataList.length > 0) {
for (let i = 0, len = dataList.length; i < len; i++) {
this.dataList.push(dataList[i]);
}
}
this.totolNum = resData.data.total_row;
this.totalPage = resData.data.total_page;
}
})
},
//
changePage: function (type) {
if (type == 'previous') {
if (this.pageNumber == 1) {
return;
}
this.pageNumber--;
} else if (type == 'next') {
if (this.pageNumber == this.totalPage) {
return;
}
this.pageNumber++;
}
this.getDataList();
},
},
components: {
DocumentSearch,
ASpin: Spin,
AIcon: Icon,
AEmpty: Empty,
DocumentInfo
}
}
</script>
<style scoped lang="scss">
.document-to-do-div {
width: 100%;
min-height: 20rem;
display: flex;
flex-direction: column;
.document-to-do-list-div {
width: 100%;
display: flex;
flex-direction: column;
min-height: 15rem;
/deep/ .ant-spin-container {
width: 100% !important;
height: auto;
.data-list-div {
width: 100%;
min-height: 15rem;
display: flex;
flex-direction: column;
}
.no-data-div {
width: 100%;
min-height: 5rem;
display: flex;
justify-content: center;
align-items: center;
}
}
}
.page-dom-div {
height: 2.5rem;
line-height: 2.5rem;
text-align: right;
padding-right: 0.5rem;
.page-icon-dom {
font-size: 1.2rem;
border: none;
border-radius: 1rem;
}
.cannot-click {
background-color: #a3b0c0;
color: white;
}
.can-click {
background-color: #31a8fa;
color: white;
}
.total-num-span {
margin-left: 1rem;
margin-right: 1rem;
}
}
}
</style>

@ -0,0 +1,179 @@
<template>
<div class="document-to-do-large-div">
<DocumentSearch @searchChange="searchChange"/>
<div class="document-to-do-list-div">
<a-spin :spinning="isLoading"
style="min-height: 10rem;display: flex;justify-content: center;align-items: center;">
<div v-if="!isLoading && dataList.length > 0" class="data-list-div">
<div v-for="item in dataList" class="document-row-div">
<DocumentInfo :document="item"/>
</div>
</div>
<div v-if="!isLoading && dataList.length === 0" class="no-data-div">
<a-empty/>
</div>
</a-spin>
</div>
<div class="page-dom-div">
<a-icon type="left-circle" title="上一页"
:class="'page-icon-dom '+ (pageNumber == 1?'cannot-click':'can-click')"
v-on:click="changePage('previous')"/>
<span class="total-num-span">{{totolNum}}</span>
<a-icon type="right-circle" title="下一页"
:class="'page-icon-dom '+ (pageNumber == totalPage?'cannot-click':'can-click')"
v-on:click="changePage('next')"/>
</div>
</div>
</template>
<script>
/*
* 待办公文
* */
import DocumentSearch from './documentSearch.vue';
import {Spin,Icon,Empty} from 'ant-design-vue';
import InterConfig from './interConfig';
import DocumentInfo from './documentInfo.vue';
export default{
data(){
return {
isLoading: true,
orgSelectType: 0,// 0 1 2
categoryId: "",//
pageNumber: 1,
pageSize: 10,
totolNum: 0,
totalPage: 0,
dataList:[],//
}
},
created(){
this.getDataList();
},
methods: {
//
searchChange: function (param) {
this.orgSelectType = param.documentLevel;
this.categoryId = param.categoryId;
this.pageNumber = 1;
this.getDataList();
},
//
getDataList: function () {
let param = {
page_num: this.pageNumber,
page_size: this.pageSize,
business_type: 2,
person_id: this.BaseConfig.userInfo.person_id,
org_id: this.BaseConfig.person_info_my.bureau_id,
handle_flag:1,
org_select_type:this.orgSelectType
}
if(this.categoryId !== 0 && this.categoryId !== ""){
param.category_id = this.categoryId;
}
this.isLoading = true;
this.dataList = [];//
this.InterfaceConfig.callInterface([{
url: InterConfig.list_by_handle_flag.url,
params: param,
method: InterConfig.list_by_handle_flag.method,
isTestLogin: InterConfig.list_by_handle_flag.isTestLogin,
}], (result) => {
this.isLoading = false;
let resData = result[0].data;
if (resData.code === 2000) {
let dataList = resData.data.list;
if(dataList && dataList.length > 0){
for(let i = 0,len = dataList.length;i < len;i ++){
this.dataList.push(dataList[i]);
}
}
this.totolNum = resData.data.total_row;
this.totalPage = resData.data.total_page;
}
})
},
//
changePage: function (type) {
if (type == 'previous') {
if (this.pageNumber == 1) {
return;
}
this.pageNumber--;
} else if (type == 'next') {
if (this.pageNumber == this.totalPage) {
return;
}
this.pageNumber++;
}
this.getDataList();
},
},
components: {
DocumentSearch,
ASpin: Spin,
AIcon:Icon,
AEmpty:Empty,
DocumentInfo
}
}
</script>
<style scoped lang="scss">
.document-to-do-large-div {
width: 100%;
min-height: 20rem;
display: flex;
flex-direction: column;
.document-to-do-list-div {
width: 100%;
display: flex;
flex-direction: column;
min-height: 15rem;
/deep/.ant-spin-container{
width: 100% !important;
height: auto;
.data-list-div{
width: 100%;
min-height: 15rem;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.document-row-div{
width: calc(50% - 2.5px);
}
}
.no-data-div{
width: 100%;
min-height: 5rem;
display: flex;
justify-content: center;
align-items: center;
}
}
}
.page-dom-div {
height: 2.5rem;
line-height: 2.5rem;
text-align: right;
padding-right: 0.5rem;
.page-icon-dom {
font-size: 1.2rem;
border: none;
border-radius: 1rem;
}
.cannot-click {
background-color: #a3b0c0;
color: white;
}
.can-click {
background-color: #31a8fa;
color: white;
}
.total-num-span {
margin-left: 1rem;
margin-right: 1rem;
}
}
}
</style>

@ -0,0 +1,18 @@
export default {
/*
* 流程分类列表无分页
* */
"categoryNoPageList":{
url:'/intellioa/flow/category/noPageList',
method:'get',
isTestLogin:true
},
/*
* 待办列表
* */
"list_by_handle_flag":{
url:'/intellioa/flow/run/list_by_handle_flag',
method:'get',
isTestLogin:true
},
}
Loading…
Cancel
Save