移动端V1.0
This commit is contained in:
524
pages/workStudy/add.vue
Normal file
524
pages/workStudy/add.vue
Normal file
@@ -0,0 +1,524 @@
|
||||
<template>
|
||||
<view class="work-add">
|
||||
<view class="form-item tip">
|
||||
<text>注意:每周不超过8小时,每月不超过40小时。</text>
|
||||
<text>本月已填报{{ monthTime }}小时(不含拒绝)</text>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text>*</text> 工作岗位</label>
|
||||
<input @focus="onFocus" type="text" placeholder="请选择岗位" v-model="stuPostName" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text>*</text> 工作日期</label>
|
||||
<picker @change="onChangeTime" mode="date" :value="formData.workDate">
|
||||
<view class="uni-input">
|
||||
<text class="val">{{formData.workDate==''?'请选择日期':formData.workDate}}</text>
|
||||
<uni-icons type="calendar" size="25" color="#202020"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text>*</text> 工作时长(单位:小时)</label>
|
||||
<input type="number" placeholder="请输入" v-model="formData.workTime" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text>*</text>主要工作</label>
|
||||
<textarea type="text" placeholder="请输入" v-model="formData.mainWork" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<label><text>*</text>工作附件</label>
|
||||
<view class="upload-img" v-if="tempImgs.length==0" @tap="uploadImg">
|
||||
<view class="add">
|
||||
+ 上传
|
||||
</view>
|
||||
<view class="tip">
|
||||
要求:格式为png/jpg/jpeg的文件 大小不超过0.5M
|
||||
</view>
|
||||
<view class="img-list">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="img-list" v-else>
|
||||
<view class="imgs">
|
||||
<view class="img" v-for="(img,index) in tempImgs">
|
||||
<image @tap="previewImg(tempImgs)" :src="img.path" mode="aspectFill"></image>
|
||||
<text class="remove" @tap="onRemoveImg(index,img.path)">X</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="tempImgs.length<3" class="btn" @tap="uploadImg">
|
||||
+ 添加
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button v-if="monthTime>40" :disabled="true">本月填报已超40小时</button>
|
||||
<button :disabled="isSubmitting" @click="onSubmit" v-else>提交</button>
|
||||
</view>
|
||||
<uni-popup class="popup return-dialog" ref="postDialog" type="dialog" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="title">
|
||||
请选择工作岗位
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="list" v-if="postList.length>0">
|
||||
<view class="row">
|
||||
<text>序号</text>
|
||||
<text>部门</text>
|
||||
<text>岗位名称</text>
|
||||
</view>
|
||||
<view :class="index==postIndex?'active':''" class="row" @tap="postChange(index,item)"
|
||||
v-for="(item,index) in postList" :key="item.id">
|
||||
<text>{{index+1}}</text>
|
||||
<text>{{item.stuDept}}</text>
|
||||
<text>{{item.postName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else style="text-align: center;margin-top:25px;">
|
||||
暂无岗位
|
||||
</view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button type="default" @tap="onCancel">取消</button>
|
||||
<button type="primary" @tap="onConfirm">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
uploadImg,
|
||||
previewImg,
|
||||
removeImg
|
||||
} from "@/utils/uploadImg.js"
|
||||
import uploadFile from "@/plugins/upload.js";
|
||||
import {
|
||||
checkPic
|
||||
} from "@/utils/checkPic.js";
|
||||
import {
|
||||
baseUrl
|
||||
} from "@/config.js";
|
||||
import {
|
||||
doApply,
|
||||
computeTimeByStuNo,
|
||||
listOwnCanSelectPost
|
||||
} from '@/api/workStudy/workStudy'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isSubmitting: false,
|
||||
tempImgs: [],
|
||||
stuPostName: "",
|
||||
formData: {
|
||||
stuPostId: "",
|
||||
workDate: "",
|
||||
workTime: "",
|
||||
mainWork: "",
|
||||
workMaterial: "",
|
||||
},
|
||||
monthTime: 0,
|
||||
postList: [], //岗位列表
|
||||
postIndex: -1, //岗位索引
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.computeTimeByStuNo()
|
||||
},
|
||||
methods: {
|
||||
onFocus() {
|
||||
this.$refs.postDialog.open();
|
||||
// let selectParams.params = { fuzzyQueryCode: true };
|
||||
//{reasonable:true,params[fuzzyQueryCode]:true}
|
||||
let query = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
reasonable: true,
|
||||
params: {
|
||||
fuzzyQueryCode: true
|
||||
}
|
||||
}
|
||||
listOwnCanSelectPost(query).then(res => {
|
||||
this.postList = res.rows;
|
||||
})
|
||||
},
|
||||
postChange(index, item) {
|
||||
this.postIndex = index;
|
||||
this.tempItem = item;
|
||||
},
|
||||
onConfirm() {
|
||||
if (this.tempItem) {
|
||||
this.formData.stuPostId = this.tempItem.id;
|
||||
this.stuPostName = this.tempItem.postName;
|
||||
}
|
||||
this.$refs.postDialog.close();
|
||||
},
|
||||
onCancel() {
|
||||
this.$refs.postDialog.close();
|
||||
},
|
||||
dialogConfirm() {
|
||||
this.$refs.postDialog.close();
|
||||
},
|
||||
onChangeTime(e) {
|
||||
this.formData.workDate = e.detail.value;
|
||||
},
|
||||
async computeTimeByStuNo() {
|
||||
let res = await computeTimeByStuNo();
|
||||
if (res.code == 200) {
|
||||
if (res.data) {
|
||||
this.monthTime = res.data.workTime;
|
||||
}
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
const requiredFields = [
|
||||
'stuPostId',
|
||||
'workDate',
|
||||
'workTime',
|
||||
'mainWork',
|
||||
'workMaterial',
|
||||
];
|
||||
const emptyField = requiredFields.find(field => this.formData[field] === "");
|
||||
if (emptyField) {
|
||||
uni.showToast({
|
||||
title: `请填写完 * 必填内容`,
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.isSubmitting = true; // 设置为正在提交
|
||||
uni.showLoading({
|
||||
title: "正在提交",
|
||||
success: async () => {
|
||||
try {
|
||||
let res = await doApply(this.formData);
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: "提交成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length > 0) {
|
||||
const prevPage = pages[pages.length -
|
||||
2]
|
||||
console.log(prevPage);
|
||||
if (prevPage && typeof prevPage
|
||||
.getList ===
|
||||
'function') {
|
||||
prevPage.queryParams.pageNum = 1;
|
||||
prevPage.getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
} catch (error) {} finally {
|
||||
this.isSubmitting = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
uploadImg() {
|
||||
uni.chooseImage({
|
||||
count: 3,
|
||||
success: async (img) => {
|
||||
let bool = await checkPic(img.tempFiles[0]);
|
||||
if (bool) {
|
||||
uploadFile('/common/upload', img.tempFilePaths[0]).then((res) => {
|
||||
if (this.formData.workMaterial !== "") {
|
||||
this.formData.workMaterial = this.formData.workMaterial + "," +
|
||||
JSON.parse(res)
|
||||
.fileName;
|
||||
} else {
|
||||
this.formData.workMaterial = JSON.parse(res).fileName;
|
||||
}
|
||||
this.tempImgs.push({
|
||||
path: baseUrl + JSON.parse(res).fileName
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
onRemoveImg(index, path) {
|
||||
this.tempImgs.splice(index, 1);
|
||||
let newImgs = this.tempImgs.filter(fileName => fileName.path !== path);
|
||||
newImgs = newImgs.map(img => img.path.replace(baseUrl, ''))
|
||||
newImgs = newImgs.join(",");
|
||||
this.formData.workMaterial = newImgs;
|
||||
},
|
||||
previewImg(imgs) {
|
||||
previewImg(imgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.work-add {
|
||||
background-color: #F5F5F7;
|
||||
padding: 10px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 40rpx;
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
&.tip {
|
||||
justify-content: center;
|
||||
|
||||
text:first-child {
|
||||
color: red;
|
||||
}
|
||||
|
||||
text:last-child {
|
||||
margin-top: 10rpx;
|
||||
color: #FFBA00;
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-bottom: 20rpx;
|
||||
display: inline-block;
|
||||
|
||||
text {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: 200rpx;
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #E1E1E1;
|
||||
border-radius: 10rpx;
|
||||
height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
picker {
|
||||
border: 1px solid #E1E1E1;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.uni-input {
|
||||
display: flex;
|
||||
color: #797979;
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.upload-img {
|
||||
border: 1px solid #E1E1E1;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.tip {
|
||||
margin-top: 15rpx;
|
||||
color: #7a7a7a;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img-list {
|
||||
border: 1px solid #D8D8D8;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.imgs {
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 170rpx;
|
||||
margin-bottom: 15rpx;
|
||||
margin-right: 15rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.remove {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-top: 1px solid #D8D8D8;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&>.btns {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
background: white;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
|
||||
// uni-button[disabled] {
|
||||
// }
|
||||
button {
|
||||
flex: 1;
|
||||
background-color: #1890FF;
|
||||
color: white;
|
||||
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.popup {
|
||||
.popup-content {
|
||||
width: 90vw;
|
||||
max-height: 86vh;
|
||||
overflow: scroll;
|
||||
|
||||
.title {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 40rpx;
|
||||
|
||||
.list {
|
||||
.row {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
display: flex;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #0092FF;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
width: 100rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
text:nth-child(3) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
margin-top: 80rpx;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
border-radius: 0;
|
||||
border-bottom: 0;
|
||||
|
||||
&:first-child {
|
||||
background-color: transparent;
|
||||
border: 1px solid #4097FE;
|
||||
border-bottom: 0;
|
||||
color: #4097FE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.return-dialog {
|
||||
.form-item {
|
||||
label {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.list {
|
||||
height: auto;
|
||||
max-height: 200px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
|
||||
&.active {
|
||||
background-color: #0092FF;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
113
pages/workStudy/detail.vue
Normal file
113
pages/workStudy/detail.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<view class="detail">
|
||||
<view class="card">
|
||||
<view class="title">查看详细</view>
|
||||
<view class="row">
|
||||
<label>工作岗位:</label>
|
||||
<label>{{detail.postName}}</label>
|
||||
</view>
|
||||
<view class="row">
|
||||
<label>工作日期:</label>
|
||||
<label>{{detail.workDate}}</label>
|
||||
</view>
|
||||
<view class="row">
|
||||
<label>工作时长:</label>
|
||||
<label>{{detail.workTime}}</label>
|
||||
</view>
|
||||
<view class="row">
|
||||
<label>主要工作:</label>
|
||||
<label>{{detail.mainWork}}</label>
|
||||
</view>
|
||||
<view class="row">
|
||||
<label>附件:</label>
|
||||
<view class="photos">
|
||||
<image @tap="previewImg(attachment,index)" v-for="(img,index) in attachment" :src="basePath+img"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
baseUrl
|
||||
} from "@/config.js";
|
||||
import {
|
||||
previewImg
|
||||
} from "@/utils/uploadImg.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
detail: null,
|
||||
attachment: [],
|
||||
basePath: baseUrl
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.detail = JSON.parse(option.detailData);
|
||||
console.log(this.detail);
|
||||
this.attachment = this.detail.workMaterial.split(",");
|
||||
console.log(this.attachment);
|
||||
},
|
||||
methods: {
|
||||
previewImg(imgs, index) {
|
||||
let images = imgs.map(img => {
|
||||
return {
|
||||
path: baseUrl + img
|
||||
}
|
||||
})
|
||||
previewImg(images, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail {
|
||||
height: calc(100vh - 44px);
|
||||
background-color: #F5F5F7;
|
||||
padding: 20rpx 30rpx 0;
|
||||
|
||||
.card {
|
||||
margin: 30rpx 0rpx 0;
|
||||
padding: 30rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
color: #202020;
|
||||
display: inline-block;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
&>label:first-child {
|
||||
color: #9C9C9C;
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.photos {
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
image {
|
||||
margin-bottom: 10rpx;
|
||||
width: 23.5%;
|
||||
border-radius: 8rpx;
|
||||
height: 136rpx;
|
||||
|
||||
&:not(:nth-child(4n)) {
|
||||
margin-right: 2%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
287
pages/workStudy/index.vue
Normal file
287
pages/workStudy/index.vue
Normal file
@@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<scroll-view scroll-y="true" @scrolltolower="scrolltolower">
|
||||
<view class="list">
|
||||
<view class="item" @tap="toDetail(item)" v-for="item in workList" :key="item.id">
|
||||
<view class="top">
|
||||
岗位名称:{{item.postName}}
|
||||
<DictType :types="qgzx_stu_post_status" :type="item.applyStatus" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<view>设岗部门:{{item.deptName}}</view>
|
||||
<view>工作日期:{{item.workDate}}</view>
|
||||
<view>工作时长(单位:小时):{{item.workTime}}</view>
|
||||
</view>
|
||||
<view class="bottom" v-if="item.applyStatus == '0' || item.applyStatus == '1'" @tap.stop="onCancelApply(item.id)">
|
||||
<button>取消申请</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-if="workList.length==0&&topLoading==false">
|
||||
<image src="@/static/empty.png" mode="widthFix"></image>
|
||||
暂时没有数据
|
||||
</view>
|
||||
<view class="loading-more-top" v-if="topLoading">
|
||||
<uni-load-more style="padding-top: 90px;" status="loading" />
|
||||
</view>
|
||||
<view class="loading-more" v-if="loading">
|
||||
<uni-load-more status="loading" />
|
||||
</view>
|
||||
<view class="no-more" v-if="!loading&&workList.length!=0">
|
||||
到底啦~~
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="add" @tap="add">
|
||||
+
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Nav from "@/components/navs/navs.vue";
|
||||
import DictType from "@/components/dict-type/dict-type.vue";
|
||||
import DictStatus from "@/components/dict-status/dict-status.vue";
|
||||
import {
|
||||
listOwnApply as getList,
|
||||
cancelApply
|
||||
} from "@/api/workStudy/workStudy";
|
||||
import {
|
||||
getDicts,
|
||||
} from '@/api/system/dict/data.js';
|
||||
export default {
|
||||
components: {
|
||||
DictType,
|
||||
DictStatus
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
workList: [],
|
||||
loading: false,
|
||||
topLoading: true,
|
||||
rt_penalty_type: [],
|
||||
qgzx_stu_post_status: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
penaltyStatus: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getList();
|
||||
this.get_penalty_type();
|
||||
this.get_penalty_status();
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
uni.navigateTo({
|
||||
url: "./add"
|
||||
})
|
||||
},
|
||||
onCancelApply(id) {
|
||||
uni.showModal({
|
||||
title: "确定取消申请吗?",
|
||||
success: async (bool) => {
|
||||
if (bool.confirm) {
|
||||
let res = await cancelApply(id);
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title:"取消成功"
|
||||
})
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
scrolltolower() {
|
||||
if (this.queryParams.pageNum < this.totalPages) {
|
||||
this.queryParams.pageNum++;
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.getList()
|
||||
}, 1000)
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
toDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: "./detail?detailData="+JSON.stringify(item)
|
||||
})
|
||||
},
|
||||
async getList() {
|
||||
console.log(this.queryParams.pageNum);
|
||||
let res = await getList(this.queryParams);
|
||||
if (res.code == 200) {
|
||||
this.loading = false;
|
||||
if (this.queryParams.pageNum == 1) {
|
||||
this.workList = res.rows; // 如果是第一页,直接显示新数据
|
||||
} else {
|
||||
this.workList = this.workList.concat(res.rows); // 否则追加新数据到列表中
|
||||
}
|
||||
this.totalPages = Math.ceil(res.total / this.queryParams.pageSize);
|
||||
this.topLoading = false;
|
||||
|
||||
}
|
||||
},
|
||||
async get_penalty_type() {
|
||||
let res = await getDicts('rt_penalty_type');
|
||||
this.rt_penalty_type = res.data;
|
||||
},
|
||||
async get_penalty_status() {
|
||||
let res = await getDicts('qgzx_stu_post_status');
|
||||
this.qgzx_stu_post_status = res.data;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.index {
|
||||
background-color: #F5F5F7;
|
||||
|
||||
scroll-view {
|
||||
height: calc(100vh - 10px);
|
||||
|
||||
.no-more {
|
||||
text-align: center;
|
||||
color: gray;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 200rpx;
|
||||
color: #9E9E9E;
|
||||
font-size: 36rpx;
|
||||
|
||||
image {
|
||||
width: 250rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 20rpx 40rpx 15rpx 40rpx;
|
||||
|
||||
.item {
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 40rpx 40rpx 80rpx;
|
||||
border-radius: 16px;
|
||||
border-bottom-right-radius: 0;
|
||||
position: relative;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #F5F5F7;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.uni-icons {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 20rpx;
|
||||
|
||||
.level {
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
&>view:not(:last-child) {
|
||||
margin-bottom: 15rpx;
|
||||
|
||||
.progress {
|
||||
color: #1890FF;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
color: white;
|
||||
|
||||
.status-text {
|
||||
position: absolute;
|
||||
bottom: 15px;
|
||||
right: 8%;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
|
||||
.triangle-right {
|
||||
width: 0;
|
||||
height: 0;
|
||||
/* 上边框设置为透明 */
|
||||
border-left: 120px solid transparent;
|
||||
}
|
||||
|
||||
&.submit {
|
||||
color: #202020;
|
||||
|
||||
.triangle-right {
|
||||
/* 左边框设置为与文本相同的颜色 */
|
||||
border-bottom: 100px solid #D7D7D7;
|
||||
}
|
||||
}
|
||||
|
||||
&.agree {
|
||||
.triangle-right {
|
||||
/* 左边框设置为与文本相同的颜色 */
|
||||
border-bottom: 100px solid #2FB15B;
|
||||
}
|
||||
}
|
||||
|
||||
&.refuse {
|
||||
.triangle-right {
|
||||
/* 左边框设置为与文本相同的颜色 */
|
||||
border-bottom: 100px solid #FF759F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
|
||||
button {
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
margin-right: 10px;
|
||||
padding: 0px 10px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
font-size: 28rpx;
|
||||
width: 160rpx;
|
||||
border: 1px solid #007aff;
|
||||
color: #007aff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.add {
|
||||
background-color: #1890FF;
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 60rpx;
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
right: 25px;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user