parent
22b3353471
commit
4d9262a2d3
@ -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>
|
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in new issue