parent
49b48a10fb
commit
f7c5a3a2ac
@ -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>
|
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div class="document-file-modal-style">
|
||||
<!--<a-tree :tree-data="treeData"-->
|
||||
<!--:replaceFields="replaceFields"-->
|
||||
<!--></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>
|
@ -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…
Reference in new issue