Commit 9e9f7966 authored by zhengke's avatar zhengke

修改问题

parent ed2d3f6e
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<el-input v-model="addMsg.Major" placeholder="请输入专业" /> <el-input v-model="addMsg.Major" placeholder="请输入专业" />
</el-form-item> </el-form-item>
<el-form-item label="工作年限" prop="WorkYears" class="is-required" size="small"> <el-form-item label="工作年限" prop="WorkYears" class="is-required" size="small">
<el-input v-model="addMsg.WorkYears" placeholder="请输入工作年限" /> <el-input v-model="addMsg.WorkYears" @keyup.native="checkInteger(addMsg,'WorkYears')" placeholder="请输入工作年限" />
</el-form-item> </el-form-item>
<el-form-item label="上架状态" size="small"> <el-form-item label="上架状态" size="small">
<el-switch v-model="addMsg.TeacherStatus" active-color="#409EFF" :active-value="1" <el-switch v-model="addMsg.TeacherStatus" active-color="#409EFF" :active-value="1"
......
...@@ -175,7 +175,10 @@ ...@@ -175,7 +175,10 @@
created() { created() {
this.getTemplate(); //获取评价类型下拉数据 this.getTemplate(); //获取评价类型下拉数据
this.getplat(); //获取所属平台下拉数据 this.getplat(); //获取所属平台下拉数据
if(this.$route.query.ArticleId){
this.msg.ArticleId=this.$route.query.ArticleId;
this.getList(); //获取列表数据 this.getList(); //获取列表数据
}
}, },
mounted() {}, mounted() {},
methods: { methods: {
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
<el-button @click="tableSet(3)" size="mini">删除</el-button> <el-button @click="tableSet(3)" size="mini">删除</el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" :data="tableData" @selection-change="tableSelect" border style="width: 100%;margin:20px 0"> <el-table v-loading="loading" :data="tableData" @selection-change="tableSelect" border
style="width: 100%;margin:20px 0">
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column prop="ID" width="80" label="编号"> <el-table-column prop="ID" width="80" label="编号">
...@@ -55,7 +56,8 @@ ...@@ -55,7 +56,8 @@
</el-table-column> </el-table-column>
<el-table-column label="留言数"> <el-table-column label="留言数">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color:#409EFF;text-decoration:underline;cursor:pointer;" @click="CommonJump('informationEvalution')">{{scope.row.CommentNum}}</span> <span style="color:#409EFF;text-decoration:underline;cursor:pointer;"
@click="CommonJump('informationEvalution',{ArticleId:scope.row.ID})">{{scope.row.CommentNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="BrowseNum" label="实际浏览数"> <el-table-column prop="BrowseNum" label="实际浏览数">
...@@ -83,26 +85,39 @@ ...@@ -83,26 +85,39 @@
</div> </div>
<div class="content"> <div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="120px">
<el-form-item label="标题" prop="Name">
<el-input type="text" class="w300" v-model="addMsg.Name" size="small"></el-input>
</el-form-item>
<el-form-item label="标签" class="is-required">
<el-tag :key="index" v-for="(tag,index) in addMsg.LableNameList" closable :disable-transitions="false"
@close="handleClose(tag)">
{{tag}}
</el-tag>
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
@keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 标签</el-button>
</el-form-item>
<el-form-item label="资讯状态"> <el-form-item label="资讯状态">
<el-select class="w300" v-model="addMsg.ArticleStatus" size="small" placeholder="请选择"> <el-select class="w300" v-model="addMsg.ArticleStatus" size="small" placeholder="请选择">
<el-option label="上架" :value="1"></el-option> <el-option label="上架" :value="1"></el-option>
<el-option label="下架" :value="2"></el-option> <el-option label="下架" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="关联老师" prop="TeacherId"> <el-form-item label="关联老师">
<el-select class="w150" style="margin-right: 10px;" v-model="addMsg.TeacherId" size="small" <el-select class="w150" style="margin-right: 10px;" v-model="addMsg.TeacherId" size="small"
placeholder="请选择" @change='changeSupplier'> placeholder="请选择" @change='changeSupplier'>
<el-option label="不限" :value="0"></el-option>
<el-option v-for="item in teacherList" :key="item.ID" :label="item.Name" :value="item.ID"> <el-option v-for="item in teacherList" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="头像" class="is-required" size="small"> <el-form-item label="头像" size="small">
<el-button @click="openChangeDig(1)" size="small">选择文件</el-button> <el-button @click="openChangeDig(1)" size="small">选择文件</el-button>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
<img v-if="!addMsg.ArticlePic || addMsg.ArticlePic==''" <img v-if="!addMsg.ArticlePic || addMsg.ArticlePic==''" src="../../assets/img/default.png"
src="../../assets/img/default.png" style="width:80px;height:80px" alt=""> style="width:80px;height:80px" alt="">
<img v-else style="width:80px;height:80px" :src="addMsg.ArticlePic" <img v-else style="width:80px;height:80px" :src="addMsg.ArticlePic" alt="">
alt="">
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
...@@ -121,30 +136,6 @@ ...@@ -121,30 +136,6 @@
<el-form-item label="虚拟浏览数量"> <el-form-item label="虚拟浏览数量">
<el-input type="number" class="w300" v-model="addMsg.FictitiousBrowseNum" size="small"></el-input> <el-input type="number" class="w300" v-model="addMsg.FictitiousBrowseNum" size="small"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标题">
<el-input type="text" class="w300" v-model="addMsg.Name" size="small"></el-input>
</el-form-item>
<el-form-item label="标签">
<el-tag
:key="index"
v-for="(tag,index) in addMsg.LableNameList"
closable
:disable-transitions="false"
@close="handleClose(tag)">
{{tag}}
</el-tag>
<el-input
class="input-new-tag"
v-if="inputVisible"
v-model="inputValue"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 标签</el-button>
</el-form-item>
<el-form-item label="是否可以留言"> <el-form-item label="是否可以留言">
<el-switch v-model="addMsg.IsComment" class="w300" active-color="#409EFF" :active-value="1" <el-switch v-model="addMsg.IsComment" class="w300" active-color="#409EFF" :active-value="1"
:inactive-value="0"> :inactive-value="0">
...@@ -199,29 +190,24 @@ ...@@ -199,29 +190,24 @@
LableName: '', //标签 LableName: '', //标签
IsComment: 0, //是否可以留言,0-否,1-是 IsComment: 0, //是否可以留言,0-否,1-是
Describe: '', //资讯内容 Describe: '', //资讯内容
TeacherId:'', TeacherId: '',
LableNameList:[],//标签数组 LableNameList: [], //标签数组
ArticlePic:'',//图片 ArticlePic: '', //图片
}, },
//选中IDs //选中IDs
CheckedIds: [], CheckedIds: [],
teacherList:[],//老师的选择 teacherList: [], //老师的选择
rules: { rules: {
Name: [{ Name: [{
required: true, required: true,
message: '请输入标题', message: '请输入标题',
trigger: 'change' trigger: 'change'
}],
TeacherId: [{
required: true,
message: '请选择关联老师',
trigger: 'change'
}] }]
}, },
inputVisible: false, inputVisible: false,
inputValue: '', inputValue: '',
changeState:false, changeState: false,
imgType:0, imgType: 0,
defaultMsg: "", defaultMsg: "",
config: { config: {
initialFrameWidth: null, initialFrameWidth: null,
...@@ -267,14 +253,14 @@ ...@@ -267,14 +253,14 @@
this.addMsg.ID = myData.ID; this.addMsg.ID = myData.ID;
this.addMsg.ArticleStatus = myData.ArticleStatus; this.addMsg.ArticleStatus = myData.ArticleStatus;
this.addMsg.Sort = myData.Sort; this.addMsg.Sort = myData.Sort;
this.addMsg.ShelvesDate = this.dateFunction(myData.ShelvesDate); this.addMsg.ShelvesDate = myData.ShelvesDate;
this.addMsg.DownDate = this.dateFunction(myData.DownDate); this.addMsg.DownDate = myData.DownDate;
this.addMsg.FictitiousBrowseNum = myData.FictitiousBrowseNum; this.addMsg.FictitiousBrowseNum = myData.FictitiousBrowseNum;
this.addMsg.Name = myData.Name; this.addMsg.Name = myData.Name;
this.addMsg.LableName = myData.LableName; this.addMsg.LableName = myData.LableName;
this.addMsg.IsComment = myData.IsComment; this.addMsg.IsComment = myData.IsComment;
this.addMsg.Describe = myData.Describe; this.addMsg.Describe = myData.Describe;
if(myData.LableNameList !=null && myData.LableNameList.length>0){ if (myData.LableNameList != null && myData.LableNameList.length > 0) {
this.addMsg.LableNameList = myData.LableNameList; this.addMsg.LableNameList = myData.LableNameList;
} }
if (this.addMsg.Describe && this.addMsg.Describe != "") { if (this.addMsg.Describe && this.addMsg.Describe != "") {
...@@ -315,9 +301,9 @@ ...@@ -315,9 +301,9 @@
}, },
//保存 //保存
saveMsg() { saveMsg() {
if(this.addMsg.ArticlePic==''){ if(this.addMsg.LableNameList.length==0){
this.Error('请上传图片') this.Error('请选择标签');
return false return;
} }
let content = this.$refs.ue.getUEContent(); let content = this.$refs.ue.getUEContent();
this.addMsg.Describe = content; this.addMsg.Describe = content;
...@@ -332,7 +318,7 @@ ...@@ -332,7 +318,7 @@
} }
}) })
}, },
getTeacherList(){ getTeacherList() {
this.apipost("/api/Education/GetTeacherList", {}, res => { this.apipost("/api/Education/GetTeacherList", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.teacherList = res.data.data this.teacherList = res.data.data
...@@ -343,12 +329,6 @@ ...@@ -343,12 +329,6 @@
}, },
changeSupplier(val) {}, changeSupplier(val) {},
dateFunction(time) {
var zoneDate = new Date(time).toJSON();
var date = new Date(+new Date(zoneDate) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(
/\.[\d]{3}Z/, '');
return date;
},
//单个删除 //单个删除
Delete(item) { Delete(item) {
let that = this; let that = this;
...@@ -401,8 +381,8 @@ ...@@ -401,8 +381,8 @@
} }
if (num == 3) { if (num == 3) {
str = "是否确认删除选中的资讯?"; str = "是否确认删除选中的资讯?";
var mymsg={ var mymsg = {
Ids:GoodsIds Ids: GoodsIds
} }
} }
let that = this; let that = this;
...@@ -411,34 +391,33 @@ ...@@ -411,34 +391,33 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
if(num==1||num==2){ if (num == 1 || num == 2) {
this.BatchShevlves(msg); this.BatchShevlves(msg);
} }
if(num==3){ if (num == 3) {
this.BatchDelete(mymsg); this.BatchDelete(mymsg);
} }
}).catch(() => { }).catch(() => {});
});
}, },
//批量上下架 //批量上下架
BatchShevlves(msg){ BatchShevlves(msg) {
this.apipost("/api/Education/EnableArticleInfo", msg, res => { this.apipost("/api/Education/EnableArticleInfo", msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getList(); this.getList();
this.Success(res.data.message); this.Success(res.data.message);
this.CheckedIds=[]; this.CheckedIds = [];
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
}, },
//批量删除 //批量删除
BatchDelete(msg){ BatchDelete(msg) {
this.apipost("/api/Education/DelArticleInfo", msg, res => { this.apipost("/api/Education/DelArticleInfo", msg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getList(); this.getList();
this.Success(res.data.message); this.Success(res.data.message);
this.CheckedIds=[]; this.CheckedIds = [];
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -467,10 +446,10 @@ ...@@ -467,10 +446,10 @@
openChangeDig(num) { openChangeDig(num) {
this.changeState = true; this.changeState = true;
this.imgType=num; this.imgType = num;
}, },
SelectId(msg){ SelectId(msg) {
if(this.imgType==1){ if (this.imgType == 1) {
let url = this.getIconLink(msg.url) let url = this.getIconLink(msg.url)
this.addMsg.ArticlePic = url this.addMsg.ArticlePic = url
} }
...@@ -517,9 +496,11 @@ ...@@ -517,9 +496,11 @@
.informationManage .w300 { .informationManage .w300 {
width: 300px !important; width: 300px !important;
} }
.informationManage .el-tag + .el-tag {
.informationManage .el-tag+.el-tag {
margin-left: 10px; margin-left: 10px;
} }
.informationManage .button-new-tag { .informationManage .button-new-tag {
margin-left: 10px; margin-left: 10px;
height: 32px; height: 32px;
...@@ -527,6 +508,7 @@ ...@@ -527,6 +508,7 @@
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.informationManage .input-new-tag { .informationManage .input-new-tag {
width: 90px; width: 90px;
margin-left: 10px; margin-left: 10px;
......
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