Commit b125b04e authored by 罗超's avatar 罗超
parents f8fa4df4 2f14e283
...@@ -47,13 +47,14 @@ module.exports = function (ctx) { ...@@ -47,13 +47,14 @@ module.exports = function (ctx) {
vueRouterMode: 'hash', // available values: 'hash', 'history' vueRouterMode: 'hash', // available values: 'hash', 'history'
env: ctx.dev ? { env: ctx.dev ? {
API: 'http://192.168.20.51:8088/api', API: 'https://localhost:5001/api',
API_ZC:'http://192.168.20.9:8087/api', // API: 'http://192.168.20.51:8088/api',
API_SK:'ws:192.168.20.214:' API_ZC: 'http://192.168.20.9:8087/api',
API_SK: 'ws:192.168.20.214:'
} : { } : {
API: 'https://eduapi.oytour.com/api', API: 'https://eduapi.oytour.com/api',
API_ZC:'http://propertyedu.oytour.com/api', API_ZC: 'http://propertyedu.oytour.com/api',
API_SK:'ws://47.96.23.199:' API_SK: 'ws://47.96.23.199:'
}, },
// transpile: false, // transpile: false,
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/font_2077629_8vzffiv0anf.css"); @import url("//at.alicdn.com/t/font_2077629_21slbfvfeud.css");
.q-scrollarea__thumb { .q-scrollarea__thumb {
z-index: 999999 !important; z-index: 999999 !important;
} }
......
...@@ -390,3 +390,31 @@ export function EduDownLoad(cmd, msg, fileName, callBack) { ...@@ -390,3 +390,31 @@ export function EduDownLoad(cmd, msg, fileName, callBack) {
} }
}) })
} }
/**
* 上传文件 企微写死阿里云
*/
export function wechatUploadSelfFile(path, file, callback, configObj) {
//用户登录缓存
//配置写死的 阿里云
var uploadConfig = {
Region:"oss-cn-chengdu",
SecretId:"LTAIwE7l9dImZSa3",
SecretKey:"j47Ajn0d0WzUCIX8Biyj3P2r8QDltI",
Bucket: "vt-im-bucket"
};
//获取文件扩展名
var index = file.name.lastIndexOf(".");
var suffix = file.name.substr(index);
var timestamp1 = Date.parse(new Date()) + "_" + (Math.ceil(Math.random() * 1000));
let str = '/Test';
var newPath = "/EduSystem" + str + '/Upload/' + path;
var uploadLoadding = Loading;
uploadLoadding.show({
message: '正在上传文件,请稍后...'
})
if (uploadConfig) {
newPath += "/" + timestamp1 + "" + suffix;
UploadFileToALi(uploadConfig, newPath, file, uploadLoadding, callback);
}
}
\ No newline at end of file
...@@ -80,3 +80,100 @@ export function SetSynvEduEmployee(data) { ...@@ -80,3 +80,100 @@ export function SetSynvEduEmployee(data) {
data data
}) })
} }
/**
* 素材管理 获取素材类型枚举列表
*
*/
export function getMediumTypeEnumList(data) {
return request({
url: '/QYWeChat/GetMediumTypeEnumList',
method: 'post',
data
})
}
/**
* 素材管理 素材分组列表
*
*/
export function getWeChatMediumGroupList(data) {
return request({
url: '/QYWeChat/GetWeChatMediumGroupList',
method: 'post',
data
})
}
/**
* 素材管理 获取素材分页列表
*
*/
export function getWeChatMediumPageList(data) {
return request({
url: '/QYWeChat/GetWeChatMediumPageList',
method: 'post',
data
})
}
/**
* 素材管理 新增修改素材
*
*/
export function setWeChatMediumInfo(data) {
return request({
url: '/QYWeChat/SetWeChatMediumInfo',
method: 'post',
data
})
}
/**
* 素材管理 删除素材
*
*/
export function delWecharMediumInfo(data) {
return request({
url: '/QYWeChat/DelWecharMediumInfo',
method: 'post',
data
})
}
/**
* 素材管理 素材移动
*
*/
export function setWecharMediumMore(data) {
return request({
url: '/QYWeChat/SetWecharMediumMore',
method: 'post',
data
})
}
/**
* 获取欢迎语分页列表
*
*/
export function getWeChatWelcomesPageList(data) {
return request({
url: '/QYWeChat/GetWeChatWelcomesPageList',
method: 'post',
data
})
}
/**
* 新增修改欢迎语
*
*/
export function setWeChatWelcomesInfo(data) {
return request({
url: '/QYWeChat/SetWeChatWelcomesInfo',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -118,3 +118,39 @@ export function saveAuditMan(data) { ...@@ -118,3 +118,39 @@ export function saveAuditMan(data) {
data data
}) })
} }
/**
* 获取试卷分页列表
* @param {JSON参数} data
*/
export function GetPaperPage(data) {
return request({
url: '/Exam/GetPaperPage',
method: 'post',
data
})
}
/**
* 根据编号获取试卷题目
* @param {JSON参数} data
*/
export function GetPaper(data) {
return request({
url: '/Exam/GetPaper',
method: 'post',
data
})
}
/**
* 保存试卷信息
* @param {JSON参数} data
*/
export function savePaperInfo(data) {
return request({
url: '/Exam/SetPaper',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
<q-select filled option-value="TId" option-label="TeacherName" class="q-pr-lg" v-model="statusMsg.Teacher_Id" <q-select filled option-value="TId" option-label="TeacherName" class="q-pr-lg" v-model="statusMsg.Teacher_Id"
:options="TeacherList" emit-value map-options label="带班老师" /> :options="TeacherList" emit-value map-options label="带班老师" />
</div> </div>
<div class="col-12" v-if="setingObj.ClassRoomId==0&&statusMsg.ClassStatus==2">
<q-select filled stack-label option-value="RoomId" option-label="RoomName" v-model="statusMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" :dense="false" class="col-6 q-pb-lg" emit-value
map-options />
</div>
</div> </div>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -33,7 +38,8 @@ ...@@ -33,7 +38,8 @@
saveClassStatus, //修改班级状态 saveClassStatus, //修改班级状态
} from '../../api/course/class' } from '../../api/course/class'
import { import {
getTeacherDropDownList getTeacherDropDownList,
queryClassRoomList,
} from '../../api/school/index'; } from '../../api/school/index';
export default { export default {
...@@ -50,10 +56,12 @@ ...@@ -50,10 +56,12 @@
statusMsg: { statusMsg: {
ClassId: 0, ClassId: 0,
ClassStatus: 0, ClassStatus: 0,
Teacher_Id: 0 Teacher_Id: 0,
ClassRoomId: 0
}, },
classStatusList: [], classStatusList: [],
TeacherList: [], TeacherList: [],
ClassRoomList: []
} }
}, },
created() { created() {
...@@ -68,6 +76,7 @@ ...@@ -68,6 +76,7 @@
this.getClassStatus(); this.getClassStatus();
this.GetTeacherList(); this.GetTeacherList();
this.getClassRoomList();
}, },
methods: { methods: {
//获取班级状态列表 //获取班级状态列表
...@@ -84,6 +93,18 @@ ...@@ -84,6 +93,18 @@
} }
}).catch(() => {}) }).catch(() => {})
}, },
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
this.ClassRoomList.unshift({
RoomId: 0,
RoomName: "不限"
})
}
})
},
//获取教师下拉 //获取教师下拉
GetTeacherList() { GetTeacherList() {
getTeacherDropDownList({}).then(res => { getTeacherDropDownList({}).then(res => {
...@@ -107,7 +128,17 @@ ...@@ -107,7 +128,17 @@
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请选择老师` message: `请选择上课老师`
})
return
}
}
if (this.setingObj.ClassRoomId == 0 && ClassStatus == 2) {
if (this.statusMsg.ClassRoomId == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择上课教室`
}) })
return return
} }
...@@ -133,14 +164,14 @@ ...@@ -133,14 +164,14 @@
ok: "查看名单", ok: "查看名单",
cancel: "我知道了", cancel: "我知道了",
}).onOk(() => { }).onOk(() => {
this.OpenNewUrl('/stuMan/unfinishedStudent',{ this.OpenNewUrl('/stuMan/unfinishedStudent', {
ClassId:this.statusMsg.ClassId ClassId: this.statusMsg.ClassId
}) })
}).onCancel(() => { }).onCancel(() => {
}); });
} }
if(ClassStatus==2 && res.Data){ if (ClassStatus == 2 && res.Data) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
color: 'accent', color: 'accent',
......
...@@ -110,7 +110,8 @@ ...@@ -110,7 +110,8 @@
</div> </div>
<div class="row wrap"> <div class="row wrap">
<div class="col-6"> <div class="col-6">
<q-input filled v-model="objOption.OpenTime" class="col-6 q-pr-lg q-pb-lg" mask="date" label="开班时间"> <template v-if="objOption.ClassId>0">
<q-input filled v-model="objOption.OpenTime" class="col-6 q-pr-lg q-pb-lg" mask="date" label="开始报名时间">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
...@@ -119,6 +120,16 @@ ...@@ -119,6 +120,16 @@
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>
</template>
<template v-else>
<q-field filled class="q-pr-lg">
 <template v-slot:control>
<el-date-picker type="dates" style="width:100%" v-model="objOption.ClassDateList"
value-format="yyyy-MM-dd" placeholder="开班时间">
</el-date-picker>
</template>
</q-field>
</template>
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input filled v-model="objOption.EndOrderTime" class="col-6 q-pr-lg q-pb-lg" mask="date" label="截止报名时间"> <q-input filled v-model="objOption.EndOrderTime" class="col-6 q-pr-lg q-pb-lg" mask="date" label="截止报名时间">
...@@ -219,7 +230,8 @@ ...@@ -219,7 +230,8 @@
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input filled stack-label maxlength="6" v-model="objOption.ClassHours" :dense="false" <q-input filled stack-label maxlength="6" v-model="objOption.ClassHours" :dense="false"
class="col-6 q-pr-lg q-pb-lg" label="学习课时(课程)" @keyup.native="checkInteger(objOption,'ClassHours')" disable /> class="col-6 q-pr-lg q-pb-lg" label="学习课时(课程)" @keyup.native="checkInteger(objOption,'ClassHours')"
disable />
</div> </div>
</div> </div>
<div class="row wrap" v-if="objOption.ClassStyle==1"> <div class="row wrap" v-if="objOption.ClassStyle==1">
...@@ -428,6 +440,7 @@ ...@@ -428,6 +440,7 @@
CompleteProgress: 0, //完成进度 CompleteProgress: 0, //完成进度
ClassType: 1, //班级类型 ClassType: 1, //班级类型
ClassHourMinute: 45, //课时分钟数 ClassHourMinute: 45, //课时分钟数
ClassDateList: [], //开班时间
}, },
optionTitle: "", optionTitle: "",
saveCourseLoading: false, saveCourseLoading: false,
...@@ -496,7 +509,7 @@ ...@@ -496,7 +509,7 @@
checkedDays: [], checkedDays: [],
//默认上课时间数组 //默认上课时间数组
DefaultPlanTimeList: [], DefaultPlanTimeList: [],
BtnStr: "立即提交", BtnStr: "立即提交"
} }
}, },
created() { created() {
...@@ -571,6 +584,7 @@ ...@@ -571,6 +584,7 @@
this.objOption.InnerRemark = TempData.InnerRemark; this.objOption.InnerRemark = TempData.InnerRemark;
this.objOption.ClassType = TempData.ClassType; this.objOption.ClassType = TempData.ClassType;
this.objOption.ClassHourMinute = TempData.ClassHourMinute; this.objOption.ClassHourMinute = TempData.ClassHourMinute;
this.objOption.ClassDateList = TempData.ClassDateList;
//默认时间 //默认时间
if (TempData.DefaultTimeList && TempData.DefaultTimeList.length > 0) { if (TempData.DefaultTimeList && TempData.DefaultTimeList.length > 0) {
this.DefaultPlanTimeList = TempData.DefaultTimeList; this.DefaultPlanTimeList = TempData.DefaultTimeList;
...@@ -609,7 +623,51 @@ ...@@ -609,7 +623,51 @@
saveCourse() { saveCourse() {
this.$refs.ClassName.validate(); this.$refs.ClassName.validate();
this.$refs.ClassPersion.validate(); this.$refs.ClassPersion.validate();
if (this.DefaultPlanTimeList.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择学习时段`
})
return;
} else {
for (let i = 0; i < this.DefaultPlanTimeList.length; i++) {
if (this.DefaultPlanTimeList[i].DateList.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择第${i+1}行周几`
})
return
}
for (let j = 0; j < this.DefaultPlanTimeList[i].TimeList.length; j++) {
if (this.DefaultPlanTimeList[i].TimeList[j].StartTime == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写第${i+1}行,第${j+1}个开始时间`
})
return
}
if (this.DefaultPlanTimeList[i].TimeList[j].EndTime == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写第${i+1}行,第${j+1}个结束时间`
})
return
}
if (this.DefaultPlanTimeList[i].TimeList[j].TimeHour == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写第${i+1}行,第${j+1}个的课时`
})
return
}
}
}
}
if (!this.$refs.ClassName.hasError && !this.$refs.ClassPersion.hasError) { if (!this.$refs.ClassName.hasError && !this.$refs.ClassPersion.hasError) {
if (this.objOption.IsOpenCommission == 1) { if (this.objOption.IsOpenCommission == 1) {
if (this.objOption.CommissionValue == '') { if (this.objOption.CommissionValue == '') {
...@@ -630,14 +688,37 @@ ...@@ -630,14 +688,37 @@
this.saveCourseLoading = true; this.saveCourseLoading = true;
saveClass(this.objOption).then(res => { saveClass(this.objOption).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
//有上课计划 var newClassId = res.Data.ClassId
if (res.Data && res.Data.ClassPlanList && res.Data.ClassPlanList.length > 0) { var PlanList = res.Data.ClassPlanList;
// //有上课计划
// if (res.Data && res.Data.ClassPlanList && res.Data.ClassPlanList.length > 0 && this.objOption
// .ClassDateList.length < 2) {
// this.checkPlan(newClassId, PlanList)
// } else {
// this.refreshForm();
// }
this.refreshForm();
} else {
this.$q.notify({
type: 'negative',
position: "top",
message: `操作失败!`
})
}
}).catch(() => {
this.BtnStr = "立即提交"
this.saveCourseLoading = false
})
}
},
//检查上课计划是否冲突
checkPlan(ClassId, ClassPlanList) {
this.BtnStr = "正在检查排班是否存在冲突"; this.BtnStr = "正在检查排班是否存在冲突";
var newMsg = { var newMsg = {
ClassId: res.Data.ClassId, ClassId: ClassId,
PlanList: res.Data.ClassPlanList, PlanList: ClassPlanList,
} }
var NewClassId = res.Data.ClassId; var NewClassId = ClassId;
batchSaveClassPlan(newMsg).then(res => { batchSaveClassPlan(newMsg).then(res => {
this.saveCourseLoading = false this.saveCourseLoading = false
if (res.Code == 1) { if (res.Code == 1) {
...@@ -651,19 +732,13 @@ ...@@ -651,19 +732,13 @@
}) })
this.$emit('getClassFlict', NewClassId); this.$emit('getClassFlict', NewClassId);
} else { } else {
this.$q.notify({ this.refreshForm()
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
} }
this.$emit("success")
this.closeCourseForm()
} }
}) });
} else { },
//刷新表单
refreshForm() {
this.saveCourseLoading = false this.saveCourseLoading = false
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -672,14 +747,8 @@ ...@@ -672,14 +747,8 @@
message: '数据保存成功!', message: '数据保存成功!',
position: 'top' position: 'top'
}) })
this.$emit("success") this.$emit("success");
this.closeCourseForm() this.closeCourseForm();
}
}
}).catch(() => {
this.saveCourseLoading = false
})
}
}, },
//获取课程 //获取课程
getCourseList() { getCourseList() {
...@@ -759,6 +828,7 @@ ...@@ -759,6 +828,7 @@
TimeList: [{ TimeList: [{
StartTime: "", StartTime: "",
EndTime: "", EndTime: "",
TimeHour: ''
}], }],
} }
this.DefaultPlanTimeList.push(planObj); this.DefaultPlanTimeList.push(planObj);
...@@ -783,6 +853,7 @@ ...@@ -783,6 +853,7 @@
var obj = { var obj = {
StartTime: "", StartTime: "",
EndTime: "", EndTime: "",
TimeHour: ''
} }
item.TimeList.push(obj); item.TimeList.push(obj);
}, },
......
...@@ -83,13 +83,16 @@ ...@@ -83,13 +83,16 @@
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.TeacherNewClass{
.TeacherNewClass {
display: flex; display: flex;
margin-bottom:3px; margin-bottom: 3px;
} }
.TeacherNewClass:last-child{
margin-bottom:0; .TeacherNewClass:last-child {
margin-bottom: 0;
} }
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -157,6 +160,23 @@ ...@@ -157,6 +160,23 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-AskforleaveNum="props">
<q-td auto-width :props="props" style="width:25%">
<div v-for="(item,index) in props.row.TimeList">
<span style="color:red;" :class="{'underLine':item.AskforleaveList.length>0}">
{{item.AskforleaveNum}}
<q-popup-proxy v-if="item.AskforleaveList.length>0">
<div style="min-width:360px;max-width:360px;">
<q-banner>
<q-chip dense v-for="(subItem,subindex) in item.AskforleaveList" :key="subindex">
{{subItem.GuestName}}</q-chip>
</q-banner>
</div>
</q-popup-proxy>
</span>
</div>
</q-td>
</template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
...@@ -183,8 +203,9 @@ ...@@ -183,8 +203,9 @@
<div class="TeacherContent"> <div class="TeacherContent">
<div v-for="(subItem,subIndex) in item.TimeList" class="TeacherNewClass"> <div v-for="(subItem,subIndex) in item.TimeList" class="TeacherNewClass">
<div>{{subIndex+1}}节课 {{subItem.StartTime}}-{{subItem.EndTime}}</div> <div>{{subIndex+1}}节课 {{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div style="color:green;margin:0 20px;" title="签到数">{{subItem.CheckNum}}</div> <div style="color:green;margin:0 20px;" title="签到数">签到数:{{subItem.CheckNum}}</div>
<div style="color:red;" title="缺勤数">{{subItem.NoCheckNum}}</div> <div style="color:red;margin:0 20px;" title="缺勤数">缺勤数:{{subItem.NoCheckNum}}</div>
<div style="color:red;" title="请假数">请假数:{{subItem.AskforleaveNum}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -261,10 +282,16 @@ ...@@ -261,10 +282,16 @@
label: '缺勤数', label: '缺勤数',
field: 'NoCheckNum', field: 'NoCheckNum',
align: 'left' align: 'left'
},
{
name: 'AskforleaveNum',
label: '请假数',
field: 'AskforleaveNum',
align: 'left'
} }
], ],
checkType: 1, //默认列表模式 checkType: 1, //默认列表模式
isShowBtn:true isShowBtn: true
} }
}, },
created() { created() {
...@@ -272,8 +299,8 @@ ...@@ -272,8 +299,8 @@
}, },
mounted() { mounted() {
this.TeacherId = this.setingObj.Teacher_Id; this.TeacherId = this.setingObj.Teacher_Id;
if(this.isShowMyBtn==1){ if (this.isShowMyBtn == 1) {
this.isShowBtn=false; this.isShowBtn = false;
} }
this.getRecord(); this.getRecord();
......
This diff is collapsed.
<template>
<div class="appletmaterial" style="padding: 0;margin: 0;">
<div class="page-content">
<div>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="add" label="添加小程序"
@click="goadd()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="delete" label="批量删除"
@click="pldelete()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="edit" label="修改分组"
@click="plmove()"></q-btn>
</div>
<div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;" v-if="dataList.length>0">
<q-card class="imgcard" v-for="(x,y) in dataList" :key='y'
:style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}"
@click="dataList[y].check = !dataList[y].check,$forceUpdate();">
<q-card-section>
<div
style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 5px;">
<span>{{x.UpdateTime}}</span>
<!-- <q-btn class="q-mr-md" label="编辑" size="xs" color="accent" style="margin-right: 0;" @click.stop="goedit(x)" /> -->
<i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;"
@click.stop="goedit(x)"></i>
</div>
<q-img :src="x.AppletModel && x.AppletModel.ImagePath?x.AppletModel.ImagePath:''" class="imgstyle">
<div class="absolute-bottom text-subtitle1 text-center onetext"
style="padding: 0;padding: 0 5px;font-size: 12px;">
{{x.AppletModel&& x.AppletModel.Title?x.AppletModel.Title:''}}
</div>
</q-img>
<div class="onetext" style="margin-top: 5px;">上传者:{{x.UpdateByName}}</div>
<div class="onetext" style="margin-top: 5px;">分钟:{{x.MediumGroupName}}</div>
</q-card-section>
</q-card>
<div style="width: 100%;height: 50px;line-height: 50px;text-align: center;" v-if="dataList.length==0">暂无数据</div>
</div>
<div style="width: 100%;height: 50px;line-height: 50px;text-align: center;" v-if="dataList.length==0">暂无数据</div>
</div>
<div v-if="Isadd==true">
<alladdsc :allclassifyList="allclassifyList" type='6' @editsuccess="getchildren" :editobj='editobj' @getcancel='Isadd=false'></alladdsc>
</div>
</div>
</template>
<script>
import alladdsc from './allAddSC'
export default {
name: "appletmaterial",
components: {
alladdsc,
},
props: {
dataList: {
type: Array,
default: [],
},
allclassifyList:{
type: Array,
default: [],
}
},
data() {
return {
loading: false,
Isadd: false,
editobj:null
}
},
created() {
},
methods: {
goadd() {
this.Isadd = true;
this.editobj=null
},
goedit(row){
this.editobj= {}
this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type;
this.editobj.AppletModel = JSON.parse(JSON.stringify(row.AppletModel)) ;
this.Isadd = true
},
getchildren(){
this.$emit('editsuccess')
this.Isadd = false
},
pldelete(){
this.$emit('getdelete')
},
plmove(){
this.$emit('getmove')
}
}
}
</script>
<style>
.appletmaterial .Sysuser_Date .el-input--prefix .el-input__inner {
background-color: red;
border: 0;
}
.appletmaterial .state-item {
padding: 2px 5px;
border-radius: 3px;
text-align: center;
font-size: 10px;
}
.appletmaterial .frIdlist {
padding: 3px 10px;
border-radius: 3px;
background: #EEEEEF;
align-items: center;
justify-content: center;
margin-right: 5px;
margin-bottom: 5px;
cursor: pointer;
}
.class-popover .q-pr-lg {
padding-right: 0;
margin-top: 20px;
}
.appletmaterial .el-date-editor.el-input {
width: 100%;
}
.appletmaterial .el-date-editor.el-input input {
background-color: transparent !important;
}
.appletmaterial .el-range-editor .el-range-input {
background: none;
}
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
}
.appletmaterial .el-drawer.rtl {
overflow: inherit;
}
.appletmaterial .imgcard {
width: 240px;
margin: 0 15px 15px 0
}
.appletmaterial .imgstyle {
width: 100%;
height: 120px;
border-radius: 0;
}
.appletmaterial .onetext {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 208px;
}
</style>
\ No newline at end of file
...@@ -3,146 +3,99 @@ ...@@ -3,146 +3,99 @@
<div class="page-content"> <div class="page-content">
<div> <div>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="cloud_upload" label="上传图片" <q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="cloud_upload" label="上传图片"
@click="goadd()"></q-btn> @click="goadd()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="delete" label="批量删除"
@click="pldelete()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="edit" label="修改分组"
@click="plmove()"></q-btn>
</div> </div>
<div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;"> <div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;" v-if="dataList.length>0">
<q-card class="imgcard" v-for="(x,y) in data" :key='y' <q-card class="imgcard" v-for="(x,y) in dataList" :key='y'
:style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}" :style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}"
@click="data[y].check = !data[y].check"> @click="dataList[y].check = !dataList[y].check,$forceUpdate()">
<q-card-section> <q-card-section>
<div <div
style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 5px;"> style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 5px;">
<span>{{x.UpdateTime}}</span> <span>{{x.UpdateTime}}</span>
<!-- <q-btn class="q-mr-md" label="编辑" size="xs" color="accent" style="margin-right: 0;" @click.stop="goedit(x)" /> --> <!-- <q-btn class="q-mr-md" label="编辑" size="xs" color="accent" style="margin-right: 0;" @click.stop="goedit(x)" /> -->
<i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;" @click.stop="goedit(x)"></i> <!-- <i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;" @click.stop="goedit(x)"></i> -->
</div> </div>
<q-img :src="x.Content" class="imgstyle"> <q-img :src="x.ImageModel && x.ImageModel.ImagePath?x.ImageModel.ImagePath:''" class="imgstyle">
<div class="absolute-bottom text-subtitle1 text-center onetext" <div class="absolute-bottom text-subtitle1 text-center onetext"
style="padding: 0;padding: 0 5px;font-size: 12px;"> style="padding: 0;padding: 0 5px;font-size: 12px;" >
{{x.title}} {{x.ImageModel && x.ImageModel.ImageName ?x.ImageModel.ImageName:''}}
</div> </div>
</q-img> </q-img>
<div class="onetext" style="margin-top: 5px;">上传者:{{x.CreatorName}}</div> <div class="onetext" style="margin-top: 5px;">上传者:{{x.UpdateByName}}</div>
<div class="onetext" style="margin-top: 5px;">来源:{{x.source}}</div> <div class="onetext" style="margin-top: 5px;">分组:{{x.MediumGroupName}}</div>
</q-card-section> </q-card-section>
</q-card> </q-card>
</div> </div>
<div style="width: 100%;height: 50px;line-height: 50px;text-align: center;" v-if="dataList.length==0">暂无数据</div>
</div> </div>
<q-dialog v-model="Isadd" persistent> <div v-if="Isadd==true">
<q-card style="width: 520px; max-width: 80vw;"> <alladdsc :allclassifyList="allclassifyList" type='2' @editsuccess="getchildren" :editobj='editobj' @getcancel='Isadd=false'></alladdsc>
<q-card-section>
<div class="text-h6">新建图片素材</div>
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<q-select filled stack-label option-value="ID" option-label="Name" v-model="addMsg.classifyId"
ref="ID" :options="classifyList" label="分组" :dense="false" emit-value map-options />
<div style="margin-top: 15px;">
<div style="width:70px">上传图片:</div>
<div style="margin-top: 15px;">
<el-upload class="avatar-uploader materialupload" action="" :before-upload="uploadFile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
:show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;" v-if="addMsg.img==''"></i>
<q-img v-else :src="addMsg.img"
style="width: 110px;height: 110px;border-radius: 6px;display: flex;">
</q-img>
</el-upload>
<div style="margin-top: 20px;">
(图片大小不超过2M,图片名不能重复,支持JPG,JPEG及PNG格式)
</div>
</div>
</div> </div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="Isadd = false" />
<q-btn color="accent" class="q-mr-md" label="添加" @click="submit()" />
</q-card-actions>
</q-card>
</q-dialog>
</div> </div>
</template> </template>
<script> <script>
import {
UploadSelfFile import alladdsc from './allAddSC'
} from "../../../api/common/common"; //上传图片
const addobj={ Id: 0, classifyId: '', img: '',}
export default { export default {
name: "imgmaterial", name: "imgmaterial",
components: {
alladdsc,
},
props: {
dataList: {
type: Array,
default: [],
},
allclassifyList:{
type: Array,
default: [],
}
},
data() { data() {
return { return {
loading: false, loading: false,
Isadd: false, Isadd: false,
data: [{ editobj:null
Type: 1,
title: '测试文本.png',
Content: 'http://imgfile.oytour.com/EduSystem/Test/Upload/course/202107070330161360000000064.jpg',
source: '本地上传',
CreatorName: '小张',
check: false,
UpdateTime: '2021-08-04 15:48'
}, {
Type: 1,
title: '测试文本.png',
Content: 'http://imgfile.oytour.com/EduSystem/Test/Upload/course/202107090216027320000000011.jpg',
source: '本地上传',
CreatorName: '小张',
check: false,
UpdateTime: '2021-08-04 15:48'
}, {
Type: 1,
title: '测试文本.png',
Content: 'http://imgfile.oytour.com/EduSystem/Test/Upload/course/202107090302364350000000080.jpg',
source: '本地上传',
CreatorName: '小张',
check: false,
UpdateTime: '2021-08-04 15:48'
},],
pageCount: 0,
msg: {
pageIndex: 1,
pageSize: 18,
},
classifyList: [
{ Name: '活动', ID: 1, },
{ Name: '产品', ID: 2, },
{ Name: '校园', ID: 3, },
],
addMsg: Object.assign({}, addobj)
} }
}, },
created() { created() {
console.log('进去所有页面')
}, },
methods: { methods: {
changePage(e) {
},
goadd() { goadd() {
this.Isadd = true; this.Isadd = true;
this.addMsg= Object.assign({}, addobj) this.editobj=null
}, },
goedit(x){ goedit(row){
this.Isadd = true; this.editobj= {}
this.addMsg.img= x.Content this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type;
this.editobj.ImageModel = JSON.parse(JSON.stringify(row.ImageModel)) ;
this.Isadd = true
}, },
uploadFile(files) {//图片上传
UploadSelfFile("course", files, res => {
if (res.Code == 1) {
this.addMsg.img = res.FileUrl;
} getchildren(){
}); this.$emit('editsuccess')
this.Isadd = false
}, },
submit(){//提交 pldelete(){
this.$emit('getdelete')
},
plmove(){
this.$emit('getmove')
} }
} }
......
...@@ -5,11 +5,15 @@ ...@@ -5,11 +5,15 @@
<div> <div>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="add" label="添加图文" <q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="add" label="添加图文"
@click="goadd()"></q-btn> @click="goadd()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="delete" label="批量删除"
@click="pldelete()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="edit" label="修改分组"
@click="plmove()"></q-btn>
</div> </div>
<div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;"> <div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;">
<q-card class="imgcard" v-for="(x,y) in data" :key='y' <q-card class="imgcard" v-for="(x,y) in dataList" :key='y'
:style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}" :style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}"
@click="data[y].check = !data[y].check"> @click="dataList[y].check = !dataList[y].check,$forceUpdate();">
<q-card-section> <q-card-section>
<div <div
style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 5px;"> style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 5px;">
...@@ -18,139 +22,77 @@ ...@@ -18,139 +22,77 @@
<i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;" <i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;"
@click.stop="goedit(x)"></i> @click.stop="goedit(x)"></i>
</div> </div>
<q-img :src="x.Content" class="imgstyle"> <q-img :src="x.ImgTextModel && x.ImgTextModel.ImgPath?x.ImgTextModel.ImgPath:''" class="imgstyle">
<div class="absolute-bottom text-subtitle1 text-center onetext" <div class="absolute-bottom text-subtitle1 text-center onetext"
style="padding: 0;padding: 0 5px;font-size: 12px;"> style="padding: 0;padding: 0 5px;font-size: 12px;">
{{x.title}} {{x.ImgTextModel&& x.ImgTextModel.Title?x.ImgTextModel.Title:''}}
</div> </div>
</q-img> </q-img>
<div class="onetext" style="margin-top: 5px;">上传者:{{x.CreatorName}}</div> <div class="onetext" style="margin-top: 5px;">上传者:{{x.UpdateByName}}</div>
<div class="onetext" style="margin-top: 5px;">来源:{{x.source}}</div> <div class="onetext" style="margin-top: 5px;">分钟:{{x.MediumGroupName}}</div>
</q-card-section> </q-card-section>
</q-card> </q-card>
<div style="width: 100%;height: 50px;line-height: 50px;text-align: center;" v-if="dataList.length==0">暂无数据</div>
</div> </div>
</div> </div>
<q-dialog v-model="Isadd" persistent> <div v-if="Isadd==true">
<q-card style="width: 520px; max-width: 80vw;"> <alladdsc :allclassifyList="allclassifyList" type='3' @editsuccess="getchildren" :editobj='editobj' @getcancel='Isadd=false'></alladdsc>
<q-card-section>
<div class="text-h6">新建图文</div>
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;padding: 20px;">
<q-select filled stack-label option-value="ID" option-label="Name" v-model="addMsg.classifyId"
ref="ID" :options="classifyList" label="分组" :dense="false" emit-value map-options />
<div style="margin-top: 15px;">
<div style="width:70px">上传图片:</div>
<div style="margin-top: 15px;">
<el-upload class="avatar-uploader materialupload" action="" :before-upload="uploadFile"
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp" :show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;"
v-if="addMsg.img==''"></i>
<q-img v-else :src="addMsg.img"
style="width: 110px;height: 110px;border-radius: 6px;display: flex;">
</q-img>
</el-upload>
<div style="margin-top: 20px;">
图片大小不超过2M,图片名不能重复,支持JPG,JPEG及PNG格式
</div>
<q-input clearable standout="bg-primary text-white" v-model="addMsg.title" label="添加标题"
style="margin-top: 20px;" />
<q-input clearable standout="bg-primary text-white" v-model="addMsg.content" type="textarea"
label="添加描述" style="margin-top: 20px;" />
<q-input clearable standout="bg-primary text-white" v-model="addMsg.link"
label="请输入跳转链接,且必须以http://或https://开头" style="margin-top: 20px;" />
</div>
</div> </div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="Isadd = false" />
<q-btn color="accent" class="q-mr-md" label="添加" @click="submit()" />
</q-card-actions>
</q-card>
</q-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import alladdsc from './allAddSC'
UploadSelfFile
} from "../../../api/common/common"; //上传图片
const addobj = { Id: 0, classifyId: '', img: '', title: '', content: '', }
export default { export default {
name: "imgtextmaterial", name: "imgtextmaterial",
components: {
alladdsc,
},
props: {
dataList: {
type: Array,
default: [],
},
allclassifyList:{
type: Array,
default: [],
}
},
data() { data() {
return { return {
loading: false, loading: false,
Isadd: false, Isadd: false,
data: [{ editobj:null
Type: 1,
title: '测试文本.png',
Content: 'http://imgfile.oytour.com/EduSystem/Test/Upload/course/202107070330161360000000064.jpg',
source: '本地上传',
CreatorName: '小张',
check: false,
UpdateTime: '2021-08-04 15:48'
}, {
Type: 1,
title: '测试文本.png',
Content: 'http://imgfile.oytour.com/EduSystem/Test/Upload/course/202107090216027320000000011.jpg',
source: '本地上传',
CreatorName: '小张',
check: false,
UpdateTime: '2021-08-04 15:48'
}, {
Type: 1,
title: '测试文本.png',
Content: 'http://imgfile.oytour.com/EduSystem/Test/Upload/course/202107090302364350000000080.jpg',
source: '本地上传',
CreatorName: '小张',
check: false,
UpdateTime: '2021-08-04 15:48'
},],
pageCount: 0,
msg: {
pageIndex: 1,
pageSize: 18,
},
classifyList: [
{ Name: '活动', ID: 1, },
{ Name: '产品', ID: 2, },
{ Name: '校园', ID: 3, },
],
addMsg: Object.assign({}, addobj)
} }
}, },
created() { created() {
console.log('进去所有页面')
}, },
methods: { methods: {
changePage(e) {
},
goadd() { goadd() {
this.Isadd = true; this.Isadd = true;
this.addMsg = Object.assign({}, addobj) this.editobj=null
}, },
goedit(x) { goedit(row){
this.Isadd = true; this.Isadd = true;
this.addMsg.img = x.Content this.editobj= {}
this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type;
this.editobj.ImgTextModel = JSON.parse(JSON.stringify(row.ImgTextModel)) ;
this.Isadd = true
}, },
uploadFile(files) {//图片上传 getchildren(){
UploadSelfFile("course", files, res => { this.$emit('editsuccess')
if (res.Code == 1) { this.Isadd = false
this.addMsg.img = res.FileUrl;
}
});
}, },
submit() {//提交 pldelete(){
this.$emit('getdelete')
},
plmove(){
this.$emit('getmove')
} }
} }
......
...@@ -2,84 +2,79 @@ ...@@ -2,84 +2,79 @@
<div class="textmaterial" style="padding: 0;margin: 0;"> <div class="textmaterial" style="padding: 0;margin: 0;">
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table no-bottom-table"
separator="none" title="" :data="data" :columns="columns" row-key="name"> separator="none" title="" :data="dataList" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title"></div> <div class="col-2 q-table__title"></div>
<q-space /> <q-space />
<q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" <q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add"
label="添加文本" @click="goadd()"></q-btn> label="添加文本" @click="goadd()"></q-btn>
</template> </template>
<template v-slot:body-cell-Type="props"> <template v-slot:body-cell-title="props">
<q-td :props="props"> <q-td :props="props">
<span v-if="props.row.Type==1">图文</span> <span>{{props.row.TextModel && props.row.TextModel.Title?props.row.TextModel.Title:''}}</span>
<span v-if="props.row.Type==2">图片</span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Content="props">
<q-td :props="props">
<span>{{props.row.TextModel && props.row.TextModel.Content?props.row.TextModel.Content:''}}</span>
</q-td>
</template>
<template v-slot:bottom>
<!-- <q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary"
:max="msg.PageCount" :input="true" @input="changePage" /> -->
</template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="编辑" @click="goDetailed(props.row,'0')" /> label="编辑" @click="goedits(props.row)" />
<q-btn flat size="xs" icon="delete" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="删除" @click="goDetailed(props.row,'0')" /> label="移动" @click="plmove(props)" />
<q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs"
label="删除" @click="goDetailed(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary"
:max="pageCount" :input="true" @input="changePage" />
</template>
</q-table> </q-table>
</div> </div>
<q-dialog v-model="Isadd" persistent> <div v-if="Isadd==true">
<q-card style="width: 520px; max-width: 80vw;"> <alladdsc :allclassifyList="allclassifyList" type='1' @editsuccess="getchildren" :editobj='editobj' @getcancel='Isadd=false'></alladdsc>
<q-card-section> </div>
<div class="text-h6">新建文本素材</div>
</q-card-section>
<q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;">
<q-select filled stack-label option-value="ID" option-label="Name" v-model="addMsg.classifyId"
ref="ID" :options="classifyList" label="分组" :dense="false" emit-value map-options />
<q-input clearable standout="bg-primary text-white" v-model="addMsg.title" label="文本标题" style="margin-top: 20px;"
/>
<q-input clearable standout="bg-primary text-white" v-model="addMsg.content" type="textarea" label="文本内容" style="margin-top: 20px;"
/>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="Isadd = false" />
<q-btn color="accent" class="q-mr-md" label="添加" @click="savelocal()" />
</q-card-actions>
</q-card>
</q-dialog>
</div> </div>
</template> </template>
<script> <script>
import {
delWecharMediumInfo,//删除素材
} from '../../../api/system/wechat';
import alladdsc from './allAddSC'
export default { export default {
name: "textmaterial", name: "textmaterial",
components: {
alladdsc,
},
props: {
dataList: {
type: Array,
default: [],
},
allclassifyList:{
type: Array,
default: [],
}
},
data() { data() {
return { return {
loading: false, loading: false,
Isadd: false, Isadd: false,
data: [{
Type: 1,
title: '测试文本',
Content: '测试文本',
source: '本地上传',
CreatorName: '小张',
UpdateTime: '2021-08-04 15:48'
}],
pageCount: 0,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
rowsPerPage: 10, rowsPerPage: 10,
Month: '',
TeacherId: 0,
State: 0,
}, },
//公告column //公告column
columns: [{ columns: [{
...@@ -95,20 +90,20 @@ ...@@ -95,20 +90,20 @@
align: 'left', align: 'left',
}, },
{ {
name: 'CreatorName', name: 'UpdateByName',
field: 'CreatorName', field: 'UpdateByName',
label: '上传者', label: '上传者',
align: 'left' align: 'left'
}, },
{ {
name: 'source', name: 'MediumGroupName',
field: 'source', field: 'MediumGroupName',
label: '素材来源', label: '分组',
align: 'left' align: 'left'
}, },
{ {
name: 'Type', name: 'TypeName',
field: 'Type', field: 'TypeName',
label: '类型', label: '类型',
align: 'left' align: 'left'
}, },
...@@ -124,22 +119,13 @@ ...@@ -124,22 +119,13 @@
field: 'DeptId' field: 'DeptId'
} }
], ],
classifyList: [
{ Name: '活动', ID: 1, }, editobj: null
{ Name: '产品', ID: 2, },
{ Name: '校园', ID: 3, },
],
addMsg: {
Id: 0,
classifyId: '',
title: '',
content: '',
}
} }
}, },
created() { created() {
console.log('进去所有页面')
}, },
methods: { methods: {
changePage(e) { changePage(e) {
...@@ -147,8 +133,52 @@ ...@@ -147,8 +133,52 @@
}, },
goadd() { goadd() {
this.Isadd = true this.Isadd = true
this.editobj=null
},
getchildren(){
this.$emit('editsuccess')
this.Isadd = false
},
goedits(row){
this.editobj= {}
this.editobj.Id = row.Id;
this.editobj.MediaGroupId = row.MediaGroupId;
this.editobj.Type = row.Type;
this.editobj.TextModel = JSON.parse(JSON.stringify(row.TextModel)) ;
this.Isadd = true
},
goDetailed(row){//删除
let delMsg = {
MediumIds: row.Id,
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除该素材?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
delWecharMediumInfo(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.$emit('editsuccess')
} }
})
}).onCancel(() => {
});
},
plmove(row){
this.dataList[row.rowIndex].check = !this.dataList[row.rowIndex].check
this.$emit('getmove')
}
} }
} }
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
this.$emit('close') this.$emit('close')
}, },
getList(){//获取数据 getList(){//获取数据
console.log('获取数据')
}, },
resetSearch(){ resetSearch(){
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
......
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 850px;max-width:900px;">
<q-card-section>
<div class="text-h6">问题列表</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="research" clearable standout="bg-primary text-white" v-model="msg.Title" label="关键字"
@clear="research" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.QCategoryId" :options="questionCategoryList" emit-value map-options label="分类" multiple
clearable />
</div>
<div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="QId" option-label="Name"
v-model="msg.QuestionTypeId" :options="questionTypeList" emit-value map-options label="题型" multiple
clearable />
</div>
<div class="col-3">
<q-select @input="research" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.DifficultyType" :options="questionDifficultyTypeList" emit-value map-options label="难度"
multiple clearable />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="QuestionId" selection="multiple" :selected.sync="selectedQuestion">
<template v-slot:top="props">
<div class="col-2 q-table__title">问题列表</div>
<q-space />
</template>
<template v-slot:body-cell-Title="props">
<td style="width:400px;">
<div @click="goDetail(props.row)" v-html="props.row.Title" class="quetion_Title">
</div>
</td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="确认选择" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="saveCategory" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
queryQuestionCategory,
queryQuestionTypeList,
queryDifficultyType,
queryQuestionPageList,
} from '../../api/question/question';
export default {
data() {
return {
persistent: true,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseId: 0,
BankId: 0,
Title: "",
PointName: "", //知识点
QuestionTypeId: [], //题型
DifficultyType: [], //难易程度
QCategoryId: [], //分类
},
questionCategoryList: [],
questionTypeList: [], //问题类型列表
questionDifficultyTypeList: [],
columns: [{
name: 'Number',
label: '编号',
field: 'Number',
align: 'left'
},
{
name: 'Title',
label: '题目',
field: 'Title',
align: 'left'
},
{
name: 'CategoryName',
label: '分类',
field: 'CategoryName',
align: 'left',
},
{
name: 'QuestionTypeName',
label: '题型',
field: 'QuestionTypeName',
align: 'left',
},
{
name: 'DifficultyTypeName',
label: '难易',
field: 'DifficultyTypeName',
align: 'left'
},
{
name: 'LevelTypeName',
label: '考级程度',
field: 'LevelTypeName',
align: 'left'
}
],
dataList:[],
pageCount:0,
selectedQuestion:[],
loading:false,
saveLoading:false
}
},
mounted() {
this.getQuestionCategory()
this.getQuestionType();
this.getDifficultyType();
this.getQuestionList();
},
methods: {
//获取问题大类
getQuestionCategory() {
queryQuestionCategory().then(res => {
this.questionCategoryList = res.Data;
})
},
//获取题型列表
getQuestionType() {
queryQuestionTypeList({}).then(res => {
if (res.Code == 1) {
this.questionTypeList = res.Data;
}
});
},
//获取问题难易程度列表
getDifficultyType() {
queryDifficultyType().then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
tempArray.splice(0, 1);
this.questionDifficultyTypeList = tempArray;
}
});
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getQuestionList()
},
research() {
this.msg.pageIndex = 1;
this.getQuestionList();
},
//获取问题分页列表
getQuestionList() {
this.loading = true;
queryQuestionPageList(this.msg).then(res => {
console.log(res,'res');
this.loading = false;
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false
})
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
this.persistent = false
},
saveCategory(){
},
},
}
</script>
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
} }
</style> </style>
<!--订单操作--> <!--订单操作-->
<template> <template>
<q-dialog v-model="IsShowEditOrder" maximized full-height seamless position="right"> <q-dialog v-model="IsShowEditOrder" maximized full-height seamless position="right">
...@@ -89,7 +88,6 @@ ...@@ -89,7 +88,6 @@
maxlength="50" v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" /> maxlength="50" v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" />
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false" <q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false"
maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" /> maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" />
<q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1" <q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" /> label="是否少价" class="q-mb-md" />
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.IsLessPrice==1" <q-input :disable="(modityOrderType==2)" v-if="OrderMsg.IsLessPrice==1"
......
...@@ -34,15 +34,7 @@ export default { ...@@ -34,15 +34,7 @@ export default {
msg: {} msg: {}
} }
}, },
// watch: {
// dict: {
// handler(val) {
// this.msg = val
// console.log(this.msg)
// },
// deep: true
// }
// },
created() { created() {
try { try {
if (!this.multiple) { if (!this.multiple) {
...@@ -56,9 +48,9 @@ export default { ...@@ -56,9 +48,9 @@ export default {
} }
this.msg = this.dict this.msg = this.dict
console.log(this.msg)
} catch (error) { } catch (error) {
console.log('错误', error)
} }
}, },
......
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div class="welcomeList page-body"> <div class="welcomeList page-body">
<!-- <div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name"
v-model="msg.Type" ref="Id" :options="typeList" label="类型" :dense="false" emit-value
map-options />
</div>
</div> </div>
</div> --> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="" :data="data" :columns="columns" row-key="name"> separator="none" title="" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">欢迎语列表</div> <div class="col-2 q-table__title">欢迎语列表</div>
<q-space /> <q-space />
<q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" <q-btn color="accent" style="float:right;margin-right:0;" size="sm" class="q-mr-md" icon="add" label="新增欢迎语"
label="新增欢迎语" @click="goadd()"></q-btn> @click="goadd()"></q-btn>
</template> </template>
<template v-slot:body-cell-Type="props"> <template v-slot:body-cell-Type="props">
<q-td :props="props"> <q-td :props="props">
<span v-if="props.row.Type==1">图文</span> <span v-if="props.row.Type==1">文本</span>
<span v-if="props.row.Type==2">图片</span> <span v-if="props.row.Type==2">图片</span>
<span v-if="props.row.Type==3">图文</span>
<span v-if="props.row.Type==4">小程序</span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Content="props"> <template v-slot:body-cell-Content="props">
...@@ -27,13 +34,15 @@ ...@@ -27,13 +34,15 @@
</div> </div>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="编辑"
label="编辑" @click="goDetailed(props.row,'0')" /> @click="goedit(props.row)" />
<q-btn flat size="xs" icon="delete" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
label="删除" @click="goDetailed(props.row,'0')" /> @click="goDetailed(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
...@@ -44,10 +53,12 @@ ...@@ -44,10 +53,12 @@
</div> </div>
</div> </div>
</template> </template>
<script>
<script>
import {
getWeChatWelcomesPageList,
} from '../../api/system/wechat';
export default { export default {
meta: { meta: {
...@@ -58,16 +69,21 @@ ...@@ -58,16 +69,21 @@
return { return {
loading: false, loading: false,
ISsystem: false, ISsystem: false,
data: [{Type:1,Content:'文本:您好,##客户名称##!亲~你終於來啦!!我是你的专属顾问,任何有关日语学习问题都可以问我哦!!~~~~~~~~~~ 加入甲鹤大家庭~优惠天天有 第一条~9.9块日语体验课!! 第二条~每周活动免费参加! 第三条~猛戳我,”赞羊”电商优惠券免费送!! 第四条~再戳我,”旅游优惠券”我再送! ~~~~~从现在起”甲鹤日语”就是你学习日语的好帮手!! 现在回复”甲鹤”两个字~看看甲鹤想给你看甚么?~呵呵呵!',applymember:'通用',UpdateTime:'2021-08-04 15:48'}], data: [],
pageCount: 0, pageCount: 0,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 15,
rowsPerPage: 10, rowsPerPage: 15,
Month: '', Type: 0,
TeacherId: 0,
State: 0,
}, },
typeList:[
{Id:0,Name:'不限'},
{Id:1,Name:'文本'},
{Id:2,Name:'图片'},
{Id:3,Name:'图文'},
{Id:4,Name:'小程序'},
],
//公告column //公告column
columns: [{ columns: [{
name: 'Type', name: 'Type',
...@@ -81,11 +97,17 @@ ...@@ -81,11 +97,17 @@
align: 'left', align: 'left',
}, },
{ {
name: 'applymember', name: 'UserIdName',
field: 'applymember', field: 'UserIdName',
label: '使用成员', label: '使用成员',
align: 'left' align: 'left'
}, },
{
name: 'UpdateByName',
field: 'UpdateByName',
label: '创建者',
align: 'left'
},
{ {
name: 'UpdateTime', name: 'UpdateTime',
field: 'UpdateTime', field: 'UpdateTime',
...@@ -102,24 +124,54 @@ ...@@ -102,24 +124,54 @@
} }
}, },
created() { created() {
this.getList()
}, },
methods: { methods: {
changePage(e){ changePage(e) {
this.msg.pageIndex = 1
this.getList()
},
getList() {
this.loading = true
getWeChatWelcomesPageList(this.msg).then(res => {
this.loading = false
this.data = res.Data.PageData;
this.pageCount = res.Data.Count
this.data.forEach(x=>{
x.UserIdName=''
x.UserIdList.map((j,i)=>{
if(j==-1){
x.UserIdName='通用'
return
}else{
if(i+1!=x.UserIdList.length){
x.UserIdName=x.UserIdName+'某某、'
}else{
x.UserIdName=x.UserIdName+'某某'
}
}
})
})
})
}, },
goadd(){ goadd() {
this.$router.push({ this.$router.push({
path:'/enterprise/addWelcome', path: '/enterprise/addWelcome',
}); });
},
goedit(){//编辑
},
goDetailed(row){//修改
console.log(row)
} }
} }
} }
</script> </script>
<style> <style>
.welcomeList .Sysuser_Date .el-input--prefix .el-input__inner { .welcomeList .Sysuser_Date .el-input--prefix .el-input__inner {
background-color: red; background-color: red;
border: 0; border: 0;
...@@ -164,8 +216,8 @@ ...@@ -164,8 +216,8 @@
background: transparent !important; background: transparent !important;
border: 0 !important; border: 0 !important;
} }
.welcomeList .el-drawer.rtl{
.welcomeList .el-drawer.rtl {
overflow: inherit; overflow: inherit;
} }
</style> </style>
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
<style>
.OtherCourseNum {
display: inline-block;
width: 25px;
height: 25px;
text-align: center;
line-height: 25px;
border: 1px solid #2961FE;
border-radius: 50%;
cursor: pointer;
color: #2961FE;
}
.OCourseTable {
width: 400px;
text-align: center;
}
.OCourseTable tr td {
height: 40px;
}
.OCourseTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<!-- <div class="col-3">
<q-select @input="getList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.tikuName" :options="tikuList" emit-value map-options label="所属题库" />
</div> -->
<div class="col-3">
<q-input @change="getList" clearable filled v-model="msg.PaperName" @clear="getList" maxlength="20"
label="输入试卷名称、组卷人查找" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">试卷管理</div>
<q-space />
<q-btn color="accent" size="sm" class="q-mr-md" label="组卷" />
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-PaperId="props">
<q-td :props="props" style="width:100px;">
<q-btn flat size="xs" color="primary" style="font-weight:400" label="封存" />
<q-btn flat size="xs" color="primary" style="font-weight:400" label="预览" />
<q-btn flat size="xs" color="primary" style="font-weight:400" @click="goExameEdit(props.row)" label="编辑" />
<q-btn flat size="xs" color="primary" style="font-weight:400" label="复制" />
<q-btn flat size="xs" color="primary" style="font-weight:400" label="发布考试" />
<q-btn flat size="xs" color="primary" style="font-weight:400" label="分配管理" />
<q-btn flat size="xs" color="primary" style="font-weight:400" label="删除" />
<q-btn flat size="xs" color="primary" style="font-weight:400" label="详情" />
</q-td>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
GetPaperPage
} from '../../api/teacher/index';
//获取校区列表
export default {
meta: {
title: "考试管理"
},
data() {
return {
data: [],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
PaperName: '' //题库名
},
pageCount: 0,
loading: false,
tikuList: [{
Id: 0,
Name: '全部'
}, {
Id: 1,
Name: '测试题库'
}, {
Id: 2,
Name: '质量管理与可靠性'
}],
dataList: [],
columns: [
// {
// name: 'PaperId',
// label: '序号',
// field: 'PaperId',
// align: 'left',
// },
{
name: 'PaperName',
label: '试卷名称',
field: 'PaperName',
align: 'left'
},
{
name: 'CreateTimeStr',
label: '创建时间',
field: 'CreateTimeStr',
align: 'left'
},
{
name: 'CreateByName',
label: '创建人',
field: 'CreateByName',
align: 'left'
},
{
name: 'PaperId',
label: '操作',
field: 'PaperId'
}
],
}
},
created() {},
mounted() {
this.getList();
},
methods: {
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList()
},
//获取菜单分页列表
getList() {
this.loading = true;
this.dataList = [];
GetPaperPage(this.msg).then(res => {
this.loading = false;
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false
})
},
//刷新页面
refreshPage() {
this.getList();
},
//点击编辑 跳转
goExameEdit(item) {
console.log("item",item);
this.OpenNewUrl('/exam/examEdit', {
Id: item.PaperId
})
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
This diff is collapsed.
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
}, },
changeStatus(x){ changeStatus(x){
x.EditorStatus=!x.EditorStatus x.EditorStatus=!x.EditorStatus
console.log(x)
this.$forceUpdate() this.$forceUpdate()
}, },
init(){ init(){
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment