|
@@ -2,16 +2,11 @@
|
|
|
<div class="bgcolor">
|
|
<div class="bgcolor">
|
|
|
<!-- 顶部条-->
|
|
<!-- 顶部条-->
|
|
|
<div class="navBarTOP">
|
|
<div class="navBarTOP">
|
|
|
- <van-nav-bar
|
|
|
|
|
- class="navBar"
|
|
|
|
|
- title="汇报审批"
|
|
|
|
|
- left-arrow
|
|
|
|
|
- @click-left="onClickLeft"
|
|
|
|
|
- />
|
|
|
|
|
- <van-tabs v-model="type" color="#0057ba" @change="tabChange">
|
|
|
|
|
- <van-tab title="待审批" name="approvalPending" :disabled="disabled"></van-tab>
|
|
|
|
|
- <van-tab title="已审批" name="approvalSuccess" :disabled="disabled"></van-tab>
|
|
|
|
|
- </van-tabs>
|
|
|
|
|
|
|
+ <van-nav-bar class="navBar" title="汇报审批" left-arrow @click-left="onClickLeft" />
|
|
|
|
|
+ <van-tabs v-model="type" color="#0057ba" @change="tabChange">
|
|
|
|
|
+ <van-tab title="待审批" name="approvalPending" :disabled="disabled"></van-tab>
|
|
|
|
|
+ <van-tab title="已审批" name="approvalSuccess" :disabled="disabled"></van-tab>
|
|
|
|
|
+ </van-tabs>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="container">
|
|
<div class="container">
|
|
|
<div class="lineGrey"></div>
|
|
<div class="lineGrey"></div>
|
|
@@ -23,143 +18,164 @@
|
|
|
<div class="lineGrey"></div>
|
|
<div class="lineGrey"></div>
|
|
|
<div class="lineGrey"></div>
|
|
<div class="lineGrey"></div>
|
|
|
<div class="lineGrey"></div>
|
|
<div class="lineGrey"></div>
|
|
|
- <van-list v-model="loading" :finished="finished" finished-text="--已经到底了--" @load="onLoad">
|
|
|
|
|
- <div class="cellcontent brud weekList" v-for="(item,index) in list" :key="index">
|
|
|
|
|
- <van-cell @click="approveFn(item)">
|
|
|
|
|
- <div class="cardContent">
|
|
|
|
|
- <div class="title" v-if="type=='approvalPending'">
|
|
|
|
|
- <p class="textLeft" v-if="item.reportType==1">{{item.nickName}}的{{item.reportTypeStr}}</p>
|
|
|
|
|
- <p class="textLeft" v-if="item.reportType==2">{{item.deptName}}的{{item.reportTypeStr}}</p>
|
|
|
|
|
- <p class="textLeft" v-if="item.reportType==3">{{item.dqName}}的{{item.reportTypeStr}}</p>
|
|
|
|
|
- <p class="textRight">审批</p></div>
|
|
|
|
|
- <div class="title" v-if="type=='approvalSuccess'">
|
|
|
|
|
- <p class="textLeft" v-if="item.reportType==1">{{item.nickName}}的{{item.reportTypeStr}}</p>
|
|
|
|
|
- <p class="textLeft" v-if="item.reportType==2">{{item.deptName}}的{{item.reportTypeStr}}</p>
|
|
|
|
|
- <p class="textLeft" v-if="item.reportType==3">{{item.dqName}}的{{item.reportTypeStr}}</p>
|
|
|
|
|
- <p class="textRight">
|
|
|
|
|
- <van-rate
|
|
|
|
|
|
|
+ <van-list
|
|
|
|
|
+ v-model="loading"
|
|
|
|
|
+ :finished="finished"
|
|
|
|
|
+ finished-text="--已经到底了--"
|
|
|
|
|
+ @load="onLoad">
|
|
|
|
|
+ <div class="cellcontent brud weekList" v-for="(item, index) in list" :key="index">
|
|
|
|
|
+ <van-cell @click="approveFn(item)">
|
|
|
|
|
+ <div class="cardContent">
|
|
|
|
|
+ <div class="title" v-if="type == 'approvalPending'">
|
|
|
|
|
+ <!-- reportType: 1日报;2周报;3半月报 -->
|
|
|
|
|
+ <p class="textLeft" v-if="item.reportType == 1">
|
|
|
|
|
+ {{ item.nickName }}的{{ item.reportTypeStr }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="textLeft" v-if="item.reportType == 2">
|
|
|
|
|
+ {{ item.deptName }}的{{ item.reportTypeStr }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="textLeft" v-if="item.reportType == 3">
|
|
|
|
|
+ {{ item.dqName }}的{{ item.reportTypeStr }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="textRight">审批</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="title" v-if="type == 'approvalSuccess'">
|
|
|
|
|
+ <p class="textLeft" v-if="item.reportType == 1">
|
|
|
|
|
+ {{ item.nickName }}的{{ item.reportTypeStr }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="textLeft" v-if="item.reportType == 2">
|
|
|
|
|
+ {{ item.deptName }}的{{ item.reportTypeStr }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="textLeft" v-if="item.reportType == 3">
|
|
|
|
|
+ {{ item.dqName }}的{{ item.reportTypeStr }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="textRight">
|
|
|
|
|
+ <van-rate
|
|
|
v-model="item.number"
|
|
v-model="item.number"
|
|
|
:size="18"
|
|
:size="18"
|
|
|
color="#ffd21e"
|
|
color="#ffd21e"
|
|
|
void-icon="star"
|
|
void-icon="star"
|
|
|
void-color="#eee"
|
|
void-color="#eee"
|
|
|
- readonly
|
|
|
|
|
- />
|
|
|
|
|
- </p>
|
|
|
|
|
|
|
+ readonly />
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="info" v-if="type == 'approvalPending'">
|
|
|
|
|
+ 提交时间:{{ item.commitTime }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="info" v-if="type == 'approvalSuccess'">
|
|
|
|
|
+ 审批时间:{{ item.approvalTime }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="info" v-if="type=='approvalPending'">提交时间:{{item.commitTime}}</div>
|
|
|
|
|
- <div class="info" v-if="type=='approvalSuccess'">审批时间:{{item.approvalTime}}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </van-cell>
|
|
|
|
|
- </div>
|
|
|
|
|
- <van-empty description="" v-if="list.length==0"/>
|
|
|
|
|
|
|
+ </van-cell>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <van-empty description="" v-if="list.length == 0" />
|
|
|
</van-list>
|
|
</van-list>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import {approveList} from "@/api/index";
|
|
|
|
|
|
|
+import { approveList } from '@/api/index';
|
|
|
export default {
|
|
export default {
|
|
|
- name: "MyHistoricalWeekly",
|
|
|
|
|
|
|
+ name: 'MyHistoricalWeekly',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- type:"approvalPending",
|
|
|
|
|
- disabled:false,
|
|
|
|
|
- pageNum:1,
|
|
|
|
|
- pageSize:10,
|
|
|
|
|
|
|
+ type: 'approvalPending',
|
|
|
|
|
+ disabled: false,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
finished: false,
|
|
finished: false,
|
|
|
- list:[]
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ };
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// this.approveList()
|
|
// this.approveList()
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
$route(to, from) {
|
|
$route(to, from) {
|
|
|
- this.powerGrade = localStorage.getItem("powerGrade")
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/home"){
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ this.powerGrade = localStorage.getItem('powerGrade');
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/home') {
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/daily"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/daily') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/dailyApproval"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/dailyApproval') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/weeklyApproval"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/weeklyApproval') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/doubleWeeklyApproval"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/doubleWeeklyApproval') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/dailyDetails"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/dailyDetails') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/weeklyApprovalDetils"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/weeklyApprovalDetils') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- if(to.path=="/dailyApprovalList"&&from.path=="/doubleWeeklyDetils"){
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ if (to.path == '/dailyApprovalList' && from.path == '/doubleWeeklyDetils') {
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- onLoad(){
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ onLoad() {
|
|
|
|
|
+ this.approveList();
|
|
|
},
|
|
},
|
|
|
- approveFn(row){
|
|
|
|
|
- this.list=[];
|
|
|
|
|
- if(this.type=="approvalPending"){
|
|
|
|
|
- if(row.reportType=="1"){
|
|
|
|
|
|
|
+ approveFn(row) {
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ if (this.type == 'approvalPending') {
|
|
|
|
|
+ if (row.reportType == '1') {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/dailyApproval",
|
|
|
|
|
- query: {reportId: row.id,}
|
|
|
|
|
- })
|
|
|
|
|
- }else if(row.reportType=="2"){
|
|
|
|
|
|
|
+ path: '/dailyApproval',
|
|
|
|
|
+ query: { reportId: row.id },
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (row.reportType == '2') {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/weeklyApproval",
|
|
|
|
|
- query: {reportId: row.id,}
|
|
|
|
|
- })
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+ path: '/weeklyApproval',
|
|
|
|
|
+ query: { reportId: row.id },
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/doubleWeeklyApproval",
|
|
|
|
|
- query: {reportId: row.id,}
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ path: '/doubleWeeklyApproval',
|
|
|
|
|
+ query: { reportId: row.id },
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- }else{
|
|
|
|
|
- if(row.reportType=="1"){
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (row.reportType == '1') {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/dailyDetails",
|
|
|
|
|
- query: {reportId: row.id,}
|
|
|
|
|
- })
|
|
|
|
|
- }else if(row.reportType=="2"){
|
|
|
|
|
|
|
+ path: '/dailyDetails',
|
|
|
|
|
+ query: { reportId: row.id },
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (row.reportType == '2') {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/weeklyApprovalDetils",
|
|
|
|
|
- query: {reportId: row.id,}
|
|
|
|
|
- })
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+ path: '/weeklyApprovalDetils',
|
|
|
|
|
+ query: { reportId: row.id },
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
|
- path: "/doubleWeeklyDetils",
|
|
|
|
|
- query: {reportId: row.id,}
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ path: '/doubleWeeklyDetils',
|
|
|
|
|
+ query: { reportId: row.id },
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
tabChange() {
|
|
tabChange() {
|
|
|
this.disabled = true;
|
|
this.disabled = true;
|
|
|
- this.list=[];
|
|
|
|
|
- this.pageNum=1
|
|
|
|
|
- this.approveList()
|
|
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.pageNum = 1;
|
|
|
|
|
+ this.approveList();
|
|
|
},
|
|
},
|
|
|
approveList() {
|
|
approveList() {
|
|
|
let loading1 = this.$toast.loading({
|
|
let loading1 = this.$toast.loading({
|
|
@@ -171,35 +187,36 @@ export default {
|
|
|
this.list = [];
|
|
this.list = [];
|
|
|
this.refreshing = false;
|
|
this.refreshing = false;
|
|
|
}
|
|
}
|
|
|
- approveList({type: this.type, pageNum:this.pageNum, pageSize:this.pageSize,}).then(res => {
|
|
|
|
|
- loading1.clear()
|
|
|
|
|
- this.disabled = false;
|
|
|
|
|
- this.loading = false;
|
|
|
|
|
- if(this.pageNum==1){
|
|
|
|
|
- this.list=[];
|
|
|
|
|
- this.refreshing =false;
|
|
|
|
|
- }
|
|
|
|
|
- this.list = this.list.concat(res.data)
|
|
|
|
|
- if(this.list.length >=res.total) {
|
|
|
|
|
- this.finished = true;
|
|
|
|
|
- }else{
|
|
|
|
|
- this.finished = false;
|
|
|
|
|
|
|
+ approveList({ type: this.type, pageNum: this.pageNum, pageSize: this.pageSize }).then(
|
|
|
|
|
+ (res) => {
|
|
|
|
|
+ loading1.clear();
|
|
|
|
|
+ this.disabled = false;
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ if (this.pageNum == 1) {
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.refreshing = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.list = this.list.concat(res.data);
|
|
|
|
|
+ if (this.list.length >= res.total) {
|
|
|
|
|
+ this.finished = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.finished = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.pageNum = this.pageNum + 1;
|
|
|
}
|
|
}
|
|
|
- this.pageNum=this.pageNum+1
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
onClickLeft() {
|
|
onClickLeft() {
|
|
|
- this.$router.push("/home")
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ this.$router.push('/home');
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
<style>
|
|
<style>
|
|
|
.bgcolor {
|
|
.bgcolor {
|
|
|
background-color: #f5f5f5;
|
|
background-color: #f5f5f5;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
.cardContent {
|
|
.cardContent {
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
}
|
|
}
|
|
@@ -219,7 +236,7 @@ export default {
|
|
|
|
|
|
|
|
.cardContent .title p {
|
|
.cardContent .title p {
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
- margin: 0
|
|
|
|
|
|
|
+ margin: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.cardContent .title .textLeft {
|
|
.cardContent .title .textLeft {
|
|
@@ -241,10 +258,14 @@ export default {
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
}
|
|
}
|
|
|
-.weekList{
|
|
|
|
|
- border-radius:0;
|
|
|
|
|
|
|
+.weekList {
|
|
|
|
|
+ border-radius: 0;
|
|
|
|
|
+}
|
|
|
|
|
+.weekList .van-cell {
|
|
|
|
|
+ border-radius: 6px;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+}
|
|
|
|
|
+.weekList .cardContent .title {
|
|
|
|
|
+ line-height: 32px;
|
|
|
}
|
|
}
|
|
|
-.weekList .van-cell{border-radius: 6px;
|
|
|
|
|
- overflow: hidden;}
|
|
|
|
|
-.weekList .cardContent .title{line-height: 32px}
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|