kms代码同步
This commit is contained in:
parent
5c31d0dfba
commit
8dbc20733f
@ -1,156 +1,156 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="knwldir">
|
<div class="knwldir">
|
||||||
<van-search v-model="keyvalue" placeholder="请输入文件内容关键词"/>
|
<van-search v-model="keyvalue" placeholder="请输入文件内容关键词"/>
|
||||||
<div class="content" :style="contentH">
|
<div class="content" :style="contentH">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<van-cell v-for="(item,index) in dirs" :key="index" is-link
|
<van-cell v-for="(item,index) in dirs" :key="index" is-link
|
||||||
:to="{name:'sub-knwldir', params: {id:item.id,hasPerm:item.hasPerm}}">
|
:to="{name:'sub-knwldir', params: {id:item.id,hasPerm:item.hasPerm}}">
|
||||||
<i v-if="item.iconCls.indexOf('treeDimension')>-1" class="awsui-iconfont" :style="item.hasPerm?'color:#FABD01;':'color:#c8c9cc;'" :class="item.iconCls"></i>
|
<i v-if="item.iconCls.indexOf('treeDimension')>-1" class="awsui-iconfont" :style="item.hasPerm?'color:#FABD01;':'color:#c8c9cc;'" :class="item.iconCls"></i>
|
||||||
<i v-else class="awsui-iconfont" :style="item.hasPerm?'color:#FABD01;':'color:#c8c9cc;'" :class="item.iconCls"></i>
|
<i v-else class="awsui-iconfont" :style="item.hasPerm?'color:#FABD01;':'color:#c8c9cc;'" :class="item.iconCls"></i>
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</van-cell>
|
</van-cell>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!initLoad&&dirs.length==0">
|
<div v-show="!initLoad&&dirs.length==0">
|
||||||
<div class="con">
|
<div class="con">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<img src="../assets/no_content.png" alt="" style="width: 110px;">
|
<img src="../assets/no_content.png" alt="" style="width: 110px;">
|
||||||
|
</div>
|
||||||
|
<div class="text">暂无数据</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text">暂无数据</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<tabbar/>
|
||||||
<tabbar/>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import tabbar from '@/components/tabbar.vue' //引用组件的地址
|
import tabbar from '@/components/tabbar.vue' //引用组件的地址
|
||||||
import awsuiAxios from "../awsuiAxios";
|
import awsuiAxios from "../awsuiAxios";
|
||||||
export default {
|
export default {
|
||||||
name: 'knwldir',
|
name: 'knwldir',
|
||||||
components: {
|
components: {
|
||||||
tabbar
|
tabbar
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
initLoad:true,
|
|
||||||
keyvalue: '',
|
|
||||||
contentH:'',
|
|
||||||
dirs: [],
|
|
||||||
tmpdirs:[],
|
|
||||||
name: `<font color='#378DEC'>知识目录</font>` + ' > '
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
getDimensionList(){
|
|
||||||
let that = this;
|
|
||||||
awsuiAxios.post({
|
|
||||||
url: "jd",
|
|
||||||
data: {
|
|
||||||
cmd: "com.actionsoft.apps.kms_mobile_center_dimension_tree_json",
|
|
||||||
parentId:"",
|
|
||||||
isDimensionKnwlPage:false
|
|
||||||
|
|
||||||
},
|
|
||||||
}).then(function (r) {
|
|
||||||
that.loading = false;
|
|
||||||
if (r.result == "error") {
|
|
||||||
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true});
|
|
||||||
} else {
|
|
||||||
that.dirs = r.data.dimensionJA;
|
|
||||||
that.tmpdirs = r.data.dimensionJA;
|
|
||||||
}
|
|
||||||
that.initLoad = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
searchDirName(){
|
data() {
|
||||||
let that = this;
|
return {
|
||||||
if(that.keyvalue===''){
|
initLoad:true,
|
||||||
this.dirs=this.tmpdirs;
|
keyvalue: '',
|
||||||
}
|
contentH:'',
|
||||||
let resultdata = [];
|
dirs: [],
|
||||||
that.dirs.forEach((item) => {
|
tmpdirs:[],
|
||||||
if (item.name.indexOf(that.keyvalue) > -1 ) {
|
name: `<font color='#378DEC'>知识目录</font>` + ' > '
|
||||||
resultdata.push(item);
|
}
|
||||||
}
|
},
|
||||||
})
|
methods:{
|
||||||
that.dirs=resultdata;
|
getDimensionList(){
|
||||||
}
|
let that = this;
|
||||||
},
|
awsuiAxios.post({
|
||||||
watch:{
|
url: "jd",
|
||||||
keyvalue:function(){
|
data: {
|
||||||
let that = this;
|
cmd: "com.actionsoft.apps.kms_mobile_center_dimension_tree_json",
|
||||||
setTimeout(function () {
|
parentId:"",
|
||||||
that.searchDirName();
|
isDimensionKnwlPage:false
|
||||||
},300);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
},
|
||||||
localStorage.setItem("dimensionhasPerm",undefined);
|
}).then(function (r) {
|
||||||
let that = this;
|
that.loading = false;
|
||||||
let h = window.innerHeight-105;
|
if (r.result == "error") {
|
||||||
this.contentH="height:"+h+"px;overflow-y:auto;";
|
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true});
|
||||||
this.getDimensionList();
|
} else {
|
||||||
}
|
that.dirs = r.data.dimensionJA;
|
||||||
}
|
that.tmpdirs = r.data.dimensionJA;
|
||||||
|
}
|
||||||
|
that.initLoad = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchDirName(){
|
||||||
|
let that = this;
|
||||||
|
if(that.keyvalue===''){
|
||||||
|
this.dirs=this.tmpdirs;
|
||||||
|
}
|
||||||
|
let resultdata = [];
|
||||||
|
that.dirs.forEach((item) => {
|
||||||
|
if (item.name.indexOf(that.keyvalue) > -1 ) {
|
||||||
|
resultdata.push(item);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.dirs=resultdata;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
keyvalue:function(){
|
||||||
|
let that = this;
|
||||||
|
setTimeout(function () {
|
||||||
|
that.searchDirName();
|
||||||
|
},300);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
localStorage.setItem("dimensionhasPerm",undefined);
|
||||||
|
let that = this;
|
||||||
|
let h = window.innerHeight-105;
|
||||||
|
this.contentH="height:"+h+"px;overflow-y:auto;";
|
||||||
|
this.getDimensionList();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.knwldir {
|
.knwldir {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.knwldir .content {
|
.knwldir .content {
|
||||||
border-top: 0.33px solid #e9e9e9;
|
border-top: 0.33px solid #e9e9e9;
|
||||||
height: calc(100% - 105px);
|
height: calc(100% - 105px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.knwldir .content .item {
|
.knwldir .content .item {
|
||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.knwldir .content .van-cell {
|
.knwldir .content .van-cell {
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
/*border-bottom: 0.33px solid #e9e9e9;*/
|
/*border-bottom: 0.33px solid #e9e9e9;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.knwldir .content .van-cell:last-child {
|
.knwldir .content .van-cell:last-child {
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.knwldir .content .van-cell .awsui-iconfont {
|
.knwldir .content .van-cell .awsui-iconfont {
|
||||||
/*color: #03A76B;*/
|
/*color: #03A76B;*/
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.knwldir .content .van-cell .default {
|
.knwldir .content .van-cell .default {
|
||||||
color: #CCCCCC;
|
color: #CCCCCC;
|
||||||
}
|
}
|
||||||
.treeHotspot {
|
.treeHotspot {
|
||||||
color:#f3b731 !important;
|
color:#f3b731 !important;
|
||||||
}
|
}
|
||||||
.con {
|
.con {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(-50%,-50%);
|
transform: translate(-50%,-50%);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.con .img {
|
.con .img {
|
||||||
width: 125px;
|
width: 125px;
|
||||||
height: 125px;
|
height: 125px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.con .text {
|
.con .text {
|
||||||
color: #999;
|
color: #999;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user