初始化
This commit is contained in:
185
pages/classMeeting/addClassMeeting.vue
Normal file
185
pages/classMeeting/addClassMeeting.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 班会标题 -->
|
||||
<view class="form-item">
|
||||
<text class="lable">班会标题</text>
|
||||
<input v-model="title" class="uni-input" focus placeholder="请输入班会标题" />
|
||||
</view>
|
||||
<!-- 班会班级 -->
|
||||
<view class="form-text">
|
||||
<text class="lable">班会班级</text>
|
||||
<view class="txt">
|
||||
<uni-data-picker :localdata="ClassNameList" :map="{text:'label',value:'value'}" popup-title="请选择班级" @change="onchange" @nodeclick="onnodeclick"></uni-data-picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 班会总结 -->
|
||||
<view class="form-text">
|
||||
<text class="lable">班会总结</text>
|
||||
<view class="txt">
|
||||
<uni-forms-item>
|
||||
<uni-easyinput type="textarea" v-model="classcontent" maxlength="500" placeholder="请输入内容" />
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="lable timelable">班会时间</text>
|
||||
<picker mode="date" :value="startDate" @change="bindDateChange">
|
||||
<view class="uni-input">{{startDate}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="file">
|
||||
<uni-file-picker v-model="fileValue" fileMediatype="all" mode="grid" @select="select" @progress="progress"
|
||||
@success="success" @fail="fail" file-extname='doc,xls,ppt,txt,pdf' title="" />
|
||||
</view>
|
||||
<!-- 提示 -->
|
||||
<view class="hint">
|
||||
<text>请上传 大小不超过是</text>
|
||||
<text style="color: red;">5MB</text>
|
||||
<text>格式为</text>
|
||||
<text style="color: red;">doc/xls/ppt/txt/pdf</text>
|
||||
<text>的文件</text>
|
||||
</view>
|
||||
<!-- 备注 -->
|
||||
<view class="form-item">
|
||||
<text class="lable">备注</text>
|
||||
<input v-model="remark" class="uni-input" focus placeholder="请输入内容" />
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="bottom-container">
|
||||
<button @click="doApply">提交</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
ClassName
|
||||
} from "@/api/classmetting/classmeting.js"
|
||||
export default {
|
||||
data() {
|
||||
const currentDate = this.getDate({
|
||||
format: true
|
||||
})
|
||||
return {
|
||||
title: "", // 班会标题
|
||||
date: currentDate, //当前选择的时间
|
||||
classcontent: "", //班会内容
|
||||
fileValue: [], //选取文件数组
|
||||
remark: '', //备注
|
||||
ClassNameList: [], //班级名称
|
||||
institute: [], //学院
|
||||
choose_star: "",//选中班级的value
|
||||
startDate: this.getDate()
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getClassName()
|
||||
},
|
||||
methods: {
|
||||
//获取班级信息
|
||||
getClassName() {
|
||||
ClassName().then(res => {
|
||||
this.ClassNameList = res.data
|
||||
})
|
||||
},
|
||||
onchange(e) {
|
||||
const value1 = e.detail.value
|
||||
console.log(value1)
|
||||
},
|
||||
onnodeclick(node) {
|
||||
},
|
||||
getDate(type) {
|
||||
const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
if (type === 'start') {
|
||||
year = year - 60;
|
||||
} else if (type === 'end') {
|
||||
year = year + 2;
|
||||
}
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
bindDateChange: function(e) {
|
||||
this.startDate = e.detail.value;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 10rpx;
|
||||
position: relative;
|
||||
}
|
||||
.form-item {
|
||||
width: 95%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ededee;
|
||||
}
|
||||
.hint {
|
||||
margin-bottom: 100rpx;
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
}
|
||||
|
||||
.file {
|
||||
width: 95%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 100rpx 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.form-text {
|
||||
width: 95%;
|
||||
margin-bottom: 20rpx;
|
||||
border-bottom: 1px solid #ededee;
|
||||
}
|
||||
|
||||
.txt {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.class{
|
||||
|
||||
}
|
||||
.lable {
|
||||
|
||||
text-align: right;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.select {
|
||||
color: #888889;
|
||||
}
|
||||
.uni-input {
|
||||
/* width: 23%; */
|
||||
color: #888889;
|
||||
text-align: right;
|
||||
}
|
||||
.bottom-container {
|
||||
position: fixed;
|
||||
width: 80%;
|
||||
bottom: 60rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
button {
|
||||
width: 90%;
|
||||
background-color: #3388CC;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
245
pages/classMeeting/classMaterials.vue
Normal file
245
pages/classMeeting/classMaterials.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="materials">
|
||||
<!-- 班会主题 -->
|
||||
<view class="title">
|
||||
<text>班会主题:{{mettingList.crCmTitle}}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text>班会名称:{{mettingList.className}}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text>辅导员:{{mettingList.crTeacherName}}</text>
|
||||
</view>
|
||||
<!-- 班会主题内容 -->
|
||||
<view class="content">
|
||||
<text>班会总结:</text>
|
||||
<text v-html="mettingList.crContent"></text>
|
||||
<text></text>
|
||||
</view>
|
||||
<!-- 班会活动要求 -->
|
||||
<view class="demand">
|
||||
<text>班会时间:{{mettingList.crTime}}</text>
|
||||
</view>
|
||||
<!-- 班会性质 -->
|
||||
<view class="nature">
|
||||
<text>班会地址:{{(mettingList.crAddr)}}</text>
|
||||
<text></text>
|
||||
</view>
|
||||
<!-- 备注 -->
|
||||
<view class="remark">
|
||||
<text>备注:{{mettingList.remark}}</text>
|
||||
<text></text>
|
||||
</view>
|
||||
<!-- 佐证材料 -->
|
||||
<view class="evidence">
|
||||
<text>佐证材料</text>
|
||||
</view>
|
||||
<!-- 提示 -->
|
||||
<view class="hint">
|
||||
<text>请上传 大小不超过是</text>
|
||||
<text style="color: red;">5MB</text>
|
||||
<text>格式为</text>
|
||||
<text style="color: red;">doc/xls/ppt/txt/pdf</text>
|
||||
<text>的文件</text>
|
||||
</view>
|
||||
<!-- 上传图片 -->
|
||||
<uni-file-picker v-model="fileValue" fileMediatype="all" mode="grid" @select="select" @progress="progress"
|
||||
@success="success" @fail="fail" file-extname='doc,xls,ppt,txt,pdf' title="" />
|
||||
<!-- 按钮 -->
|
||||
<view class="bottom-container">
|
||||
<button @click="onSubmit()">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
classMettingDetail,
|
||||
editClassMetting,
|
||||
uploadFiles
|
||||
} from "@/api/classmetting/classmeting.js";
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
mettingList: {},
|
||||
fileValue: [],
|
||||
resPath: [],
|
||||
resName: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
const id = this.$route.query.id;
|
||||
this.getclassMettingDetail(id);
|
||||
},
|
||||
methods: {
|
||||
// 获取上传状态
|
||||
select(e) {
|
||||
console.log('选择文件:', e)
|
||||
console.log(e.tempFiles[0].name)
|
||||
console.log(e.tempFilePaths)
|
||||
},
|
||||
// 获取上传进度
|
||||
progress(e) {
|
||||
console.log('上传进度:', e)
|
||||
},
|
||||
|
||||
// 上传成功
|
||||
success(e) {
|
||||
console.log('上传成功')
|
||||
this.resPath = e.tempFilePaths
|
||||
this.resName = e.tempFiles[0].name
|
||||
},
|
||||
|
||||
// 上传失败
|
||||
fail(e) {
|
||||
console.log('上传失败:', e)
|
||||
},
|
||||
getclassMettingDetail(id) {
|
||||
classMettingDetail(id).then(res => {
|
||||
console.log(res);
|
||||
this.mettingList = res.data;
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
let data = {
|
||||
resPath: this.resPath,
|
||||
resName: this.resName
|
||||
};
|
||||
uploadFiles(data).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "error"
|
||||
})
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.materials {
|
||||
padding: 50rpx 30rpx;
|
||||
background-color: #F6F6F6;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
// overflow-y: auto;
|
||||
.title {
|
||||
margin-bottom: 70rpx;
|
||||
|
||||
text {
|
||||
font-weight: bold;
|
||||
font-size: 37rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
|
||||
margin-bottom: 80rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
flex: 1;
|
||||
color: #8a8a8a;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.demand {
|
||||
margin-bottom: 100rpx;
|
||||
display: flex;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
flex: 1;
|
||||
color: #8a8a8a;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.nature {
|
||||
display: flex;
|
||||
margin-bottom: 50rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
flex: 1;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
}
|
||||
|
||||
.attachment {
|
||||
margin-bottom: 100rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
color: #8a8a8a;
|
||||
}
|
||||
}
|
||||
|
||||
.remark {
|
||||
margin-bottom: 60rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
color: #8a8a8a;
|
||||
}
|
||||
}
|
||||
|
||||
.evidence {
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.hint {
|
||||
margin-bottom: 50rpx;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #8a8a8a;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-container {
|
||||
position: fixed;
|
||||
width: 80%;
|
||||
bottom: 60rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
button {
|
||||
background-color: #3388CC;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.file-picker__box-content {
|
||||
background-color: #ffffff;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
119
pages/classMeeting/classMeeting.vue
Normal file
119
pages/classMeeting/classMeeting.vue
Normal file
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<view class="classmeeting">
|
||||
<view class="title" @click="goMeetingList(item.cmNo)" v-for="(item,index) in mettingList" :key="index">
|
||||
<text>主题班会: {{item.cmTitle}}</text>
|
||||
<text>时间: {{item.cmStart}}</text>
|
||||
<view class="status primary-status" v-if="item.status==0">
|
||||
代办
|
||||
</view>
|
||||
<view class="status " v-else-if="item.status==1">
|
||||
待办
|
||||
</view>
|
||||
<view class="status error-status" v-else>
|
||||
停用
|
||||
</view>
|
||||
<view class="images">
|
||||
<image :src="item.crContent" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
classMettingList
|
||||
} from "@/api/classmetting/classmeting.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mettingList: []
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getclassMettingList()
|
||||
},
|
||||
methods: {
|
||||
getclassMettingList() {
|
||||
classMettingList().then(res => {
|
||||
console.log(res);
|
||||
this.mettingList = res.rows;
|
||||
})
|
||||
},
|
||||
goMeetingList(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/classMeeting/classMeetingList?id='+id
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.classmeeting {
|
||||
padding: 60rpx 30rpx;
|
||||
background-color: #F6F6F6;
|
||||
height: 100vh;
|
||||
|
||||
.title {
|
||||
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
height: 190rpx;
|
||||
|
||||
text {
|
||||
// margin-top: 40rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
color: #B2B2B2;
|
||||
}
|
||||
|
||||
.status {
|
||||
position: absolute;
|
||||
bottom: 70rpx;
|
||||
right: 20rpx;
|
||||
border: 1px solid;
|
||||
background-color: #F6F6F6;
|
||||
color: #00aaff;
|
||||
width: 120rpx;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
padding: 5px 0;
|
||||
border-radius: 7px;
|
||||
//css3属性 deg 角度
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.primary-status {
|
||||
color: #00ff00;
|
||||
}
|
||||
|
||||
.error-status {
|
||||
color: #ff0000;
|
||||
}
|
||||
.images{
|
||||
image{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
98
pages/classMeeting/classMeetingList.vue
Normal file
98
pages/classMeeting/classMeetingList.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<view class="classmeeting">
|
||||
<view class="title" @click="goMaterials(item.crId)" v-for="(item,index) in mettingList" :key="index">
|
||||
<text>主题班会: {{item.crCmTitle}}</text>
|
||||
<text>时间: {{item.crTime}}</text>
|
||||
</view>
|
||||
<view class="bottom-container">
|
||||
<button @click="goAddClassMeeting">新增班级材料</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
classMettingContent
|
||||
} from "@/api/classmetting/classmeting.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mettingList: [],
|
||||
pageId: null
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.pageId = this.$route.query.id;
|
||||
this.getclassMettingContent(this.pageId)
|
||||
},
|
||||
methods: {
|
||||
getclassMettingContent(id) {
|
||||
classMettingContent(id).then(res => {
|
||||
if (res.rows) {
|
||||
this.mettingList = res.rows.filter(item => item.crCmNo === this.pageId);
|
||||
}
|
||||
})
|
||||
},
|
||||
goMaterials(id) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/classMeeting/classMaterials?id=" + id
|
||||
})
|
||||
},
|
||||
goAddClassMeeting() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/classMeeting/addClassMeeting"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.classmeeting {
|
||||
padding: 60rpx 30rpx;
|
||||
background-color: #F6F6F6;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
height: 190rpx;
|
||||
text {
|
||||
// margin-top: 40rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
color: #B2B2B2;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.bottom-container {
|
||||
position: fixed;
|
||||
width: 80%;
|
||||
bottom: 60rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
button{
|
||||
background-color: #3388CC;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user