洋浦学校 待办工作阶段代码提交

init
gongdi 3 years ago
parent 49b48a10fb
commit f7c5a3a2ac

@ -56,7 +56,7 @@ export const moduleData=[
purview_code:"hbg_xzgwby",menu_name:['sendRecord'],show_oneLevel:true},
{module_id:'all_official_documents', module_name:'全部公文', relative_crm:['officialDocument','processSearch'],icon:"icon-quanbugongwen",
module_url_small:'',module_url_large:'',
module_url_small:'oa/allDocument/allDocument.vue',module_url_large:'oa/allDocument/allDocumentLarge.vue',
purview_code:"hbg_xzgwby", menu_name:['processSearch'],show_oneLevel:true},
{module_id:'plan_query', module_name:'计划查询', relative_crm:['daliyOffice','newPlanConclusion','work_plan'],icon:"icon-jihuachaxun",

@ -0,0 +1,171 @@
<template>
<div class="all-document-div">
<DocumentSearch @searchChange="searchChange" :searchType="2"/>
<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" :pageType="4" @updateDate="getDataList"/>
</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 {Spin, Empty, Icon} from 'ant-design-vue';
import DocumentSearch from '../documentToDo/documentSearch.vue';
import DocumentInfo from '../documentToDo/documentInfo.vue';
import InterConfig from '../documentToDo/interConfig';
export default{
data(){
return {
isLoading: true,
status: 0,//
categoryId: "",//
pageNumber: 1,
pageSize: 6,
totolNum: 0,
totalPage: 0,
dataList: [],//
}
},
created(){
this.getDataList();
},
methods: {
searchChange: function (param) {
this.status = param.status;
this.categoryId = param.categoryId;
this.pageNumber = 1;
this.getDataList();
},
getDataList: function () {
let param = {
page_num: this.pageNumber,
page_size: this.pageSize,
business_type: 2,
run_status: this.status,
person_id: this.BaseConfig.userInfo.person_id,
org_id: this.BaseConfig.person_info_my.bureau_id,
}
if (this.categoryId !== 0 && this.categoryId !== "") {
param.category_id = this.categoryId;
}
this.isLoading = true;
this.dataList = [];//
this.InterfaceConfig.callInterface([{
url: InterConfig.all_list.url,
params: param,
method: InterConfig.all_list.method,
isTestLogin: InterConfig.all_list.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,
DocumentInfo,
ASpin: Spin,
AEmpty: Empty,
AIcon: Icon
}
}
</script>
<style scoped lang="scss">
.all-document-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,175 @@
<template>
<div class="all-document-large-div">
<DocumentSearch @searchChange="searchChange" :searchType="2"/>
<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" :pageType="4" @updateDate="getDataList"/>
</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 {Spin, Empty, Icon} from 'ant-design-vue';
import DocumentSearch from '../documentToDo/documentSearch.vue';
import DocumentInfo from '../documentToDo/documentInfo.vue';
import InterConfig from '../documentToDo/interConfig';
export default{
data(){
return {
isLoading: true,
status: 0,//
categoryId: "",//
pageNumber: 1,
pageSize: 10,
totolNum: 0,
totalPage: 0,
dataList: [],//
}
},
created(){
this.getDataList();
},
methods: {
searchChange: function (param) {
this.status = param.status;
this.categoryId = param.categoryId;
this.pageNumber = 1;
this.getDataList();
},
getDataList: function () {
let param = {
page_num: this.pageNumber,
page_size: this.pageSize,
business_type: 2,
run_status: this.status,
person_id: this.BaseConfig.userInfo.person_id,
org_id: this.BaseConfig.person_info_my.bureau_id,
}
if (this.categoryId !== 0 && this.categoryId !== "") {
param.category_id = this.categoryId;
}
this.isLoading = true;
this.dataList = [];//
this.InterfaceConfig.callInterface([{
url: InterConfig.all_list.url,
params: param,
method: InterConfig.all_list.method,
isTestLogin: InterConfig.all_list.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,
DocumentInfo,
ASpin: Spin,
AEmpty: Empty,
AIcon: Icon
}
}
</script>
<style scoped lang="scss">
.all-document-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>

@ -32,6 +32,29 @@
</div>
</div>
</div>
<div v-if="showMoreButtonFlag" id="moreButtonDiv" class="more-button-style">
<!--已结束已废除已归档的公文 没有挂起和恢复-->
<div :class="'button-style '+ (document.run_status === 2 || document.is_abrogate === 1 || document.run_status === 3?' disable-style':'')">
<span @click="hangUpDocument(document)">{{document.run_status === 1 ? '' : (document.run_status === 4 ? '' : '')}}</span>
</div>
<!--已挂起已废除已归档的公文 没有唤醒和结束-->
<div :class="'button-style '+ (document.run_status === 4 || document.is_abrogate === 1 || document.run_status === 3?' disable-style':'')">
<span @click="endDocument(document)">{{document.run_status === 2 ? '' : (document.run_status === 1 ? '' : '')}}</span>
</div>
<!--已废除公文 没有废除-->
<div :class="'button-style '+ (document.is_abrogate === 1?' disable-style':'')">
<span @click="abrogateDocument(document)"></span>
</div>
<div class="button-style">
<span @click="deleteDocument(document)"></span>
</div>
<div :class="'button-style '+ (document.run_status === 3?' disable-style':'')">
<span @click="onlyFileDocument(document)"></span>
</div>
<div class="button-style">
<span @click="syncFileDocument(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>
@ -43,19 +66,29 @@
okText="确定"
@ok="handleOk"
@cancel="handleCancel">
您确定要删除该公文吗
<div>{{modalTitle}}</div>
<a-checkbox v-if="operateType === 6" @change="deleteDocumentData">
是否删除所有已办数据
</a-checkbox>
<span v-if="operateType === 7" style="color: red">
归档是指将公文状态变更为归档待办公文不可继续办理
</span>
<FileModal v-if="operateType === 8" @selectParentId="selectParentId"/>
</a-modal>
</div>
</template>
<script>
import FusionModalPanel from '../../../../../../../components/common/fusionModal/FusionModalPanel';
import {Modal} from 'ant-design-vue';
import {Modal, Dropdown, Checkbox} from 'ant-design-vue';
import InterConfig from './interConfig';
import FileModal from './fileModal.vue';
export default{
data(){
return {
visible: false,
showButtonFlag: false,
showMoreButtonFlag: false,
runId: "",
operateArr: [],
modalObject: {
@ -68,6 +101,21 @@
modalClassName: '',
zIndex: 100
},
buttonAry: [
{
id: 1, value: "挂起", fun: (param) => {
this.hangUpDocument(param)
}
},
{id: 2, value: "结束"},
{id: 3, value: "废除"},
{id: 4, value: "删除"},
{id: 5, value: "归档"},
],
modalTitle: "",
operateType: 0,//1 2 3 4 5 6 7
isDeleteHandle: 0,// 0 1
parentId:"",//ID
}
},
props: {
@ -116,8 +164,16 @@
}
if (pageType === 4) {
let arr = [
{id: 1, name: "查看"},
{id: 2, name: "更多"},
{
id: 1, name: "查看", fun: (param) => {
this.toHandle(param);
}
},
{
id: 2, name: "更多", fun: (param) => {
this.toShowMore();
}, type: "dropDown", child: this.buttonAry
},
]
this.operateArr.push(...arr)
}
@ -128,6 +184,10 @@
},
},
methods: {
//id
selectParentId:function (parentId) {
this.parentId = parentId;
},
//
getStep: function (item) {
let stepStr = "";
@ -146,22 +206,24 @@
},
//
hiddenButton: function () {
this.showButtonFlag = false;
if (!this.showMoreButtonFlag) {
this.showMoreButtonFlag = false;
this.showButtonFlag = false;
}
},
modalCallback: function (ary) {
this.modalObject.show = false;
},
//
toHandle: function (document) {
console.log("document:", document)
if (this.pageType === 1) {
document.appId = "handle_document";
this.modalObject.modalTitle = "公文办理";
}
if (this.pageType === 2 || this.pageType === 3) {
if (this.pageType === 2 || this.pageType === 3 || this.pageType === 4) {
document.appId = "view_document";
this.modalObject.modalTitle = "查看公文";
if(this.pageType === 3){
if (this.pageType === 3) {
document.person_id = this.BaseConfig.userInfo.person_id;
}
}
@ -172,40 +234,169 @@
},
//
deleteDocument: function (document) {
console.log("删除公文:", document)
this.operateType = 1;
this.runId = document.run_id;
this.visible = true;
this.modalTitle = "您确定要删除该公文吗?";
},
//
hangUpDocument: function (document) {
this.runId = document.run_id;
this.visible = true;
if (document.run_status === 1) {
this.operateType = 2;
this.modalTitle = "您确定要挂起该公文吗?";
} else if (document.run_status === 4) {
this.operateType = 3;
this.modalTitle = "您确定要恢复该公文吗?";
}
},
//
endDocument: function (document) {
this.runId = document.run_id;
this.visible = true;
if (document.run_status === 1) {
this.operateType = 4;
this.modalTitle = "您确定要结束该公文吗?";
} else if (document.run_status === 2) {
this.operateType = 5;
this.modalTitle = "您确定要唤醒该公文吗?";
}
},
//
abrogateDocument: function (document) {
this.runId = document.run_id;
this.visible = true;
this.operateType = 6;
this.modalTitle = "您确定要废除该公文吗?";
},
//
deleteDocumentData: function (e) {
let checked = e.target.checked;
if (checked) {
this.isDeleteHandle = 1;
} else {
this.isDeleteHandle = 0;
}
},
//
onlyFileDocument: function (document) {
this.runId = document.run_id;
this.visible = true;
this.operateType = 7;
this.modalTitle = "您确定要归档该公文吗?";
},
//
syncFileDocument:function (document) {
this.runId = document.run_id;
this.visible = true;
this.operateType = 8;
},
//
handleOk: function () {
let url = "";
let method = "";
let isTestLogin = "";
let param = {
run_id: this.runId
}
switch (this.operateType) {
case 1:
//
url = InterConfig.delete.url;
method = InterConfig.delete.method;
isTestLogin = InterConfig.delete.isTestLogin;
break;
case 2:
//
url = InterConfig.hangRun.url;
method = InterConfig.hangRun.method;
isTestLogin = InterConfig.hangRun.isTestLogin;
break;
case 3:
//
url = InterConfig.recoverRun.url;
method = InterConfig.recoverRun.method;
isTestLogin = InterConfig.recoverRun.isTestLogin;
break;
case 4:
//
url = InterConfig.stop.url;
method = InterConfig.stop.method;
isTestLogin = InterConfig.stop.isTestLogin;
break;
case 5:
//
url = InterConfig.wakeUp.url;
method = InterConfig.wakeUp.method;
isTestLogin = InterConfig.wakeUp.isTestLogin;
break;
case 6:
//
url = InterConfig.abrogateRun.url;
method = InterConfig.abrogateRun.method;
isTestLogin = InterConfig.abrogateRun.isTestLogin;
param.is_delete_handle = this.isDeleteHandle;
break;
case 7:
//
url = InterConfig.onlyFile.url;
method = InterConfig.onlyFile.method;
isTestLogin = InterConfig.onlyFile.isTestLogin;
break;
case 8:
//
url = InterConfig.fileAttachment.url;
method = InterConfig.fileAttachment.method;
isTestLogin = InterConfig.fileAttachment.isTestLogin;
param.person_id = this.BaseConfig.userInfo.person_id;
param.org_id = this.BaseConfig.person_info_my.bureau_id;
param.identity_id = this.BaseConfig.userInfo.identity_id;
if(this.parentId === ""){
Modal.success({
title: "请选择您要归档的文件夹位置",
content: "",
centered: true
})
return;
}
param.parent_id = this.parentId;
break;
}
this.InterfaceConfig.callInterface([{
url: InterConfig.delete.url,
params: {run_id: this.runId},
method: InterConfig.delete.method,
isTestLogin: InterConfig.delete.isTestLogin,
url: url,
params: param,
method: method,
isTestLogin: isTestLogin,
}], (result) => {
this.isLoading = false;
let resData = result[0].data;
if (resData.code === 2000) {
this.visible = false;
Modal.success({
title: "删除成功",
title: "操作成功",
content: "",
centered: true
})
this.$emit("updateDate");
}
})
},
//
handleCancel: function () {
this.visible = false;
}
},
//
toShowMore: function () {
this.showMoreButtonFlag = !this.showMoreButtonFlag;
},
},
components: {
FusionModalPanel,
AModal: Modal
AModal: Modal,
ADropdown: Dropdown,
ACheckbox: Checkbox,
FileModal
}
}
</script>
@ -218,6 +409,7 @@
background-color: #f2f2f2;
margin-bottom: 0.5rem;
padding-right: 0.5rem;
position: relative;
.icon-div {
width: 4rem;
height: 4rem;
@ -282,6 +474,7 @@
justify-content: center;
align-items: center;
opacity: 0.8;
flex-wrap: nowrap;
.button-span {
height: 100%;
cursor: pointer;
@ -292,6 +485,33 @@
align-items: center;
padding: 0.5rem;
}
}
}
.more-button-style {
position: absolute;
right: 0;
top: 5rem;
width: 90px;
height: 20px;
display: flex;
flex-direction: column;
z-index: 1000;
.button-style {
width: 100%;
padding: 5px;
margin-top: 2px;
background-color: #31a8fa;
color: white;
text-align: center;
span {
cursor: pointer;
}
}
.disable-style {
background-color: #cccccc;
cursor: auto;
}
}
}

@ -0,0 +1,98 @@
<template>
<div class="document-file-modal-style">
<!--<a-tree :tree-data="treeData"-->
<!--:replaceFields="replaceFields"-->
<!--&gt;</a-tree>-->
<a-tree :load-data="onLoadData" :tree-data="treeData" :replaceFields="replaceFields" @select="selectNode"/>
</div>
</template>
<script>
/*
* 归档列表
* */
import InterConfig from './interConfig';
import {Tree} from 'ant-design-vue';
export default{
data(){
return {
treeData: [],
listParams: {
org_id: this.BaseConfig.person_info_my.bureau_id,
file_id: 0,
},
replaceFields:{
title:"file_name"
},
}
},
created(){
this.getTreeData();
},
methods: {
onLoadData:function (treeNode) {
console.log("treeNode:",treeNode)
let fileId = treeNode.dataRef.file_id;
this.listParams.file_id = fileId;
let _this = this;
let nodeChildren = [];
return new Promise(resolve=>{
_this.InterfaceConfig.callInterface([{
url: InterConfig.allOrgFile.url,
params: this.listParams,
method: InterConfig.allOrgFile.method,
isTestLogin: InterConfig.allOrgFile.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
resData.data.map((item) => {
if (item.file_type === 0) {
nodeChildren.push(item)
}
treeNode.dataRef.children = nodeChildren;
this.treeData = [...this.treeData];
resolve();
});
}
})
})
},
getTreeData: function () {
let treeData = [];
this.InterfaceConfig.callInterface([{
url: InterConfig.allOrgFile.url,
params: this.listParams,
method: InterConfig.allOrgFile.method,
isTestLogin: InterConfig.allOrgFile.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (resData.code === 2000) {
resData.data.map((item) => {
if (item.file_type === 0) {
console.log(item)
treeData.push(item)
}
this.treeData = treeData;
});
}
})
},
selectNode:function (selectedKeys,e) {
console.log(selectedKeys,e)
let parentId = e.node.dataRef.file_id;
console.log(parentId)
this.$emit("selectParentId",parentId)
}
},
components:{
ATree:Tree
}
}
</script>
<style scoped lang="scss">
.document-file-modal-style {
width: 100%;
height: 500px;
overflow: auto;
}
</style>

@ -2,33 +2,105 @@ export default {
/*
* 流程分类列表无分页
* */
"categoryNoPageList":{
url:'/intellioa/flow/category/noPageList',
method:'get',
isTestLogin:true
"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
"list_by_handle_flag": {
url: '/intellioa/flow/run/list_by_handle_flag',
method: 'get',
isTestLogin: true
},
/*
* 我的公文列表
* */
"my_list":{
url:'/intellioa/flow/run/my_list',
method:'get',
isTestLogin:true
* 我的公文列表
* */
"my_list": {
url: '/intellioa/flow/run/my_list',
method: 'get',
isTestLogin: true
},
/*
* 全部公文列表
* */
"all_list": {
url: '/intellioa/flow/run/list',
method: 'get',
isTestLogin: true
},
/*
* 删除公文
* */
"delete":{
url:'/intellioa/flow/run/delete',
method:'post',
isTestLogin:true
"delete": {
url: '/intellioa/flow/run/delete',
method: 'post',
isTestLogin: true
},
/*
* 挂起
* */
"hangRun": {
url: '/intellioa/flow/run/hangRun',
method: 'post',
isTestLogin: true
},
/*
* 恢复
* */
"recoverRun": {
url: '/intellioa/flow/run/recoverRun',
method: 'post',
isTestLogin: true
},
/*
* 结束
* */
"stop": {
url: '/intellioa/flow/run/stop',
method: 'post',
isTestLogin: true
},
/*
* 唤醒
* */
"wakeUp": {
url: '/intellioa/flow/run/wakeUp',
method: 'post',
isTestLogin: true
},
/*
* 废除
* */
"abrogateRun": {
url: '/intellioa/flow/run/abrogateRun',
method: 'post',
isTestLogin: true
},
/*
* 归档
* */
"onlyFile": {
url: '/intellioa/flow/run/onlyFile',
method: 'post',
isTestLogin: true
},
/*
* 同步文档列表
* */
"allOrgFile": {
url: '/intellioa/filePermission/allOrgFile',
method: 'get',
isTestLogin: true
},
/*
* 同步文档
* */
"fileAttachment": {
url: '/intellioa/flow/run/fileAttachment',
method: 'post',
isTestLogin: true
}
}

@ -1,17 +1,178 @@
<template>
<div>
<div class="my-document-large-div">
<DocumentSearch @searchChange="searchChange" :searchType="2"/>
<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" :pageType="3" @updateDate="getDataList"/>
</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 {Spin,Empty,Icon} from 'ant-design-vue';
import DocumentSearch from '../documentToDo/documentSearch.vue';
import DocumentInfo from '../documentToDo/documentInfo.vue';
import InterConfig from '../documentToDo/interConfig';
export default{
data(){
return {}
return {
isLoading: true,
status: "",//
categoryId: "",//
pageNumber: 1,
pageSize: 10,
totolNum: 0,
totalPage: 0,
dataList: [],//
}
},
created(){
this.getDataList();
},
methods:{
searchChange:function (param) {
this.status = param.status;
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,
}
if (this.categoryId !== 0 && this.categoryId !== "") {
param.category_id = this.categoryId;
}
if (this.status !== 0 && this.status !== "") {
param.run_status = this.status;
}
this.isLoading = true;
this.dataList = [];//
this.InterfaceConfig.callInterface([{
url: InterConfig.my_list.url,
params: param,
method: InterConfig.my_list.method,
isTestLogin: InterConfig.my_list.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,
DocumentInfo,
ASpin:Spin,
AEmpty:Empty,
AIcon:Icon
}
}
</script>
<style></style>
<style scoped lang="scss">
.my-document-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>
Loading…
Cancel
Save