Browse Source

动画查询,修改

cy
ChenYao 1 year ago
parent
commit
e15781c4d6
  1. 62
      kcui/src/view/SpInfo.vue
  2. 2
      src/main/java/com/main/woka/Web/Controller/KcInfoController.java
  3. 1
      src/main/resources/Mapper/KcFileMapper.xml

62
kcui/src/view/SpInfo.vue

@ -14,8 +14,8 @@
<div class="leftBox2"> <div class="leftBox2">
<div class="muluBox"> <div class="muluBox">
<div class="muluList"> <div class="muluList">
<div v-for="item in mulu" :key="item"> <div v-for="item in mulu" :key="item" >
<div class="oneMulu" v-if="page!=item.name" @click="goInfo(item.info)"> <div class="oneMulu" v-if="page!=item.name" @click="goInfo(item)">
<div style="width: 80%;text-align: center;">{{ item.name }}</div> <div style="width: 80%;text-align: center;">{{ item.name }}</div>
<img src="../assets/img/jiantou.png" <img src="../assets/img/jiantou.png"
style="width: 0.9vw;height:0.9vw;object-fit: contain;float: right;margin-top: 11%;"> style="width: 0.9vw;height:0.9vw;object-fit: contain;float: right;margin-top: 11%;">
@ -32,8 +32,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="rightContent">
<div class="rightContent">
<div class="rigthHeadInfo" style="position: relative;"> <div class="rigthHeadInfo" style="position: relative;">
<div style="width: 30%;height: 2vw;position: absolute;top: 2.5vw;right: 1vw;"> <div style="width: 30%;height: 2vw;position: absolute;top: 2.5vw;right: 1vw;">
@ -57,7 +57,7 @@
<div v-for="item in typeList" :key="item" style="position: relative;margin-right: 1vw;" <div v-for="item in typeList" :key="item" style="position: relative;margin-right: 1vw;"
@click="changeType(item)"> @click="changeType(item)">
<img v-if="twType==item" src="../assets/img/typeHeadChoose.png" style="width: 7vw;object-fit: contain;"> <img v-if="spType==item" src="../assets/img/typeHeadChoose.png" style="width: 7vw;object-fit: contain;">
<img v-else src="../assets/img/typeHead.png" style="width: 7vw;object-fit: contain;"> <img v-else src="../assets/img/typeHead.png" style="width: 7vw;object-fit: contain;">
<div style="position: absolute;z-index: 12121;width: 100%;text-align: center;color: white;top: 15%;"> <div style="position: absolute;z-index: 12121;width: 100%;text-align: center;color: white;top: 15%;">
{{ item }} {{ item }}
@ -155,6 +155,16 @@
<el-form-item style="position: relative ;" label="知识内容"> <el-form-item style="position: relative ;" label="知识内容">
<Editor v-if="form.contentInfo!=''" v-model="TxtValue" style="height: 15vw;"></Editor> <Editor v-if="form.contentInfo!=''" v-model="TxtValue" style="height: 15vw;"></Editor>
</el-form-item> </el-form-item>
<el-form-item style="position: relative ;" label="选择类别">
<el-select v-model="optionValue" placeholder="请选择类别">
<el-option
v-for="item in typeList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item style="position: relative;margin-top: 5vw;" label="相关图片"> <el-form-item style="position: relative;margin-top: 5vw;" label="相关图片">
<el-upload <el-upload
action="http://127.0.0.1:10031/fileUpdate/upload" action="http://127.0.0.1:10031/fileUpdate/upload"
@ -223,7 +233,7 @@ export default {
onePagesList: [], onePagesList: [],
openInfo: false, openInfo: false,
optionValue:"",
form: { form: {
name: "", name: "",
contentInfo: "", contentInfo: "",
@ -236,12 +246,13 @@ export default {
}, },
methods: { methods: {
goInfo(info) { goInfo(item) {
console.log(info) //this.type=item.id;
this.$router.push('/' + info) console.log(item.info);
this.$router.push('/' + item.info)
}, },
changeType(item) { changeType(item) {
this.twType = item; this.spType = item;
this.getContentList(); this.getContentList();
}, },
choosePage(item) { choosePage(item) {
@ -253,7 +264,7 @@ export default {
console.log("djaksjdklajsdk") console.log("djaksjdklajsdk")
var data = { var data = {
name: this.selectName, name: this.selectName,
type: this.type, type:this.type,
spType: this.spType, spType: this.spType,
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: this.pageSize pageSize: this.pageSize
@ -267,21 +278,34 @@ export default {
var aaa = 0; var aaa = 0;
this.onePagesList = []; this.onePagesList = [];
this.pagesList = []; this.pagesList = [];
if (this.pageNum < this.totalPage - 3) {
for (let i = this.pageNum; i <= this.totalPage; i++) {
// if (this.pageNum < this.totalPage - 3) {
//
// for (let i = this.pageNum; i <= this.totalPage; i++) {
//
// this.pagesList.push(i);
// this.onePagesList.push(i);
// aaa = aaa + 1;
// console.log(aaa);
// if (aaa == 4) {
// break;
// }
// }
// }
let startPage = Math.max(1, this.pageNum - 2); //
let endPage = Math.min(this.totalPage, this.pageNum + 3); //
for (let i = startPage; i <= endPage; i++) {
this.pagesList.push(i); this.pagesList.push(i);
this.onePagesList.push(i); this.onePagesList.push(i);
aaa = aaa + 1; aaa++;
console.log(aaa);
if (aaa == 4) { if (aaa == 4) {
break; break;
} }// 4
}
} }
console.log(this.onePagesList,) console.log(this.onePagesList)
}) })
}, },
@ -299,6 +323,7 @@ export default {
deleteTw(id){ deleteTw(id){
twdelete(id); twdelete(id);
console.log("这是删除操作") console.log("这是删除操作")
this.getContentList();
}, },
editTw(id) { editTw(id) {
// //
@ -391,6 +416,7 @@ export default {
var data = { var data = {
name: this.form.name, name: this.form.name,
contentInfo: this.TxtValue, contentInfo: this.TxtValue,
spType:this.optionValue,
imgs: urlStr, imgs: urlStr,
id: this.id id: this.id
} }

2
src/main/java/com/main/woka/Web/Controller/KcInfoController.java

@ -87,6 +87,7 @@ public class KcInfoController extends BaseController {
String imgs = kcInfo.getImgs(); String imgs = kcInfo.getImgs();
String[] imgList = imgs.split(","); String[] imgList = imgs.split(",");
String spType = kcInfo.getSpType();
KcInfo aa = kcFileMapper.selectById(id); KcInfo aa = kcFileMapper.selectById(id);
@ -126,6 +127,7 @@ public class KcInfoController extends BaseController {
KcInfo info = new KcInfo(); KcInfo info = new KcInfo();
info.setSpType(spType);
info.setId(id); info.setId(id);
info.setName(name); info.setName(name);
info.setTwUrl(String.valueOf(newPath)); info.setTwUrl(String.valueOf(newPath));

1
src/main/resources/Mapper/KcFileMapper.xml

@ -124,6 +124,7 @@
<if test="spUrl != null and spUrl != ''">sp_url = #{spUrl},</if> <if test="spUrl != null and spUrl != ''">sp_url = #{spUrl},</if>
<if test="jsInfo != null and jsInfo != ''">js_info = #{jsInfo},</if> <if test="jsInfo != null and jsInfo != ''">js_info = #{jsInfo},</if>
<if test="parentId != null">parent_id = #{parentId},</if> <if test="parentId != null">parent_id = #{parentId},</if>
<if test="spType != null">sp_type = #{spType},</if>
<if test="level != null">level = #{level},</if> <if test="level != null">level = #{level},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>

Loading…
Cancel
Save