KMS移动端代码提交
This commit is contained in:
parent
64080c927b
commit
44069342f3
21
com.actionsoft.apps.kms.mobile/App.vue
Normal file
21
com.actionsoft.apps.kms.mobile/App.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
BIN
com.actionsoft.apps.kms.mobile/assets/header.png
Normal file
BIN
com.actionsoft.apps.kms.mobile/assets/header.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
BIN
com.actionsoft.apps.kms.mobile/assets/logo.png
Normal file
BIN
com.actionsoft.apps.kms.mobile/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
BIN
com.actionsoft.apps.kms.mobile/assets/no_content.png
Normal file
BIN
com.actionsoft.apps.kms.mobile/assets/no_content.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
com.actionsoft.apps.kms.mobile/assets/no_search.png
Normal file
BIN
com.actionsoft.apps.kms.mobile/assets/no_search.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
109
com.actionsoft.apps.kms.mobile/awsuiAxios/index.js
Normal file
109
com.actionsoft.apps.kms.mobile/awsuiAxios/index.js
Normal file
@ -0,0 +1,109 @@
|
||||
import axios from 'axios'
|
||||
import store from '../store'
|
||||
// 创建axios请求实例
|
||||
// const request = axios.create({
|
||||
// baseURL: axiosBaseUrl,
|
||||
// timeout: 1000,
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json; charset=utf-8'
|
||||
// }
|
||||
// })
|
||||
axios.defaults.baseURL = typeof axiosBaseUrl == "undefined" ? "" : axiosBaseUrl; // 设置跨域代理接口统一的前置地址
|
||||
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8';
|
||||
|
||||
// 添加请求拦截器
|
||||
axios.interceptors.request.use(function (request) {
|
||||
// 在发送请求之前做些什么
|
||||
if(request.method == 'post'){
|
||||
request.params = {};
|
||||
}
|
||||
return request
|
||||
}, function (error) {
|
||||
// 对请求错误做些什么
|
||||
return Promise.reject(error)
|
||||
})
|
||||
|
||||
// 添加响应拦截器
|
||||
axios.interceptors.response.use(function (response) {
|
||||
// 只返回数据
|
||||
return response.data
|
||||
}, function (error) {
|
||||
if(error.response == null){
|
||||
throw error;
|
||||
}
|
||||
const status = error.response.status
|
||||
if (status >= 500) {
|
||||
alert('服务繁忙请稍后再试')
|
||||
} else if (status >= 400) {
|
||||
alert(error.response.data.message)
|
||||
}
|
||||
// 对响应错误做点什么
|
||||
console.dir(error)
|
||||
return Promise.reject(error)
|
||||
})
|
||||
|
||||
function _toChangeData(data){
|
||||
let dataArray = [];
|
||||
for(let key in data){
|
||||
dataArray.push(encodeURIComponent(key)+"="+encodeURIComponent(data[key]));
|
||||
}
|
||||
return dataArray.join("&");
|
||||
}
|
||||
|
||||
//可能需要更改,暂时用不到
|
||||
const get = (params) => {
|
||||
|
||||
return axios({
|
||||
method: "get",
|
||||
url: params.url,
|
||||
params: params.params
|
||||
});
|
||||
}
|
||||
|
||||
const post = (params) => {
|
||||
let postConfig = {
|
||||
method: "post",
|
||||
url: params.url,
|
||||
data: params.data
|
||||
}
|
||||
//从vuex中获取sessionId
|
||||
postConfig.data.sid = store.state.sessionId;
|
||||
postConfig.data = _toChangeData(postConfig.data);
|
||||
return axios(postConfig);
|
||||
}
|
||||
|
||||
const aslp = (params) => {
|
||||
// {
|
||||
// portalUrl : "",
|
||||
// authentication : store.state.sessionId,
|
||||
// sourceAppId : "appid",
|
||||
// aslp : "aslp://XXXX",
|
||||
// params :{
|
||||
// aa:1,
|
||||
// bb:2
|
||||
// }
|
||||
// }
|
||||
let datas = {
|
||||
authentication : store.state.sessionId,
|
||||
sourceAppId : params.sourceAppId,
|
||||
aslp : params.aslp,
|
||||
}
|
||||
Object.assign(datas,params.params)
|
||||
let postConfig = {
|
||||
method: "post",
|
||||
url: params.portalUrl,
|
||||
params: datas
|
||||
}
|
||||
postConfig.data = _toChangeData(postConfig.data);
|
||||
return axios(postConfig);
|
||||
}
|
||||
// const delete = (url, data) => request.delete(url, data)
|
||||
// const head = (url, data) => request.head(url, data)
|
||||
// const options = (url, data) => request.options(url, data)
|
||||
// const put = (url, data) => request.put(url, data)
|
||||
// const patch = (url, data) => request.patch(url, data)
|
||||
export default {
|
||||
get,
|
||||
post,
|
||||
aslp
|
||||
}
|
||||
122
com.actionsoft.apps.kms.mobile/components/fieldDate.vue
Normal file
122
com.actionsoft.apps.kms.mobile/components/fieldDate.vue
Normal file
@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<div class="select">
|
||||
<van-field
|
||||
v-model="result"
|
||||
v-bind="$attrs"
|
||||
readonly
|
||||
is-link
|
||||
@click="show = !show"
|
||||
/>
|
||||
<van-popup v-model="show" position="bottom">
|
||||
<!-- $attrs 可以把根节点的attr放到目标组件上,如此可以像使用 DatePicker 组件一样使用这个新组件 -->
|
||||
<van-datetime-picker
|
||||
v-bind="$attrs"
|
||||
:type="type"
|
||||
title="请选择日期"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@cancel="cancel"
|
||||
@confirm="confirm"
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'VantFieldDate',
|
||||
model: {
|
||||
prop: 'selectValue'
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
selectValue: {
|
||||
type: [String, Number, Date],
|
||||
default: undefined // 值不能是 null,DatePicker会报错
|
||||
},
|
||||
minDate: {
|
||||
type: Date,
|
||||
default: undefined
|
||||
},
|
||||
maxDate: {
|
||||
type: Date,
|
||||
default: undefined
|
||||
},
|
||||
// 展示的格式化
|
||||
format: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 展示的格式化,时间提交的值是Date类型数据
|
||||
formatFormula() {
|
||||
if (this.format) {
|
||||
return this.format
|
||||
} else if (this.type === 'date') {
|
||||
return 'yyyy-MM-dd'
|
||||
} else if (this.type === 'datetime') {
|
||||
return 'yyyy-MM-dd hh:mm'
|
||||
} else if (this.type === 'time') {
|
||||
return 'hh:mm'
|
||||
} else if (this.type === 'year-month') {
|
||||
return 'yyyy-MM'
|
||||
}
|
||||
},
|
||||
result() {
|
||||
return this.selectValue ? this.dateFormat(this.selectValue, this.formatFormula) : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dateFormat: (value, format) => {
|
||||
if (!value) return
|
||||
if (!(value instanceof Date)) {
|
||||
value = new Date(value)
|
||||
}
|
||||
let o = {
|
||||
'M+': value.getMonth() + 1, // month
|
||||
'd+': value.getDate(), // day
|
||||
'h+': value.getHours(), // hour
|
||||
'm+': value.getMinutes(), // minute
|
||||
's+': value.getSeconds(), // second
|
||||
'q+': Math.floor((value.getMonth() + 3) / 3), // quarter
|
||||
'S': value.getMilliseconds() // millisecond
|
||||
}
|
||||
if (!format || format === '') {
|
||||
format = 'yyyy-MM-dd hh:mm:ss'
|
||||
}
|
||||
|
||||
if (/(y+)/.test(format)) {
|
||||
format = format.replace(RegExp.$1, (value.getFullYear() + '').substr(4 - RegExp.$1.length))
|
||||
}
|
||||
|
||||
for (let k in o) {
|
||||
if (new RegExp('(' + k + ')').test(format)) {
|
||||
format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
|
||||
}
|
||||
}
|
||||
return format
|
||||
},
|
||||
confirm(value) {
|
||||
// 更新 v-model 绑定的 value 值,第二个参数是毫秒数,第三个参数是原始值,根据自己的项目的数据结构来修改
|
||||
// input 事件同时也会触发 vee-validate 的验证事件
|
||||
this.$emit('input', value.getTime(), value)
|
||||
// onChange事件,虽然重写 @input可以实现,但这样会破坏 v-model 写法。
|
||||
this.$emit('change', value.getTime(), value)
|
||||
this.show = false;
|
||||
},
|
||||
cancel() {
|
||||
this.$emit('cancelDate');
|
||||
this.show = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
113
com.actionsoft.apps.kms.mobile/components/fieldSelect.vue
Normal file
113
com.actionsoft.apps.kms.mobile/components/fieldSelect.vue
Normal file
@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div class="select">
|
||||
<van-field
|
||||
class="fieldVan"
|
||||
v-model="result"
|
||||
v-bind="$attrs"
|
||||
:disabled="disabled"
|
||||
ref="picker"
|
||||
readonly
|
||||
is-link
|
||||
@click="onShow"
|
||||
/>
|
||||
<van-popup v-model="show" position="bottom" >
|
||||
<van-picker
|
||||
show-toolbar
|
||||
value-key="text"
|
||||
class="pickerVan"
|
||||
:columns="columns"
|
||||
:default-index="defaultIndex"
|
||||
:title="$attrs.label"
|
||||
@cancel="show = !show"
|
||||
@confirm = "onConfirm"
|
||||
@change="onChange"
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
model: {
|
||||
prop: 'selectValue'
|
||||
},
|
||||
props: {
|
||||
columns: {
|
||||
type: Array
|
||||
},
|
||||
selectValue: {
|
||||
type: String
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean
|
||||
},
|
||||
defaultIndex:{
|
||||
type:Number
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
result: this.selectValue,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onShow() {
|
||||
if (!this.disabled) {
|
||||
this.show = !this.show
|
||||
}
|
||||
},
|
||||
onConfirm(item,index){
|
||||
if(Array.isArray(item)){
|
||||
this.result = item[1];
|
||||
}else{
|
||||
this.result = item;
|
||||
}
|
||||
this.show = !this.show
|
||||
},
|
||||
onChange(picker, item) {
|
||||
|
||||
},
|
||||
changeValue(value){
|
||||
this.result = value;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectValue: function (newVal) {
|
||||
this.value = newVal
|
||||
},
|
||||
result(newVal) {
|
||||
this.$emit('input', newVal)
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.defaultIndex = this.defaultIndex;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.select .van-field .van-cell__right-icon {
|
||||
transform: rotate(90deg);
|
||||
position: absolute;
|
||||
right: 22px;
|
||||
line-height: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.select .van-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.van-picker .van-picker-column{
|
||||
overflow: unset !important;
|
||||
width: calc(100% - 64px) !important;
|
||||
}
|
||||
.van-datetime-picker .van-picker-column{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.select .van-field__control{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
13
com.actionsoft.apps.kms.mobile/components/index.vue
Normal file
13
com.actionsoft.apps.kms.mobile/components/index.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'index'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
619
com.actionsoft.apps.kms.mobile/components/list.vue
Normal file
619
com.actionsoft.apps.kms.mobile/components/list.vue
Normal file
@ -0,0 +1,619 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<ul v-if="list.length > 0"
|
||||
class="list van-clearfix"
|
||||
ref="listBox"
|
||||
@click.stop="clickOutMenu">
|
||||
<van-list
|
||||
v-model="pageSetting.loading"
|
||||
:finished="pageSetting.finished"
|
||||
@load="downLoad"
|
||||
finished-text="没有更多了"
|
||||
loading-text="加载中..."
|
||||
:offset="offset"
|
||||
>
|
||||
<li v-for="(item,index) in currentList"
|
||||
:key="index"
|
||||
@click="onDetail(item)">
|
||||
<div class="top"
|
||||
ref="elTop">
|
||||
<div class="left"
|
||||
:style="type != ''?'width:100%':''"
|
||||
:knwlname="item.knwlName">
|
||||
<template v-if="type=='search'">
|
||||
<div class="title"
|
||||
v-html="item.title"></div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="title"
|
||||
:style="(type=='borrow'&&item.readFlag)?'color:#333':''"
|
||||
v-html="item.cardName?item.cardName:item.favoriteTitle"></div>
|
||||
</template>
|
||||
<div class="description"
|
||||
v-show="type == 'search'&&item.content&&item.content.length>0"
|
||||
v-html="item.content"></div>
|
||||
|
||||
<div class="steps"
|
||||
v-show="type == 'search'"
|
||||
:style="type=='search'?'color:#60BA99; margin-top:6px;':''">
|
||||
{{ item.dimensionPath }}
|
||||
</div>
|
||||
<div class="description"
|
||||
:style="(type == 'knwlhome'||type=='publish')?'margin-bottom:6px;margin-top:2px;':'margin-top:8px'">
|
||||
|
||||
<template v-if="type=='search'">
|
||||
<label>{{ item.fileCreateTime }}</label>
|
||||
<label class="line">|</label>
|
||||
<label>{{ item.fileCreateUser }}</label>
|
||||
<a v-show="item.onlineLevel===1"
|
||||
@click.stop="downLoadFile(item)">
|
||||
<i class="awsui-iconfont"
|
||||
style="position: absolute;right: 0; color: #83B9F5;"></i>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
{{ item.publishUsername ? item.publishUsername + "" : "" }}
|
||||
<font v-show="item.publishUsername"
|
||||
class="divids">|</font>
|
||||
{{ item.publishTime ? item.publishTime + "" : item.createTime + "" }}
|
||||
<font v-show="type!='favorite'"
|
||||
class="divids">|</font>
|
||||
{{ type != "favorite" ? (item.readCount ? "阅读(" + item.readCount + ")" : "阅读(" + 0 + ")") : "" }}
|
||||
<font v-show="type=='knowl'||type == 'knwlhome'"
|
||||
class="divids">|</font>
|
||||
{{ type == "knowl"||type == "knwlhome" ? (item.commentCount ? "讨论(" + item.commentCount + ")" : "讨论(" + 0 + ")") : "" }}
|
||||
<font v-show="type=='borrow'"
|
||||
class="divids">|</font>
|
||||
{{ type == "borrow" ? item.STATUS : "" }}
|
||||
<font v-show="type=='borrow'&&item.STATUS === '同意'&&(item.CONTROLTYPE.indexOf('限制')>-1)"
|
||||
class="divids">|</font>
|
||||
{{ (type == "borrow" && item.STATUS === "同意" && (item.CONTROLTYPE.indexOf("限制") > -1)) ? readType(item) : "" }}
|
||||
<font v-show="item.myKnowlage"
|
||||
class="publicstate"
|
||||
:style="item.isPublished?'':'color:#e29b1a'">{{ item.isPublished ? " 已发布" : " 未发布" }}</font>
|
||||
<font v-show="type=='publish'"
|
||||
class="divids">|</font>
|
||||
{{ type == "publish" ? item.publishStatus : "" }}
|
||||
</template>
|
||||
</div>
|
||||
<i v-show="item.myKnowlage||type=='publish'"
|
||||
class="awsui-iconfont knowlage-icon"
|
||||
@click.stop="onMenu(item)"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom"
|
||||
v-show="type == 'knwlhome'||type=='publish'">
|
||||
{{ item.dimensionPath }}
|
||||
</div>
|
||||
</li>
|
||||
</van-list>
|
||||
</ul>
|
||||
|
||||
<div class="list"
|
||||
v-else>
|
||||
<div class="con">
|
||||
<div class="img">
|
||||
<img v-if="type=='search'"
|
||||
src="../assets/no_search.png"
|
||||
alt=""
|
||||
style="width: 125px;">
|
||||
<img v-else
|
||||
src="../assets/no_content.png"
|
||||
alt=""
|
||||
style="width: 125px;">
|
||||
</div>
|
||||
<div v-if="type=='search'||type=='knwlhome'"
|
||||
class="text">没有搜索到匹配结果
|
||||
</div>
|
||||
<div v-else-if="type=='borrow'"
|
||||
class="text">暂无借阅知识
|
||||
</div>
|
||||
<div v-else-if="type=='knowl'"
|
||||
class="text">暂无知识
|
||||
</div>
|
||||
<div v-else-if="type=='publish'"
|
||||
class="text">暂无发布知识
|
||||
</div>
|
||||
<div v-else-if="type=='favorite'"
|
||||
class="text">暂无收藏
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="showDialog"
|
||||
show-cancel-button
|
||||
@confirm="handleDialog">
|
||||
<span style="text-align: center;padding: 20px 0;display: inline-block;width: 100%;">确认删除选中的知识?</span>
|
||||
</van-dialog>
|
||||
<van-dialog v-model="showUnReleaseDialog"
|
||||
show-cancel-button
|
||||
@confirm="handleReleaseDialog">
|
||||
<span style="text-align: center;padding: 20px 0;display: inline-block;width: 100%;">确认取消发布选中的知识?</span>
|
||||
</van-dialog>
|
||||
<van-action-sheet v-model="menushow"
|
||||
:closeable="false"
|
||||
:description="activeCardName">
|
||||
<div class="content"
|
||||
style="width: 100%;padding: 20px 0px">
|
||||
<div :style="styleWidth"
|
||||
class="options_op"
|
||||
@click="editorCard">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">编辑</div>
|
||||
</div>
|
||||
<div :style="styleWidth"
|
||||
v-if="type!='publish'"
|
||||
class="options_op"
|
||||
@click="releaseFun">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">发布</div>
|
||||
</div>
|
||||
<div :style="styleWidth"
|
||||
v-else
|
||||
class="options_op"
|
||||
@click="unreleaseFun">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">取消发布</div>
|
||||
</div>
|
||||
<div :style="styleWidth"
|
||||
class="options_op"
|
||||
@click="logData">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">日志</div>
|
||||
</div>
|
||||
<div :style="styleWidth"
|
||||
v-show="type=='knowl'"
|
||||
class="options_op"
|
||||
@click="deleteCardConfrim">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">删除</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
props: {
|
||||
myPublicCount: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => [{}]
|
||||
},
|
||||
searchval: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
pageSetting: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
offset: 10,
|
||||
styleWidth: "width:25%;",
|
||||
currentList: [],
|
||||
searchText: this.searchval,
|
||||
menuActiveId: "",
|
||||
activeCard: {},
|
||||
activeCardName: "",
|
||||
menushow: false,
|
||||
showDialog: false,
|
||||
showUnReleaseDialog: false,
|
||||
topHeight: 0,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
readType(item) {
|
||||
if (item.STATUS === "同意") {
|
||||
if (item.CONTROLTYPE === "限制阅读次数") {
|
||||
return "阅读次数:" + item.READTIMES + " / " + item.TIMES;
|
||||
} else if (item.CONTROLTYPE === "限制有效日期") {
|
||||
return "有效期至:" + item.ENDDATE;
|
||||
}
|
||||
}
|
||||
},
|
||||
backTop() {
|
||||
if (this.$refs.listBox) {
|
||||
this.$refs.listBox.scrollTop = 0;
|
||||
}
|
||||
},
|
||||
downLoadFile(obj) {
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_filePreview",
|
||||
fileId: obj.fileId
|
||||
}
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
// let a = document.createElement('a');
|
||||
// a.href = r.data.downloadURL;
|
||||
// a.click();
|
||||
// a.remove();
|
||||
window.location.href = r.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
downLoad() {
|
||||
this.pageSetting.loading = true;
|
||||
setTimeout(() => {
|
||||
this.$emit("downLoadMore", {});
|
||||
}, 300);
|
||||
},
|
||||
clickOutMenu(e) {
|
||||
this.list.forEach(el => {
|
||||
let iconId = document.getElementById(el.id + "icon");
|
||||
if (iconId) {
|
||||
if (!iconId.contains(e.target)) {
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onDetail(el) {
|
||||
if (this.type == "borrow" && el.readFlag) {
|
||||
} else if (el.knwlId) {
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: "know-detail",
|
||||
params: {
|
||||
id: el.cardId ? el.cardId : el.favoriteId,
|
||||
dimensionId: el.dimensionId ? el.dimensionId : "",
|
||||
boId: el.boId
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onMenu(item) {
|
||||
this.handleScroll();
|
||||
this.activeCard = item;
|
||||
this.isPublished = item.isPublished;
|
||||
this.menushow = true;
|
||||
this.activeCardName = item.cardName;
|
||||
},
|
||||
deleteCardConfrim() {
|
||||
this.showDialog = true;
|
||||
this.menushow = false;
|
||||
},
|
||||
handleDialog() {
|
||||
this.showDialog = false;
|
||||
this.deleteCard();
|
||||
},
|
||||
editorCard() {
|
||||
this.$router.push({
|
||||
name: "new-knowledge",
|
||||
params: {
|
||||
cardId: this.activeCard.cardId,
|
||||
dimensionId: this.activeCard.dimensionId,
|
||||
type: "editor"
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteCard() {
|
||||
let that = this;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_delete_card",
|
||||
cardIds: this.activeCard.cardId
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
that.$toast({message: "删除成功", overlay: true});
|
||||
let datas = that.list;
|
||||
for (let i = 0; i < datas.length; i++) {
|
||||
if (datas[i]["cardId"] == that.activeCard.cardId) {
|
||||
that.list.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.$emit("changeSizeInfo");
|
||||
}
|
||||
});
|
||||
},
|
||||
releaseFun() {
|
||||
let that = this;
|
||||
this.menushow = false;
|
||||
that.publicCardId = this.activeCard.cardId;
|
||||
let validDateTmp = this.activeCard.validDate;
|
||||
let datee = new Date();
|
||||
let mm = datee.getMonth() + 1;
|
||||
let currentDate = datee.getFullYear() + "-" + (mm < 10 ? "0" : "") + mm + "-" + datee.getDate();
|
||||
if (validDateTmp && validDateTmp != "" && validDateTmp < currentDate) {
|
||||
this.$toast({message: "知识[" + this.activeCard.cardName + "]已过期,不允许发布", overlay: true});
|
||||
return false;
|
||||
}
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_check_card_has_file",
|
||||
cardIds: JSON.stringify([that.publicCardId])
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result != "ok") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
that.$router.push({
|
||||
name: "release-knowledge",
|
||||
params: {
|
||||
name: that.activeCard.cardName,
|
||||
id: that.publicCardId,
|
||||
type: "myknowledge"
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
unreleaseFun() {
|
||||
this.menushow = false;
|
||||
this.dialogMsg = "确认取消发布知识目录[" + this.activeCard.dimensionPath + "]下的知识[" + this.activeCard.cardName + "]吗?";
|
||||
this.showUnReleaseDialog = true;
|
||||
},
|
||||
handleReleaseDialog() {
|
||||
this.showUnReleaseDialog = false;
|
||||
let that = this;
|
||||
that.activePublishId = this.activeCard.publishId;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_cancel_publish_card",
|
||||
publishId: this.activeCard.publishId,
|
||||
},
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
that.$toast({message: "取消发布成功", overlay: true});
|
||||
let datas = that.list;
|
||||
for (let i = 0; i < datas.length; i++) {
|
||||
if (datas[i]["publishId"] == that.activePublishId) {
|
||||
that.list.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.myPublicCount--;
|
||||
that.$emit("refreshCount", that.myPublicCount);
|
||||
}
|
||||
});
|
||||
},
|
||||
logData() {
|
||||
this.menushow = false;
|
||||
this.$router.push({
|
||||
name: "knwlborrow",
|
||||
params: {
|
||||
id: this.activeCard.cardId,
|
||||
name: this.activeCard.cardName,
|
||||
}
|
||||
});
|
||||
},
|
||||
getTopHeight() {
|
||||
// 动态控制表格高度
|
||||
this.$nextTick(function () {
|
||||
let topHeight = this.$refs.elTop[0].offsetHeight - 10;
|
||||
this.topHeight = topHeight;
|
||||
});
|
||||
},
|
||||
handleScroll() {
|
||||
var scrollTop = this.$refs.listBox.scrollTop;
|
||||
let topHeight = this.$refs.elTop[0].offsetHeight - 10;
|
||||
var offsetTop = 0;
|
||||
if (scrollTop <= 200) {
|
||||
offsetTop = topHeight;
|
||||
} else {
|
||||
offsetTop = -(topHeight + 80);
|
||||
}
|
||||
this.topHeight = offsetTop;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.list.length > 0) {
|
||||
this.box = this.$refs.listBox;
|
||||
}
|
||||
if (this.type == "publish") {
|
||||
this.styleWidth = "width:33.3333333%;";
|
||||
} else {
|
||||
this.styleWidth = "width:25%;";
|
||||
}
|
||||
},
|
||||
watch: { //这里是重点,用到了loadsh处理函数
|
||||
type: function () {
|
||||
},
|
||||
list: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
this.currentList = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.divids {
|
||||
color: #dcdcdc;
|
||||
margin: 0px 3px;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 12px;
|
||||
width: calc(100% - 24px);
|
||||
height: calc(100vh - 148px);
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .top {
|
||||
padding: 11px 0 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list li .top .left {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list li .top .left .title {
|
||||
font-size: 16px;
|
||||
color: #378DEC;
|
||||
line-height: 18px;
|
||||
/*margin-bottom: 8px;*/
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list li .top .right .name {
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list li .top .left .description, .list li .top .right .time {
|
||||
color: #999999;
|
||||
line-height: 15px;
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
/*float: left;*/
|
||||
}
|
||||
|
||||
.list li .top .left .description {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list li .top .left .description .line {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #E8E8E8;
|
||||
}
|
||||
|
||||
.list li .top .left .description {
|
||||
width: calc(100% - 2px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li .top .left .steps {
|
||||
padding: 11px 0 13px;
|
||||
}
|
||||
|
||||
.list li .top .left .steps, .list li .bottom {
|
||||
line-height: 15px;
|
||||
color: #808080;
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.list li .bottom {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.list li .top .left .steps {
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
|
||||
.list li .menu li {
|
||||
width: auto;
|
||||
border: none;
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.list li .menu .text {
|
||||
padding: 0 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con .img {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.con .text {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.options_op {
|
||||
/*width: 25%;*/
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.options_op .icon {
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.options_op .label {
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
|
||||
.knowlage-icon {
|
||||
font-size: 13px;
|
||||
float: right;
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
bottom: 6px;
|
||||
}
|
||||
|
||||
.publicstate {
|
||||
float: right;
|
||||
margin-right: 22px;
|
||||
}
|
||||
</style>
|
||||
68
com.actionsoft.apps.kms.mobile/components/radio.vue
Normal file
68
com.actionsoft.apps.kms.mobile/components/radio.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<van-radio-group v-model="radio">
|
||||
<van-cell-group>
|
||||
<van-cell title="最新发布" clickable @click="radio = '1'">
|
||||
<van-radio name="1">
|
||||
<template #icon="props">
|
||||
<span v-html="props.checked ? activeIcon : inactiveIcon"></span>
|
||||
</template>
|
||||
</van-radio>
|
||||
</van-cell>
|
||||
<van-cell title="最高讨论" clickable @click="radio = '2'">
|
||||
<van-radio name="2">
|
||||
<template #icon="props">
|
||||
<span v-html="props.checked ? activeIcon : inactiveIcon"></span>
|
||||
</template>
|
||||
</van-radio>
|
||||
</van-cell>
|
||||
<van-cell title="最高阅读" clickable @click="radio = '3'">
|
||||
<van-radio name="3">
|
||||
<template #icon="props">
|
||||
<span v-html="props.checked ? activeIcon : inactiveIcon"></span>
|
||||
</template>
|
||||
</van-radio>
|
||||
</van-cell>
|
||||
<van-cell title="最高评分" :style="activeColor ? 'color:#378dec;' : ''" clickable @click="radio = '4'">
|
||||
<van-radio name="4">
|
||||
<template #icon="props">
|
||||
<span v-html="props.checked ? activeIcon : inactiveIcon"></span>
|
||||
</template>
|
||||
</van-radio>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'radio',
|
||||
data () {
|
||||
return {
|
||||
radio: '1',
|
||||
activeColor: '',
|
||||
inactiveColor: '',
|
||||
activeIcon: '<i class="awsui-iconfont" style="color:#378dec;margin-right:5px;"></i>',
|
||||
inactiveIcon: '<i class="awsui-iconfont" style="color:#fefefe;margin-right:5px;"></i>'
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.van-cell__value {
|
||||
margin-left: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
padding: 10px 0 10px 17px !important;
|
||||
}
|
||||
|
||||
.van-cell__title, .van-cell__value {
|
||||
-webkit-box-flex: none;
|
||||
-webkit-flex: none;
|
||||
flex: none;
|
||||
}
|
||||
</style>
|
||||
814
com.actionsoft.apps.kms.mobile/components/search.vue
Normal file
814
com.actionsoft.apps.kms.mobile/components/search.vue
Normal file
@ -0,0 +1,814 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<van-cell-group>
|
||||
<form action="/">
|
||||
<van-search v-model="title" :disabled="!isFullsearchAppActive" :placeholder="isFullsearchAppActive?'请输入文件内容关键词...':'全文检索应用不可用,无法使用该功能'" show-action @search="onSearch" @input="onInput"
|
||||
@clear="onClear">
|
||||
<div slot="action" >
|
||||
<i @click="showSearchDetail" class="awsui-iconfont" style="color:#1e1e1e;position: absolute;right: 35px;"></i>
|
||||
<i @click="showSearchType" class="awsui-iconfont" style="color:#1e1e1e;"></i>
|
||||
</div>
|
||||
</van-search>
|
||||
<van-popup v-model="show" position="right" :style="{ width: '90%' }">
|
||||
<van-cell-group :border="false" class="search-cell">
|
||||
<div class="detail_head">
|
||||
<span class="detail_cancel" @click="cancelDetail">取消</span>
|
||||
<span style="font-size: 15px;">详细搜索</span>
|
||||
<span class="detail_rest" @click="reset">重置</span>
|
||||
</div>
|
||||
<!--<van-field v-model="creater" label="发布人" placeholder="请输入发布人姓名"/>-->
|
||||
|
||||
<van-field type="text"
|
||||
label="发布人"
|
||||
v-model="searchUerText"
|
||||
@focus="showUserDropdown=true"
|
||||
@blur="handleUserBlur"
|
||||
@keydown.up="navigateUpUser"
|
||||
@keydown.down="navigateDownUser"
|
||||
@keydown.enter="selectUserOptions"
|
||||
placeholder="请输入发布人"
|
||||
class="search-input"/>
|
||||
<!-- 下拉列表 -->
|
||||
<div v-if="showUserDropdown" class="dropdown-menuuser">
|
||||
<div
|
||||
v-for="(option, index) in filteredUserOptions"
|
||||
:key="index"
|
||||
class="dropdown-itemuser"
|
||||
@click="selectUserOptions(option)"
|
||||
:class="{ 'dropdown-item-activeuser': selectedUserIndex === index }"
|
||||
>
|
||||
{{ option.text }}
|
||||
</div>
|
||||
</div>
|
||||
<van-field style="display: none" v-model="selectedUser" label="人员ID" />
|
||||
|
||||
<van-field readonly v-model="startDateTitle" label="起始日期" placeholder="请选择起始日期"
|
||||
@click="startDatePopup = true"/>
|
||||
<van-popup v-model="startDatePopup" position="bottom" style="height:300px" get-container="body">
|
||||
<van-datetime-picker v-model="currentStartDate" type="date" :max-date="startMaxDate"
|
||||
@confirm="confirmStartDate" @cancel="cancelStartDate" :show-toolbar="true"
|
||||
cancel-button-text="清除"/>
|
||||
</van-popup>
|
||||
<van-field readonly v-model="endDateTitle" label="结束日期" placeholder="请选择结束日期" @click="endDatePopup = true"/>
|
||||
<van-popup v-model="endDatePopup" position="bottom" style="height:300px" get-container="body">
|
||||
<van-datetime-picker v-model="currentEndDate" :min-date="endMinDate" type="date" :max-date="endMaxDate"
|
||||
@confirm="confirmEndDate" @cancel="cancelEndDate" :show-toolbar="true"
|
||||
cancel-button-text="清除"/>
|
||||
</van-popup>
|
||||
|
||||
<van-field type="text"
|
||||
label="发布部门"
|
||||
v-model="searchText"
|
||||
@focus="showDropdown = true"
|
||||
@blur="handleBlur"
|
||||
@keydown.up="navigateUp"
|
||||
@keydown.down="navigateDown"
|
||||
@keydown.enter="selectOption"
|
||||
placeholder="请输入发布部门"
|
||||
class="search-input"/>
|
||||
<!-- 下拉列表 -->
|
||||
<div v-if="showDropdown" class="dropdown-menu">
|
||||
<div
|
||||
v-for="(option, index) in filteredOptions"
|
||||
:key="index"
|
||||
class="dropdown-item"
|
||||
@click="selectOption(option)"
|
||||
:class="{ 'dropdown-item-active': selectedIndex === index }"
|
||||
>
|
||||
{{ option.text }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-field style="display: none" v-model="selectedDep"/>
|
||||
|
||||
<van-field v-model="knwlName" label="知识名称" placeholder="请输入知识名称"/>
|
||||
<!--<van-field v-model="knwlTag" label="标签" placeholder="请输入知识标签"/>-->
|
||||
<div class="footer">
|
||||
<van-button style="width: 85%;" native-type="button" size="small" type="info" @click="onDetailSearch">查询</van-button>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model="typeShow" position="right" :style="{ width: ' calc(85% - 10px)',height:'100%',padding:'10px 10px' }">
|
||||
<div class="schema_head">
|
||||
<span class="schema_cancel" @click="cancelSchema">取消</span>
|
||||
<span style="font-size: 15px;">元数据</span>
|
||||
<span class="schema_rest" @click="resetSchema">重置</span>
|
||||
</div>
|
||||
<ul class="list" style="height: calc(100% - 96px);overflow: hidden;overflow-y: auto">
|
||||
<li v-for="(item,index) in schemaList" :key="index">
|
||||
<div :class="item.isNullable==1?'title':'title required' " >
|
||||
{{item.schemaTitle}}
|
||||
<span v-show="item.showType==1" @click="clearData(item)" style="float: right">清空</span>
|
||||
</div>
|
||||
<div class="con">
|
||||
<span v-show="item.showType<2" class="classify"
|
||||
:style="(index+1)%3===0?'width: calc(100% / 3 - 17px); margin-right:1px;':''"
|
||||
v-for="(el,index) in item.attrList" :key="index" @click="onClassify(el,item)"
|
||||
:class="{classActive:el.active}">
|
||||
<label class="name">{{el.attrTitle}}</label>
|
||||
</span>
|
||||
<div v-show="item.showType==2">
|
||||
<van-field v-model="item.value" placeholder="请输入..." />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="schema_footer">
|
||||
<van-button style="width: 85%" native-type="button" size="small" type="info" @click="schemaSearch">确定</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</form>
|
||||
</van-cell-group>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
import { Popup, Field, Cell, CellGroup, Empty } from 'vant';
|
||||
|
||||
export default {
|
||||
name: 'search',
|
||||
components: {
|
||||
[Popup.name]: Popup,
|
||||
[Field.name]: Field,
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup,
|
||||
[Empty.name]: Empty
|
||||
},
|
||||
props: {
|
||||
keyword: { // 必须要使用value
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
filterSetting:{
|
||||
type:Object,
|
||||
default:()=>{
|
||||
return {};
|
||||
}
|
||||
},
|
||||
isFullsearchAppActive:Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dimensionResult:"",
|
||||
typeShow:false,
|
||||
show: false,
|
||||
title: this.keyword,
|
||||
creater: '',
|
||||
createrDept: '',
|
||||
knwlName: '',
|
||||
publishDep: '',
|
||||
knwlTag: '',
|
||||
currentEndDate: new Date(),
|
||||
startMaxDate: new Date(),
|
||||
endMaxDate: new Date(),
|
||||
endMinDate:new Date(),
|
||||
startDatePopup: false,
|
||||
endDatePopup: false,
|
||||
startDateTitle: '',
|
||||
endDateTitle: '',
|
||||
schemaList:[],
|
||||
|
||||
|
||||
/**********************发布部门*********************/
|
||||
|
||||
selectedOption: null,
|
||||
searchText: '',
|
||||
showDropdown: false,
|
||||
selectedIndex: -1,
|
||||
options: [
|
||||
],
|
||||
selectedDep:"",
|
||||
/***********************发布人****************************/
|
||||
selectedUserOption: null,
|
||||
searchUerText: '',
|
||||
showUserDropdown: false,
|
||||
selectedUserIndex: -1,
|
||||
useroptions: [
|
||||
],
|
||||
selectedUser:""
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
||||
filteredOptions() {
|
||||
return this.options.filter(option =>
|
||||
option.text.toLowerCase().includes(this.searchText.toLowerCase())
|
||||
);
|
||||
},
|
||||
filteredUserOptions() {
|
||||
return this.useroptions.filter(option =>
|
||||
option.text.toLowerCase().includes(this.searchUerText.toLowerCase())
|
||||
);
|
||||
},
|
||||
currentStartDate: {
|
||||
get() {
|
||||
let now = new Date()
|
||||
now.setMonth(now.getMonth() - 1)
|
||||
return now
|
||||
},
|
||||
set() {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**************************发布部门********************************/
|
||||
handleBlur() {
|
||||
// 可以在此处添加逻辑,例如如果搜索框为空则隐藏下拉列表
|
||||
setTimeout(() => {
|
||||
if (!this.searchText) {
|
||||
this.showDropdown = false;
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
}, 200); // 延迟是为了等待可能的点击事件(如果点击在了下拉列表上,则不隐藏)
|
||||
},
|
||||
navigateUp() {
|
||||
if (this.selectedIndex > 0) {
|
||||
this.selectedIndex -= 1;
|
||||
} else if (this.selectedIndex === -1 && this.filteredOptions.length > 0) {
|
||||
this.selectedIndex = this.filteredOptions.length - 1;
|
||||
}
|
||||
this.scrollToSelected();
|
||||
},
|
||||
navigateDown() {
|
||||
if (this.selectedIndex < this.filteredOptions.length - 1) {
|
||||
this.selectedIndex += 1;
|
||||
} else {
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
this.scrollToSelected();
|
||||
},
|
||||
scrollToSelected() {
|
||||
const dropdownMenu = this.$el.querySelector('.dropdown-menu');
|
||||
if (dropdownMenu && this.selectedIndex !== -1) {
|
||||
const item = dropdownMenu.querySelector('.dropdown-item-active') || dropdownMenu.children[0];
|
||||
item.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||
}
|
||||
},
|
||||
selectOption(option) {
|
||||
this.showDropdown = false;
|
||||
this.selectedIndex = -1;
|
||||
this.selectedOption = option.text;
|
||||
this.searchText = option.text; // 回填到输入框
|
||||
this.selectedDep=option.value;
|
||||
},
|
||||
|
||||
/********************发布部门结束*********************************/
|
||||
|
||||
|
||||
/**********************发布人开始***************************************/
|
||||
handleUserBlur() {
|
||||
// 可以在此处添加逻辑,例如如果搜索框为空则隐藏下拉列表
|
||||
setTimeout(() => {
|
||||
if (!this.searchUerText) {
|
||||
this.showUserDropdown=false;
|
||||
this.selectedUserIndex=-1;
|
||||
}
|
||||
}, 200); // 延迟是为了等待可能的点击事件(如果点击在了下拉列表上,则不隐藏)
|
||||
},
|
||||
navigateUpUser() {
|
||||
if (this.selectedUserIndex > 0) {
|
||||
this.selectedUserIndex -= 1;
|
||||
} else if (this.selectedUserIndex === -1 && this.filteredUserOptions.length > 0) {
|
||||
this.selectedUserIndex = this.filteredUserOptions.length - 1;
|
||||
}
|
||||
this.scrollToSelectedUser();
|
||||
},
|
||||
navigateDownUser() {
|
||||
if (this.selectedUserIndex < this.filteredUserOptions.length - 1) {
|
||||
this.selectedUserIndex += 1;
|
||||
} else {
|
||||
this.selectedUserIndex = -1;
|
||||
}
|
||||
this.scrollToSelectedUser();
|
||||
},
|
||||
scrollToSelectedUser() {
|
||||
const dropdownUserMenu = this.$el.querySelector('.dropdown-menuuser');
|
||||
if (dropdownUserMenu && this.selectedUserIndex !== -1) {
|
||||
const item = dropdownUserMenu.querySelector('.dropdown-item-activeuser') || dropdownUserMenu.children[0];
|
||||
item.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||
}
|
||||
},
|
||||
selectUserOptions(option) {
|
||||
this.showUserDropdown=false;
|
||||
this.selectedUserIndex=-1;
|
||||
this.selectUserOption=option.text;
|
||||
this.searchUerText=option.text; // 回填到输入框
|
||||
this.selectedUser=option.value;
|
||||
},
|
||||
|
||||
|
||||
/**********************发布人结束***************************************/
|
||||
|
||||
onSearch(value) {
|
||||
if(value!=''){
|
||||
this.$emit('allSearch', value,0);
|
||||
}else{
|
||||
this.$emit('searchfunc');
|
||||
}
|
||||
},
|
||||
onInput(value) {
|
||||
// if(value!=''){
|
||||
// this.$emit('allSearch', value,0);
|
||||
// }else{
|
||||
// this.$emit('searchfunc');
|
||||
// }
|
||||
},
|
||||
onClear() {
|
||||
document.title = '知识门户'
|
||||
},
|
||||
showSearchType(){
|
||||
this.typeShow = true;
|
||||
},
|
||||
showSearchDetail() {
|
||||
this.show = true
|
||||
},
|
||||
onCell(event, item, index, checkbox){
|
||||
|
||||
},
|
||||
reset() {
|
||||
this.title = ''
|
||||
this.from = ''
|
||||
this.startDateTitle = ''
|
||||
this.endDateTitle = '';
|
||||
// this.show = false;
|
||||
this.rest = true;
|
||||
this.creater='';
|
||||
this.knwlName='';
|
||||
this.knwlTag='';
|
||||
this.filterSetting.cardName = "";
|
||||
this.filterSetting.publishTime = "";
|
||||
this.filterSetting.publishUser = "";
|
||||
|
||||
this.filterSetting.selectedDep = "";
|
||||
this.filterSetting.selectedUser = "";
|
||||
|
||||
this.searchText = "";
|
||||
this.searchUerText = "";
|
||||
|
||||
this.filterSetting.tags = encodeURIComponent(JSON.stringify([]));
|
||||
this.filterSetting.schemaMetaData = encodeURIComponent(JSON.stringify({
|
||||
'01': [],
|
||||
'2': []
|
||||
}));
|
||||
this.$emit('searchfunc',0);
|
||||
},
|
||||
cancelDetail(){
|
||||
this.show = false;
|
||||
},
|
||||
onDetailSearch() {
|
||||
// 参数-标签
|
||||
let tags = [];
|
||||
if (this.knwlTag != '') {
|
||||
tags[0] = this.knwlTag;
|
||||
}
|
||||
let publicTime = {
|
||||
"startPublishTime":this.startDateTitle,
|
||||
"endPublishTime":this.endDateTitle
|
||||
}
|
||||
this.filterSetting.cardName = encodeURIComponent(this.knwlName);
|
||||
this.filterSetting.publishTime = JSON.stringify(publicTime);
|
||||
this.filterSetting.publishUser = this.selectedUser;
|
||||
this.filterSetting.tags = encodeURIComponent(JSON.stringify(tags));
|
||||
//获取发布部门
|
||||
this.filterSetting.departId = this.selectedDep;
|
||||
this.show = false
|
||||
this.$emit('searchfunc',0);
|
||||
},
|
||||
cancelStartDate() {
|
||||
this.startDateTitle = '';
|
||||
const now = new Date();
|
||||
let endY = new Date(now.setDate(now.getDate() - 365*10));
|
||||
this.endMinDate = endY;
|
||||
this.startDatePopup = false
|
||||
},
|
||||
confirmStartDate(val) {
|
||||
this.startDateTitle = val.getFullYear() + '-' + (val.getMonth() + 1) + '-' + val.getDate();
|
||||
this.endMinDate = val;
|
||||
this.startDatePopup = false
|
||||
},
|
||||
cancelEndDate() {
|
||||
this.endDateTitle = ''
|
||||
this.endDatePopup = false
|
||||
},
|
||||
confirmEndDate(val) {
|
||||
this.endDateTitle = val.getFullYear() + '-' + (val.getMonth() + 1) + '-' + val.getDate();
|
||||
if(this.startDateTitle==''){
|
||||
this.startMaxDate=new Date(this.endDateTitle );
|
||||
}
|
||||
this.endDatePopup = false
|
||||
},
|
||||
getSchema(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_search_schema_attr_list_json"
|
||||
|
||||
},
|
||||
}).then(function (r){
|
||||
|
||||
if (r.result == "error") {
|
||||
} else{
|
||||
let tmp = r.data;
|
||||
let tmpSchemaList = [];
|
||||
for(let key in tmp){
|
||||
let tmpV = tmp[key];
|
||||
let attrl = tmpV['attrList'];
|
||||
attrl.forEach((ob, index) => {
|
||||
ob.active = false;
|
||||
})
|
||||
if(tmpV.showType==2){
|
||||
tmpV.schemaId = key;
|
||||
}
|
||||
tmpSchemaList.push(tmp[key]);
|
||||
}
|
||||
that.schemaList = tmpSchemaList;
|
||||
}
|
||||
});
|
||||
},
|
||||
schemaSearch(){
|
||||
this.typeShow = false;
|
||||
// 取值-元数据
|
||||
let newschemaMetaData01=[];
|
||||
let schemaMetaData2=[];
|
||||
for(let k=0;k<this.schemaList.length;k++){
|
||||
let obj = this.schemaList[k];
|
||||
if(obj.showType==2){
|
||||
let val = obj.value?obj.value:'';
|
||||
if(obj.isNullable==0&&val.trim()==''){
|
||||
continue;
|
||||
}
|
||||
schemaMetaData2[schemaMetaData2.length] = {
|
||||
metaValue: val.trim(),
|
||||
schemaId: obj.schemaId
|
||||
};
|
||||
}else{
|
||||
let attrList = obj.attrList;
|
||||
let activeL = 0;
|
||||
for(let j=0;j<attrList.length;j++){
|
||||
let ob = attrList[j];
|
||||
if(ob.active){
|
||||
activeL++;
|
||||
newschemaMetaData01.push({
|
||||
attrId:ob.id,
|
||||
schemaId:ob.schemaId
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
let schemaMetaData ={
|
||||
'01': newschemaMetaData01, // 复选框和单选按钮
|
||||
'2': schemaMetaData2
|
||||
}
|
||||
this.filterSetting.schemaMetaData = encodeURIComponent(JSON.stringify(schemaMetaData));
|
||||
this.onDetailSearch();
|
||||
},
|
||||
resetSchema(){
|
||||
for(let k=0;k<this.schemaList.length;k++){
|
||||
let obj = this.schemaList[k];
|
||||
if(obj.showType==2){
|
||||
if( obj.value){
|
||||
obj.value = "";
|
||||
}
|
||||
}else{
|
||||
let attrList = obj.attrList;
|
||||
attrList.forEach((ob, index) => {
|
||||
ob.active = false;
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
cancelSchema(){
|
||||
this.typeShow = false;
|
||||
this.resetSchema();
|
||||
},
|
||||
clearData(itemTmp){
|
||||
itemTmp.attrList.forEach((ob, index) => {
|
||||
ob.active = false;
|
||||
})
|
||||
},
|
||||
onClassify(el,itemTmp) {
|
||||
if(!el.active){
|
||||
if(itemTmp.showType==1){//单选
|
||||
itemTmp.attrList.forEach((ob, index) => {
|
||||
ob.active = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
el.active = !el.active;
|
||||
},
|
||||
|
||||
|
||||
/*****************************选择组织*********************************/
|
||||
//查询发布部门数据
|
||||
getDeptment(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_search_getdeptment_list_json"
|
||||
},
|
||||
}).then(function (r){
|
||||
if (r.result == "error") {
|
||||
} else{
|
||||
let tmp = r.data.data;
|
||||
for(var i=0;i<tmp.length;i++){
|
||||
that.options.push({ text: tmp[i].text, value: tmp[i].value});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取人员数据
|
||||
getUserInfo(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_search_getuser_list_json"
|
||||
},
|
||||
}).then(function (r){
|
||||
if (r.result == "error") {
|
||||
} else{
|
||||
let tmp = r.data.data;
|
||||
for(var i=0;i<tmp.length;i++){
|
||||
that.useroptions.push({ text: tmp[i].text, value: tmp[i].value});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
},
|
||||
mounted(){
|
||||
const now = new Date();
|
||||
let endY = new Date(now.setDate(now.getDate() - 365*10));
|
||||
this.endMinDate = endY;
|
||||
this.getSchema();
|
||||
this.getDeptment();
|
||||
this.getUserInfo();
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search .van-popup--right {
|
||||
transform: translate3d(0, 0, 0);
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.search-cell {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.search-cell .van-cell {
|
||||
color: #707070;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 10px ;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.search-cell .van-field__control {
|
||||
padding: 0 5px;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
color: #707070;
|
||||
-webkit-appearance: none;
|
||||
border: 0.33px solid #e9e9e9 !important;
|
||||
}
|
||||
|
||||
.dimension {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dimension .content {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
height: calc(100% - 105px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dimension .content .item {
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.dimension .content .item .checkbox {
|
||||
width: 16px;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
|
||||
.dimension .content .divide {
|
||||
background: #e9e9e9;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.dimension .content .van-cell {
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.dimension .content .van-cell:last-child {
|
||||
/*border-bottom: 0;*/
|
||||
}
|
||||
|
||||
.dimension .content .van-cell .awsui-iconfont {
|
||||
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.dimension .content .van-cell .default {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
.treeDimension-noPerm,.treeHotspot-noPerm{
|
||||
color: #CCCCCC;
|
||||
}
|
||||
.treeDimension,.treeHotspot{
|
||||
color: #03A76B;
|
||||
}
|
||||
.treeHotspot {
|
||||
color:#f3b731 !important;
|
||||
}
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 12px 0 4px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .title, .tag .title {
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
background: none;
|
||||
width: 100%;
|
||||
line-height: 19px;
|
||||
color: #646566;
|
||||
}
|
||||
|
||||
.list li .con, .tag .con {
|
||||
padding: 12px 0 0;
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
.list li .con .classify, .tag .con .classify {
|
||||
width: calc(100% / 3 - 16px - 10px);
|
||||
height: 30px;
|
||||
line-height: 16px;
|
||||
padding: 5px 8px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 2px;
|
||||
background: #F5F5F5;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tag .con .classify {
|
||||
height: auto;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.list li .con .classify .name, .tag .con .classify .name {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
.con .classActive {
|
||||
background: #E1EFFF !important;
|
||||
color: #1B6EC9;
|
||||
}
|
||||
.list li .con .classify:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.classify .name{
|
||||
font-size: 13px;
|
||||
}
|
||||
.required:before{
|
||||
content: '*';
|
||||
color: red;
|
||||
}
|
||||
.schema_head,.detail_head{
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
height: 31px;
|
||||
padding: 10px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
.schema_cancel,.detail_cancel{
|
||||
float: left;
|
||||
color:#646566 ;
|
||||
}
|
||||
.schema_rest,.detail_rest{
|
||||
float: right;
|
||||
color: #1b6ec9;
|
||||
}
|
||||
.schema_footer{
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
width: calc(100% - 20px);
|
||||
text-align: center;
|
||||
}
|
||||
.van-search__content{
|
||||
padding-right: 16px;
|
||||
}
|
||||
.selected-value{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/*********************发布部门*******************************/
|
||||
.dropdown-menu {
|
||||
/*position: absolute;*/
|
||||
/*top: 100%;*/
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropdown-item-active {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.selected-value {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
margin-top: 10px;
|
||||
}
|
||||
/*****************发布人开始****************/
|
||||
|
||||
.dropdown-menuuser {
|
||||
/*position: absolute;*/
|
||||
/*top: 100%;*/
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dropdown-itemuser {
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropdown-item-activeuser {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.selected-valueuser {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
/*****************发布人结束****************/
|
||||
</style>
|
||||
72
com.actionsoft.apps.kms.mobile/components/tabbar.vue
Normal file
72
com.actionsoft.apps.kms.mobile/components/tabbar.vue
Normal file
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<van-tabbar v-model="active" @change="changeTabbar" active-color="#3296fa" inactive-color="#333">
|
||||
<van-tabbar-item v-for="(item,index) in tabbars" :key="index" :to="(item.path)">
|
||||
<div class="van-tabbar-item__icon">
|
||||
<i class="awsui-iconfont" v-html="item.icon"></i>
|
||||
</div>
|
||||
<div class="van-tabbar-item__text">{{item.title}}</div>
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'tabbar',
|
||||
data () {
|
||||
return {
|
||||
active: 0,
|
||||
tabbars: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'knwlhome',
|
||||
title: '首页',
|
||||
icon: ''
|
||||
},
|
||||
{
|
||||
path: '/knwldir',
|
||||
name: 'knwldir',
|
||||
title: '目录',
|
||||
icon: ''
|
||||
},
|
||||
{
|
||||
path: '/myknwl',
|
||||
name: 'myknwl',
|
||||
title: '我的',
|
||||
icon: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeTabbar(){
|
||||
localStorage.setItem("activeTab",'');
|
||||
}
|
||||
},
|
||||
created () {
|
||||
if (this.$route.name === 'knwlhome') {
|
||||
this.active = 0
|
||||
} else if (this.$route.name === 'knwldir') {
|
||||
this.active = 1
|
||||
} else if (this.$route.name === 'myknwl') {
|
||||
this.active = 2
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style>
|
||||
.van-tabbar-item {
|
||||
text-align: center;
|
||||
color: #333333;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.van-tabbar-item__icon {
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.van-tabbar--fixed {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
}
|
||||
</style>
|
||||
35
com.actionsoft.apps.kms.mobile/main.js
Normal file
35
com.actionsoft.apps.kms.mobile/main.js
Normal file
@ -0,0 +1,35 @@
|
||||
// The Vue build version to load with the `import` command
|
||||
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import Vant from 'vant'
|
||||
import 'vant/lib/index.css'
|
||||
import axios from 'axios'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
|
||||
Vue.use(Vant)
|
||||
router.beforeEach((to, from, next) => { //修改title方法
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title
|
||||
}
|
||||
next()
|
||||
})
|
||||
// 设置浏览器标题
|
||||
Vue.directive('title', {
|
||||
inserted: function (el, binding) {
|
||||
document.title = el.dataset.title
|
||||
}
|
||||
})
|
||||
Vue.prototype.$ajax = axios
|
||||
Vue.config.productionTip = false
|
||||
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => {
|
||||
return h(App);
|
||||
},
|
||||
}).$mount('#app')
|
||||
172
com.actionsoft.apps.kms.mobile/pages/borrow-apply.vue
Normal file
172
com.actionsoft.apps.kms.mobile/pages/borrow-apply.vue
Normal file
@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<div class="borrow-apply">
|
||||
<van-form>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="applyName"
|
||||
required
|
||||
label="申请人"
|
||||
placeholder="请输入申请人"
|
||||
:rules="[{ required: true, message: '申请人不能为空' }]"
|
||||
/>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="knwlName"
|
||||
label="知识名称"
|
||||
placeholder="请输入知识名称"
|
||||
/>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="knwlPath"
|
||||
label="知识路径"
|
||||
placeholder=""
|
||||
/>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="admin"
|
||||
label="管理员"
|
||||
placeholder=""
|
||||
/>
|
||||
<van-field-select
|
||||
class="border"
|
||||
label="借阅控制"
|
||||
required
|
||||
placeholder="请选择"
|
||||
v-model="control"
|
||||
:columns="controlOption"
|
||||
/>
|
||||
<van-field
|
||||
v-show="showReadTimes"
|
||||
class="border"
|
||||
v-model="readTimes"
|
||||
required
|
||||
label="阅读次数"
|
||||
placeholder=""
|
||||
:rules="[{ required: true, message: '不能为空' }]"
|
||||
/>
|
||||
<div v-show="showDate">
|
||||
<van-field-date
|
||||
class="border"
|
||||
v-model="startDate"
|
||||
:minDate="minDate"
|
||||
:maxDate="maxDate"
|
||||
type="date"
|
||||
required
|
||||
label="开始日期"
|
||||
placeholder="请选择日期"
|
||||
/>
|
||||
<van-field-date
|
||||
class="border"
|
||||
v-model="endDate"
|
||||
required
|
||||
label="结束日期"
|
||||
type="date"
|
||||
placeholder="请选择日期"
|
||||
/>
|
||||
</div>
|
||||
<van-field
|
||||
class="border"
|
||||
v-model="remarks"
|
||||
required
|
||||
:autosize="{ maxHeight: 100, minHeight: 100 }"
|
||||
type="textarea"
|
||||
label="备注"
|
||||
placeholder=""
|
||||
/>
|
||||
<div class="footer">
|
||||
<!--<van-button round block type="info" native-type="submit">
|
||||
提交
|
||||
</van-button>-->
|
||||
<van-button type="danger">作废</van-button>
|
||||
<van-button plain type="info" @click="onSave">保存</van-button>
|
||||
<van-button type="info" @click="onHandle">办理</van-button>
|
||||
<van-button type="default">更多</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vanFieldSelect from '@/components/fieldSelect'
|
||||
import vanFieldDate from '@/components/fieldDate'
|
||||
export default {
|
||||
name: 'borrow-approve',
|
||||
components: {
|
||||
vanFieldSelect,
|
||||
vanFieldDate
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
applyName: '司马懿',
|
||||
knwlName: 'AWS访问连接池参数调整',
|
||||
knwlPath: '知识目录 > 公司 > 重要文件',
|
||||
admin: '张飞',
|
||||
control: '阅读次数',
|
||||
controlOption: ['阅读次数', '有效日期'],
|
||||
showReadTimes: true,
|
||||
readTimes: '3次',
|
||||
showDate: false,
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
minDate: new Date(2020, 0, 1),
|
||||
maxDate: new Date(2025, 10, 1),
|
||||
remarks: '',
|
||||
id: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSave (values) {
|
||||
console.log('submit', values)
|
||||
},
|
||||
onHandle () {
|
||||
this.$router.push({
|
||||
name: 'borrow-approve',
|
||||
params: {
|
||||
id: this.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
control: function () {
|
||||
if (this.control === '阅读次数') {
|
||||
this.showReadTimes = true
|
||||
this.showDate = false
|
||||
} else {
|
||||
this.showReadTimes = false
|
||||
this.showDate = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.borrow-apply {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
width: calc(100% / 4 - 12px);
|
||||
margin-right: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.footer .van-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
248
com.actionsoft.apps.kms.mobile/pages/borrow-approve.vue
Normal file
248
com.actionsoft.apps.kms.mobile/pages/borrow-approve.vue
Normal file
@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<div class="borrow-approve">
|
||||
<van-form @submit="onSubmit" style="padding:0 16px;">
|
||||
<van-field
|
||||
v-model="applyName"
|
||||
label="申请人"
|
||||
/>
|
||||
<van-field
|
||||
v-model="knwlName"
|
||||
label="知识名称"
|
||||
/>
|
||||
<van-field
|
||||
v-model="knwlPath"
|
||||
label="知识路径"
|
||||
/>
|
||||
<van-field
|
||||
v-model="admin"
|
||||
label="管理员"
|
||||
/>
|
||||
<van-field
|
||||
v-model="control"
|
||||
label="借阅控制"
|
||||
/>
|
||||
<van-field
|
||||
v-model="startDate"
|
||||
label="开始日期"
|
||||
/>
|
||||
<van-field
|
||||
v-model="endDate"
|
||||
label="结束日期"
|
||||
/>
|
||||
<van-field
|
||||
v-model="remarks"
|
||||
type="textarea"
|
||||
label="备注"
|
||||
:autosize="{ maxHeight: 30, minHeight: 30 }"
|
||||
/>
|
||||
</van-form>
|
||||
<div class="divide"></div>
|
||||
<div class="steps" :class="recordList.length==1?'center':''">
|
||||
<span class="title" style="margin-bottom: 15px;">审批记录</span>
|
||||
<div class="items" v-for="(item,index) in recordList" :key="index">
|
||||
<span class="left">
|
||||
<label class="head">
|
||||
<img :src="item.headImg" alt="">
|
||||
</label>
|
||||
<label class="name">{{item.name}}</label>
|
||||
</span>
|
||||
<span class="right">
|
||||
<label class="title" :style="index==recordList.length-1?'padding:0':''">{{item.title}}</label>
|
||||
<label class="date">{{item.date}}</label>
|
||||
<label class="circle" :class="{'active':currentActive==index}"></label>
|
||||
<label class="line" :style="index==recordList.length-1?'height:30px;':''"></label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button type="danger">不同意</van-button>
|
||||
<van-button type="info">同意</van-button>
|
||||
<van-button type="default">更多</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vanFieldSelect from '@/components/fieldSelect'
|
||||
import vanFieldDate from '@/components/fieldDate'
|
||||
|
||||
export default {
|
||||
name: 'borrow-approve',
|
||||
components: {
|
||||
vanFieldSelect,
|
||||
vanFieldDate
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
applyName: '司马懿',
|
||||
knwlName: 'AWS访问连接池参数调整',
|
||||
knwlPath: '知识目录 > 公司 > 重要文件',
|
||||
admin: '张飞',
|
||||
control: '有效日期',
|
||||
showDate: true,
|
||||
startDate: '2020-05-01',
|
||||
endDate: '2020-05-30',
|
||||
remarks: '申请借阅',
|
||||
currentActive: 1,
|
||||
recordList: [
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
title: '借阅申请 (提交)',
|
||||
date: '2019-12-10 08:22:23'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/logo.png'),
|
||||
name: '司马懿',
|
||||
title: '借阅审批 (正在办理)',
|
||||
date: '2019-12-10 09:32:17'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit (values) {
|
||||
console.log('submit', values)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.borrow-approve {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.borrow-approve .van-form .van-cell {
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.borrow-approve .van-form .van-cell:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
width: calc(100% / 3 - 12px);
|
||||
margin-right: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.footer .van-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.borrow-approve .steps {
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
padding: 16px 14px 0;
|
||||
margin-bottom: 63px;
|
||||
}
|
||||
|
||||
.borrow-approve .center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .items {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/*.borrow-approve .steps .active {
|
||||
color: #3CA772;
|
||||
background-color: #3CA772;
|
||||
}*/
|
||||
.borrow-approve .steps .left {
|
||||
width: 46px;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .left .head {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #e0e0e0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .left .head img {
|
||||
max-width: 70%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .left .name {
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .right {
|
||||
width: calc(100% - 90px);
|
||||
padding: 10px 0 40px 40px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .title {
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
min-height: 20px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .date {
|
||||
color: #666;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .items .circle, .borrow-approve .steps .active .circle {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 11px;
|
||||
background-color: #3CA772;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .active .circle {
|
||||
background-color: #3CA772;
|
||||
}
|
||||
|
||||
.borrow-approve .steps .items .line {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 16px;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
</style>
|
||||
560
com.actionsoft.apps.kms.mobile/pages/know-detail-back.vue
Normal file
560
com.actionsoft.apps.kms.mobile/pages/know-detail-back.vue
Normal file
@ -0,0 +1,560 @@
|
||||
<template>
|
||||
<div class="detail">
|
||||
<div class="content">
|
||||
<div class="items">
|
||||
<span class="top">{{title}}</span>
|
||||
<div>
|
||||
<span class="desTitle">{{desTitle}}</span>
|
||||
<span class="description">{{description}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divide"></div>
|
||||
<div class="items" style="padding:0;">
|
||||
<div class="title">知识附件</div>
|
||||
<van-swipe class="my-swipe" :show-indicators="false">
|
||||
<van-swipe-item v-for="(el,index) in resultList" :key="index">
|
||||
<ul class="list">
|
||||
<li v-for="(item,index) in el" :key="index" :style="index%2!=0?'border-bottom:0':''">
|
||||
<div class="icon">
|
||||
<i class="awsui-iconfont" v-html="item.icon"></i>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="title">
|
||||
{{item.file}}
|
||||
</div>
|
||||
<div class="description">
|
||||
<label>下载次数:
|
||||
<font>{{item.times}}次</font>
|
||||
</label>
|
||||
<label class="line">|</label>
|
||||
<label>
|
||||
<font>{{item.size}}</font>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span class="name">{{item.name}}</span>
|
||||
<span class="time">{{item.date}}</span>
|
||||
</div>
|
||||
</li>
|
||||
<div class="li-more" :style="el.length==1?'display:block':''">
|
||||
<div v-if="list.length==5" class="more">
|
||||
更多
|
||||
<i class="awsui-iconfont" style="font-size: 13px;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
|
||||
</div>
|
||||
<div class="divide"></div>
|
||||
<div class="items" style="padding:0;">
|
||||
<ul class="list">
|
||||
<li style="border-bottom:0;">
|
||||
<div class="icon" style="width:40px; height: 40px;">
|
||||
<img :src="userHeadImg" alt="">
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="title">
|
||||
{{userName}}
|
||||
</div>
|
||||
<div class="description">
|
||||
{{department}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<span class="name" style="color:#4A90E2;">{{evaluate.evaluateNum}}人评价</span>
|
||||
<span class="time" style="color:#4A90E2;">{{browseNum}}人浏览</span>
|
||||
</div>
|
||||
</li>
|
||||
<div class="center">
|
||||
<div class="left">
|
||||
<span class="score">{{score}}</span>
|
||||
<van-rate class="start" :size="10" void-icon="star" void-color="#ddd" v-model="start"/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="item">
|
||||
<div class="start">
|
||||
<van-rate :size="6" v-model="value" void-icon="star" void-color="#ddd"/>
|
||||
</div>
|
||||
<van-progress class="progress" color="#ffd21e" pivot-text="" :percentage="50"/>
|
||||
<div class="percentage">50%</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="start">
|
||||
<van-rate :size="6" :count="4" v-model="value" void-icon="star" void-color="#ddd"/>
|
||||
</div>
|
||||
<van-progress class="progress" color="#ffd21e" pivot-text="" :percentage="40"/>
|
||||
<div class="percentage">40%</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="start">
|
||||
<van-rate :size="6" :count="3" v-model="value" void-icon="star" void-color="#ddd"/>
|
||||
</div>
|
||||
<van-progress class="progress" color="#ffd21e" pivot-text="" :percentage="20"/>
|
||||
<div class="percentage">20%</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="start">
|
||||
<van-rate :size="6" :count="2" v-model="value" void-icon="star" void-color="#ddd"/>
|
||||
</div>
|
||||
<van-progress class="progress" color="#ffd21e" pivot-text="" :percentage="10"/>
|
||||
<div class="percentage">10%</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="start">
|
||||
<van-rate :size="6" :count="1" v-model="value" void-icon="star" void-color="#ddd"/>
|
||||
</div>
|
||||
<van-progress class="progress" color="#ffd21e" pivot-text="" :percentage="0"/>
|
||||
<div class="percentage">0%</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
您的评价:
|
||||
<van-rate :size="16" void-icon="star" void-color="#ddd" v-model="start"/>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="items" style="padding:0;">
|
||||
<ul class="list evaluate">
|
||||
<li v-for="(item,index) in evaluate.list" :key="index">
|
||||
<div class="icon" style="width:45px;">
|
||||
<img :src="item.headImg" alt="">
|
||||
</div>
|
||||
<div class="left">
|
||||
<span class="title">
|
||||
{{item.name}}
|
||||
</span>
|
||||
<span class="date">
|
||||
{{item.date}}
|
||||
</span>
|
||||
<div class="description">
|
||||
{{item.description}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<span class="headImg"><img :src="userHeadImg" alt=""></span>
|
||||
<van-field
|
||||
class="field border"
|
||||
v-model="message"
|
||||
center
|
||||
placeholder="请输入"
|
||||
>
|
||||
<template #button>
|
||||
<van-button size="small" type="info">提交</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'know-detail',
|
||||
data() {
|
||||
return {
|
||||
value: 0,
|
||||
title: 'AWS访问连接池参数调整',
|
||||
desTitle: '这是段落描述标题',
|
||||
description: '这里是正文内容的描述信息这里是正文内容的描述信息这里是正文内容的描述信息这里是正文内容的描述信息这里是正文内容的描述信息',
|
||||
list: [
|
||||
{
|
||||
id: 'know1',
|
||||
icon: '',
|
||||
file: '这里是文件名称.ppt',
|
||||
name: '司马懿',
|
||||
date: '2017-10-23 10:59',
|
||||
times: '23',
|
||||
size: '9.24k'
|
||||
},
|
||||
{
|
||||
id: 'know2',
|
||||
icon: '',
|
||||
file: '这里是文件名称.ppt',
|
||||
name: '司马懿',
|
||||
date: '2017-10-23 10:59',
|
||||
times: '23',
|
||||
size: '9.24k'
|
||||
},
|
||||
{
|
||||
id: 'know3',
|
||||
icon: '',
|
||||
file: '这里是文件名称.ppt',
|
||||
name: '司马懿',
|
||||
date: '2017-10-23 10:59',
|
||||
times: '23',
|
||||
size: '9.24k'
|
||||
},
|
||||
{
|
||||
id: 'know4',
|
||||
icon: '',
|
||||
file: '这里是文件名称.ppt',
|
||||
name: '司马懿',
|
||||
date: '2017-10-23 10:59',
|
||||
times: '23',
|
||||
size: '9.24k'
|
||||
},
|
||||
{
|
||||
id: 'know5',
|
||||
icon: '',
|
||||
file: '这里是文件名称.ppt',
|
||||
name: '司马懿',
|
||||
date: '2017-10-23 10:59',
|
||||
times: '23',
|
||||
size: '9.24k'
|
||||
}
|
||||
],
|
||||
resultList: [],
|
||||
userHeadImg: require('../assets/header.png'),
|
||||
department: '研发中心部',
|
||||
userName: '李善诗',
|
||||
score: '4.2', //评分
|
||||
start: 4, //星星数 必须是number类型
|
||||
browseNum: '320', //浏览人数
|
||||
evaluate: {
|
||||
evaluateNum: '9238', //评价人数
|
||||
list: [ //评价列表
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
date: '2019-12-10 08:22:23',
|
||||
description: '这里是评价内容描述这里是评价内容描述这里是评价内容描述这里是评价内容描述'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
date: '2019-12-10 08:22:23',
|
||||
description: '这里是评价内容描述这里是评价内容描述这里是评价内容描述这里是评价内容描述'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
date: '2019-12-10 08:22:23',
|
||||
description: '这里是评价内容描述这里是评价内容描述这里是评价内容描述这里是评价内容描述'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
date: '2019-12-10 08:22:23',
|
||||
description: '这里是评价内容描述这里是评价内容描述这里是评价内容描述这里是评价内容描述'
|
||||
}
|
||||
]
|
||||
},
|
||||
message: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getItemResult() {
|
||||
var chunk = 2 //每2个分一组
|
||||
var list = []
|
||||
if (this.list.length > 5) {
|
||||
list = this.list.slice(0, 5)
|
||||
} else {
|
||||
list = this.list
|
||||
}
|
||||
for (var i = 0, len = list.length; i < len; i += chunk) {
|
||||
this.resultList.push(list.slice(i, i + chunk))
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getItemResult()
|
||||
console.log(this.$route.params.id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.detail {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.detail .content {
|
||||
border-top: 1px solid #e9e9e9;
|
||||
color: #666;
|
||||
height: calc(100% - 51px);
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.items {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.items span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.top {
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
line-height: 22px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.desTitle {
|
||||
line-height: 18px;
|
||||
padding: 12px 0 5px;
|
||||
width: 100%;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.description {
|
||||
line-height: 16px;
|
||||
color: #999;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding-bottom: 6px;
|
||||
line-height: 16px;
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 12px;
|
||||
float: left;
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 11px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .icon {
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.list li .icon .awsui-iconfont {
|
||||
font-size: 35px;
|
||||
color: #FFB800;
|
||||
}
|
||||
|
||||
.list li .left {
|
||||
width: calc(100% - 110px);
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list li .left .title, .list li .right .name {
|
||||
font-size: 13px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
color: #333;
|
||||
line-height: 18px;
|
||||
padding: 0 0 6px;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list li .right .name {
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.list li .left .description, .list li .right .time {
|
||||
color: #999999;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.list li .left .description .line {
|
||||
display: inline-block;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.list li .right {
|
||||
width: 110px;
|
||||
text-align: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.list .li-more {
|
||||
padding: 0;
|
||||
border: none;
|
||||
height: 67px;
|
||||
line-height: 67px;
|
||||
width: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list .li-more .more {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.list .center {
|
||||
float: left;
|
||||
background: #f9f9f9;
|
||||
padding: 10px;
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
.list .center .left {
|
||||
width: 66px;
|
||||
text-align: center;
|
||||
margin-right: 2px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list .center .left .score {
|
||||
font-size: 40px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
vertical-align: top;
|
||||
line-height: 30px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.list .center .right {
|
||||
float: left;
|
||||
width: calc(100% - 68px);
|
||||
}
|
||||
|
||||
.list .center .right .item {
|
||||
float: left;
|
||||
line-height: 10px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list .center .right .item .start {
|
||||
width: 48px;
|
||||
margin-right: 10px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.list .center .right .item .progress {
|
||||
width: calc(100% - 80px);
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.list .center .right .item .percentage {
|
||||
width: 27px;
|
||||
font-size: 10px;
|
||||
float: left;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.list .bottom {
|
||||
float: left;
|
||||
line-height: 16px;
|
||||
padding: 10px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.evaluate li .left {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.evaluate li .left .title {
|
||||
width: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.evaluate li .date {
|
||||
color: #999;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.evaluate li .description {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: fixed;
|
||||
border-top: 1px solid #e9e9e9;
|
||||
padding-left: 12px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer .headImg {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.footer .field {
|
||||
width: calc(100% - 30px);
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.my-swipe .van-swipe-item {
|
||||
height: 134px;
|
||||
}
|
||||
|
||||
.start .van-rate__item:not(:last-child) {
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.list .center .right .item .start .van-rate__item:not(:last-child) {
|
||||
padding-right: 4px;
|
||||
}
|
||||
.footer .field .van-field__control{
|
||||
padding:0 7px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
padding-left: 22px;
|
||||
}
|
||||
.footer .field::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 22px;
|
||||
transform: translateY(-50%);
|
||||
font-family: "awsui-iconfont";
|
||||
content: "\e636";
|
||||
background: none;
|
||||
font-size: 14px;
|
||||
z-index: 10;
|
||||
height: 24px;
|
||||
color:#999;
|
||||
}
|
||||
</style>
|
||||
1160
com.actionsoft.apps.kms.mobile/pages/know-detail.vue
Normal file
1160
com.actionsoft.apps.kms.mobile/pages/know-detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
378
com.actionsoft.apps.kms.mobile/pages/know-dimension.vue
Normal file
378
com.actionsoft.apps.kms.mobile/pages/know-dimension.vue
Normal file
@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<div class="dimension">
|
||||
<van-search v-model="value" placeholder="请输入知识目录相关文件..."/>
|
||||
<div style="height: 20px;font-size: 13px;color: #1b6ec9;padding: 0px 12px;">
|
||||
<span style="float: left;" @click="back()">返回</span>
|
||||
<span style="float: right;display: inline-block;" @click="clear()">清空</span>
|
||||
<span style="float: right;display: inline-block;margin-right: 15px;" @click="getValue()">确定</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="top" v-show="type=='list'">
|
||||
<span v-for="(item,index) in tablist" :key="index" >
|
||||
<span class="tabname" :style="(index<(tablist.length-1)?'color: #378DEC;':'color: #333;')" @click="(index<(tablist.length-1)?backtop(item.id,item.name):'')">{{item.name}}</span>
|
||||
<span v-show="(index<(tablist.length-1))">{{tabicon}} </span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="item" v-if="listSize> 0">
|
||||
<van-checkbox-group v-model="result">
|
||||
<van-cell-group>
|
||||
<span v-for="(item, index) in list">
|
||||
<van-cell
|
||||
v-if="item.open!=undefined"
|
||||
is-link
|
||||
clickable
|
||||
:key="index"
|
||||
@click="onCell($event,item,index,'checkboxes')"
|
||||
>
|
||||
<i class="awsui-iconfont" :class="item.iconCls">{{item.iconCls.indexOf('treeDimension')>-1?'':''}}</i>
|
||||
{{item.name}}
|
||||
<van-checkbox :disabled="item.disabled!=undefined" class="checkbox" label-disabled v-show="!item.nocheck" :id="item.id" shape="square" :publishPerm="item.publishPerm" :name="item.id" ref="checkboxes"
|
||||
icon-size="16px" >
|
||||
</van-checkbox>
|
||||
</van-cell>
|
||||
<van-cell
|
||||
v-else
|
||||
clickable
|
||||
:key="index"
|
||||
@click="onCell($event,item,index,'checkboxes')"
|
||||
>
|
||||
<i class="awsui-iconfont" :class="item.iconCls">{{item.iconCls.indexOf('treeDimension')>-1?'':''}}</i>
|
||||
{{item.name}}
|
||||
<van-checkbox :disabled="item.disabled!=undefined" class="checkbox rightchk" label-disabled v-show="!item.nocheck" :id="item.id" shape="square" :publishPerm="item.publishPerm" :name="item.id" ref="checkboxes"
|
||||
icon-size="16px" >
|
||||
</van-checkbox>
|
||||
</van-cell>
|
||||
</span>
|
||||
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="con">
|
||||
<div class="img">
|
||||
<img src="../assets/no_content.png" alt="" style="width: 125px;">
|
||||
</div>
|
||||
<div class="text">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'know-dimension',
|
||||
data() {
|
||||
return {
|
||||
initcheckFlag:false,
|
||||
value: '',
|
||||
knowDir: '知识目录',
|
||||
tabicon:">",
|
||||
list: [
|
||||
],
|
||||
tablist: [{
|
||||
name:"知识目录",
|
||||
id:"-1"
|
||||
}
|
||||
],
|
||||
listSize:0,
|
||||
id: '',
|
||||
type:"list",
|
||||
result: [],
|
||||
currentParentId:"",
|
||||
currentParentName:"知识目录",
|
||||
}
|
||||
},
|
||||
props:{
|
||||
publishDimensionData:{
|
||||
type:Object,
|
||||
default(){
|
||||
return {};
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkclick(item,state){
|
||||
if(state=='checked'){
|
||||
if(item.iconCls.indexOf('noPerm')>-1){
|
||||
for(let itm of this.list){
|
||||
if(itm.id!=item.id){
|
||||
itm.disabled = true;
|
||||
}else{
|
||||
itm.disabled = undefined;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(let itm of this.list){
|
||||
if(itm.iconCls.indexOf('noPerm')>-1){
|
||||
itm.disabled = true;
|
||||
}else{
|
||||
itm.disabled = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(let itm of this.list){
|
||||
itm.disabled = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
onCell(event, item, index, checkbox) {
|
||||
let cId = document.getElementById(item.id)
|
||||
if (cId) {
|
||||
this.currentParentId = item.id;
|
||||
this.currentParentName = item.name;
|
||||
if (event.target.className.indexOf("van-cell__")>-1) {
|
||||
if(item.open!=undefined){
|
||||
this.getDimensionTree();
|
||||
}
|
||||
} else {
|
||||
if(item.disabled==undefined){
|
||||
this.toggle(index, checkbox,item);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
toggle(index, checkbox,item) {
|
||||
this.$refs[checkbox][index].toggle()
|
||||
let dimenId =item.id;
|
||||
if(!this.$refs[checkbox][index].checked){
|
||||
if(!this.publishDimensionData.hasOwnProperty(dimenId)){
|
||||
this.publishDimensionData[dimenId]=item
|
||||
}
|
||||
this.checkclick(item,'checked');
|
||||
}else{
|
||||
if(this.publishDimensionData.hasOwnProperty(dimenId)){
|
||||
delete this.publishDimensionData[dimenId];
|
||||
}
|
||||
if(Object.keys(this.publishDimensionData).length==0){
|
||||
this.checkclick(item,'nochecked');
|
||||
}
|
||||
} ;
|
||||
this.id = this.$refs[checkbox][index].$attrs.id
|
||||
|
||||
},
|
||||
getValue(){
|
||||
this.$emit('dimensionBack',this.publishDimensionData,"ok");
|
||||
},
|
||||
clear(){
|
||||
if(this.$refs.checkboxes){
|
||||
this.$refs.checkboxes.forEach(el => {
|
||||
el.toggle(false);
|
||||
});
|
||||
this.publishDimensionData = {};
|
||||
this.result = [];
|
||||
}
|
||||
for(let itm of this.list){
|
||||
itm.disabled = undefined;
|
||||
}
|
||||
// this.$emit('dimensionBack');
|
||||
},
|
||||
back(){
|
||||
this.$emit('dimensionBack',this.publishDimensionData,"back");
|
||||
},
|
||||
getDimensionTree(id,type){
|
||||
let parentId= this.currentParentId;
|
||||
if(type=='back'){
|
||||
parentId=id=="-1"?"":id;
|
||||
}
|
||||
let that = this;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_me_publish_dimension_tree_json",
|
||||
parentId:parentId
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
let keys = Object.keys(that.publishDimensionData);
|
||||
if(keys==0){
|
||||
that.clear();
|
||||
}
|
||||
let dimensionJA = r;
|
||||
that.list = dimensionJA;
|
||||
that.listSize = that.list.length;
|
||||
let parentid = that.currentParentId;
|
||||
if(parentid==''){
|
||||
that.tablist =[{
|
||||
name:"知识目录",
|
||||
id:"-1"
|
||||
}
|
||||
]
|
||||
}else{
|
||||
let tmpd = that.tablist;
|
||||
let indx = 0;
|
||||
let has = false;
|
||||
for(let n=0;n<tmpd.length;n++){
|
||||
if( tmpd[n]['id']==parentid){
|
||||
indx =n;
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(has){
|
||||
that.tablist=that.tablist.slice(0,indx+1);
|
||||
}else{
|
||||
that.tablist.push({
|
||||
name:that.currentParentName,
|
||||
id:parentid
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
search(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_mobile_center_dimension_search",
|
||||
key:this.value
|
||||
|
||||
},
|
||||
}).then(function (r){
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else{
|
||||
if(Object.keys(that.publishDimensionData).length==0){
|
||||
that.clear();
|
||||
}
|
||||
that.list = r.data.dimensionJA;
|
||||
}
|
||||
});
|
||||
},
|
||||
backtop(id,name){
|
||||
this.currentParentId = id;
|
||||
this.currentParentName = name;
|
||||
this.getDimensionTree(id,'back');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initcheckFlag = true;
|
||||
this.$nextTick(() => {
|
||||
var that = this
|
||||
if (that.$route.params.id !== undefined) {
|
||||
this.id = that.$route.params.id
|
||||
}
|
||||
this.result = Object.keys(that.publishDimensionData);
|
||||
// that.list.forEach(el => {
|
||||
// if (el.id === this.id) {
|
||||
// this.result = [el.name]
|
||||
// }
|
||||
// })
|
||||
})
|
||||
},
|
||||
watch:{
|
||||
value(v) {
|
||||
if(v!=''){
|
||||
this.type='search';
|
||||
this.search();
|
||||
}else{
|
||||
this.type='list';
|
||||
this.getDimensionTree("-1","back");
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getDimensionTree("-1","");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dimension {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dimension .content {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
height: calc(100% - 105px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.dimension .content .item {
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.dimension .content .item .checkbox {
|
||||
width: 16px;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
|
||||
.dimension .content .divide {
|
||||
background: #e9e9e9;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.dimension .content .van-cell {
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.dimension .content .van-cell:last-child {
|
||||
/*border-bottom: 0;*/
|
||||
}
|
||||
|
||||
.dimension .content .van-cell .awsui-iconfont {
|
||||
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.dimension .content .van-cell .default {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 9px 12px 7px;
|
||||
line-height: 18px;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
font-size: 12px;
|
||||
}
|
||||
.top .tabname{
|
||||
font-size: 14px;
|
||||
}
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con .img {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.con .text {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
.treeDimension-noPerm,.treeHotspot-noPerm{
|
||||
color: #CCCCCC;
|
||||
}
|
||||
.treeDimension,.treeHotspot{
|
||||
color: #FABD01;
|
||||
}
|
||||
.treeHotspot {
|
||||
color:#f3b731 !important;
|
||||
}
|
||||
.rightchk{
|
||||
right: 40px !important;
|
||||
}
|
||||
</style>
|
||||
208
com.actionsoft.apps.kms.mobile/pages/knwlborrow.vue
Normal file
208
com.actionsoft.apps.kms.mobile/pages/knwlborrow.vue
Normal file
@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<div class="knwlborrow">
|
||||
<div style="padding: 3px 10px;width: 100%;background:#f2f3f5;z-index: 999">
|
||||
<i style="font-size: 18px;color:#000" class="awsui-iconfont" @click="backHome"></i>
|
||||
</div>
|
||||
<div style="font-size: 13px;padding:10px;border-bottom: 1px solid #e8e8e8;">知识名称:{{name}}</div>
|
||||
<ul class="list" v-if="list.length>0" :style="heights">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
@load="downLoad"
|
||||
finished-text="没有更多了"
|
||||
loading-text="加载中..."
|
||||
:offset="offset"
|
||||
>
|
||||
<li v-for="(item,index) in list" :key="index">
|
||||
<div class="left">
|
||||
<div class="title">{{item.logContent}}</div>
|
||||
<div class="description">
|
||||
<label>
|
||||
{{item.accessUsername}}
|
||||
</label>
|
||||
<label v-if="item.cardContext!=''" class="line">|</label>
|
||||
<label>
|
||||
{{item.accessTime}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</van-list>
|
||||
</ul>
|
||||
<div class="list" v-else>
|
||||
<div class="con">
|
||||
<div class="img">
|
||||
<img src="../assets/no_content.png" alt="" style="width: 125px;">
|
||||
</div>
|
||||
<div class="text">暂无内容</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
let searchTimeout;
|
||||
export default {
|
||||
name: 'knwlborrow',
|
||||
data() {
|
||||
return {
|
||||
loading:false,
|
||||
finished:false,
|
||||
offset:10,
|
||||
curPage:0,
|
||||
heights:"",
|
||||
showDialog: false,
|
||||
id: 1,
|
||||
name: '',
|
||||
list: []
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backHome(){
|
||||
window.history.back();
|
||||
},
|
||||
downLoad(){
|
||||
this.getDimensionCard();
|
||||
},
|
||||
getDimensionCard(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_log_list",
|
||||
cardId:this.$route.params.id,
|
||||
curPage:this.curPage<=0?1:this.curPage+1,
|
||||
rowsPerPage:10,
|
||||
sortIndx:"accessTime",
|
||||
sortDir:"down"
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
if(that.curPage==0){
|
||||
that.list = r.data.data;
|
||||
}else{
|
||||
that.list =that.list.concat( r.data.data);
|
||||
}
|
||||
that.curPage = r.data.curPage;
|
||||
let totalRecords = r.data.totalRecords;
|
||||
if(that.curPage*10>=totalRecords){
|
||||
that.finished = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.name=this.$route.params.name;
|
||||
this.heights ="height:"+(window.innerHeight-52)+"px";
|
||||
this.getDimensionCard();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.path_title{
|
||||
color:#378DEC;
|
||||
}
|
||||
.knwlborrow {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 9px 12px 7px;
|
||||
line-height: 18px;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 12px;
|
||||
float: left;
|
||||
height: calc(100% - 86px);
|
||||
overflow-y: auto;
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 11px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .left {
|
||||
width: calc(100% - 1px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list li .left .title {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
line-height: 18px;
|
||||
margin-bottom: 4px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list li .left .description {
|
||||
color: #999999;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list li .left .description .line {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #E8E8E8;
|
||||
}
|
||||
|
||||
.list li .right {
|
||||
width: 20px;
|
||||
text-align: right;
|
||||
float: right;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.list li .right .awsui-iconfont {
|
||||
color: #a4a4a4;
|
||||
}
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con .img {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.con .text {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
156
com.actionsoft.apps.kms.mobile/pages/knwldir.vue
Normal file
156
com.actionsoft.apps.kms.mobile/pages/knwldir.vue
Normal file
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<div class="knwldir">
|
||||
<van-search v-model="keyvalue" placeholder="请输入文件内容关键词"/>
|
||||
<div class="content" :style="contentH">
|
||||
<div class="item">
|
||||
<van-cell v-for="(item,index) in dirs" :key="index" is-link
|
||||
: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-else class="awsui-iconfont" :style="item.hasPerm?'color:#FABD01;':'color:#c8c9cc;'" :class="item.iconCls"></i>
|
||||
{{item.name}}
|
||||
</van-cell>
|
||||
</div>
|
||||
<div v-show="!initLoad&&dirs.length==0">
|
||||
<div class="con">
|
||||
<div class="img">
|
||||
<img src="../assets/no_content.png" alt="" style="width: 110px;">
|
||||
</div>
|
||||
<div class="text">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<tabbar/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from '@/components/tabbar.vue' //引用组件的地址
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'knwldir',
|
||||
components: {
|
||||
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(){
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
.knwldir {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.knwldir .content {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
height: calc(100% - 105px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.knwldir .content .item {
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell {
|
||||
padding: 8px 0;
|
||||
/*border-bottom: 0.33px solid #e9e9e9;*/
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell .awsui-iconfont {
|
||||
/*color: #03A76B;*/
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell .default {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
.treeHotspot {
|
||||
color:#f3b731 !important;
|
||||
}
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con .img {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.con .text {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
349
com.actionsoft.apps.kms.mobile/pages/knwlhome.vue
Normal file
349
com.actionsoft.apps.kms.mobile/pages/knwlhome.vue
Normal file
@ -0,0 +1,349 @@
|
||||
<template>
|
||||
<div class="knwlhome">
|
||||
<search v-model="keyword" :isFullsearchAppActive="isFullsearchAppActive" :filterSetting="filterSetting" @allSearch="allSearch" @searchfunc="searchMobileList"/>
|
||||
<div class="content">
|
||||
<div class="top" style="font-size: 11px;font-weight: bold;">
|
||||
{{newTitle}}
|
||||
<span class="icon-descending">
|
||||
<van-icon name="descending" @click="showPopup"/>
|
||||
</span>
|
||||
<div class="dropdown-menu" v-if="show">
|
||||
<van-sidebar v-model="activeKey" @change="onChange">
|
||||
<van-sidebar-item v-for="(item,index) in dropDownList" :key="index" :title="item.text">
|
||||
<i class="awsui-iconfont" style="color:red;"></i>
|
||||
</van-sidebar-item>
|
||||
</van-sidebar>
|
||||
</div>
|
||||
</div>
|
||||
<van-loading v-show="initLoad" size="24" style="text-align: center;height: 300px;line-height: 300px;"/>
|
||||
<list ref="knwlist" :pageSetting="{'loading':loading,'finished':finished}" @downLoadMore="downLoadMore" :style="contentStyle" class="content-list" v-if="!initLoad&&!fullSearch" :list="lists" :type="type"></list>
|
||||
<list ref="fullknwlist" :pageSetting="{'loading':loading,'finished':finished}" @downLoadMore="allSearch" class="search-list" v-else-if="!initLoad" :searchval="keyword" :type="type" :list="resultList"></list>
|
||||
</div>
|
||||
<tabbar v-if="keyword===''"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from '@/components/tabbar' //引用组件的地址
|
||||
import Search from '@/components/search'
|
||||
import List from '@/components/list'
|
||||
// import Radio from '@/components/radio'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
|
||||
export default {
|
||||
name: 'knwlhome',
|
||||
components: {
|
||||
tabbar,
|
||||
Search,
|
||||
List,
|
||||
// Radio
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
initLoad:true,
|
||||
loading: false,
|
||||
finished: false,
|
||||
isLoadingData:false,
|
||||
offset:10,
|
||||
keyword: '',
|
||||
type: '-1',
|
||||
searchsize:0,
|
||||
show: false,
|
||||
newTitle: '最新发布',
|
||||
activeKey: 0,
|
||||
sortIndx:"publishTime",
|
||||
lists: [
|
||||
],
|
||||
resultList: [],
|
||||
dropDownList: [
|
||||
{text: '最新发布', value: "publishTime"},
|
||||
{text: '阅读次数', value: "readCount"},
|
||||
{text: '讨论次数', value: "commentCount"},
|
||||
{text: '标题', value: "cardName"}
|
||||
],
|
||||
isSearch: false,
|
||||
isLoading:false,
|
||||
isFullsearchAppActive:false,
|
||||
curPage:0,
|
||||
totalRecords:0,
|
||||
contentStyle:"",
|
||||
fullSearch:false,
|
||||
filterSetting:{
|
||||
cardName: "",
|
||||
publishTime: "",
|
||||
publishUser: "",
|
||||
departId: "",
|
||||
tags: encodeURIComponent(JSON.stringify([])),
|
||||
schemaMetaData:encodeURIComponent(JSON.stringify({
|
||||
'01': [],
|
||||
'2': []
|
||||
}))
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downLoadMore(){
|
||||
this.searchListParams();
|
||||
},
|
||||
showPopup() {
|
||||
this.show = !this.show
|
||||
},
|
||||
onChange(index) {
|
||||
this.show = false
|
||||
this.newTitle = this.dropDownList[index].text;
|
||||
this.sortIndx = this.dropDownList[index].value;
|
||||
this.curPage = 0;
|
||||
this.finished = false;
|
||||
this.searchListParams();
|
||||
},
|
||||
allSearch(keyword,curpage) {
|
||||
//全文检索
|
||||
if(this.isLoadingData){
|
||||
return;
|
||||
}
|
||||
this.fullSearch = true;
|
||||
if(curpage!=undefined){
|
||||
this.curPage = curpage;
|
||||
}
|
||||
|
||||
if(this.curPage==0){
|
||||
this.finished = false;
|
||||
this.initLoad = true;
|
||||
// this.$refs.fullknwlist.backTop();
|
||||
}
|
||||
this.isLoadingData = true;//正在加载
|
||||
this.type='search';
|
||||
let that = this;
|
||||
this.isSearch = true;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd:"com.actionsoft.apps.kms_knwl_fullsearch_list_json",
|
||||
curPage: this.curPage,
|
||||
rowsPerPage: 0,
|
||||
searchText: encodeURIComponent(keyword),
|
||||
docTypes: JSON.stringify([]),//类型 ["pdf", "doc", "ppt", "xls", "txt"]
|
||||
searchType: "1"//1 全文 2 标题剪简介
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.isLoadingData = false;
|
||||
that.loading = false;
|
||||
that.initLoad = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true});
|
||||
that.finished = true;
|
||||
} else {
|
||||
that.searchsize = that.resultList.length;
|
||||
if(that.curPage==0){
|
||||
that.resultList = r.data.data.result;
|
||||
}else{
|
||||
that.resultList = that.resultList.concat(r.data.data.result);
|
||||
}
|
||||
that.curPage = r.data.data.curPage;
|
||||
that.loading = false;
|
||||
if(!r.data.data.hasNextPage){
|
||||
that.finished = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
brightKeyword(val) {
|
||||
let keyword = this.keyword
|
||||
if (val.indexOf(keyword) !== -1) {
|
||||
return val.replace(keyword, `<font color='#E72C20'>${keyword}</font>`)
|
||||
} else {
|
||||
return val
|
||||
}
|
||||
},
|
||||
searchMobileList(pageno){
|
||||
if(this.isLoadingData){
|
||||
return false;
|
||||
}
|
||||
this.fullSearch = false;
|
||||
let that = this;
|
||||
if(pageno!=undefined){
|
||||
this.curPage = pageno;
|
||||
}
|
||||
if(this.curPage==0){
|
||||
this.finished = false;
|
||||
if(this.$refs.knwlist){
|
||||
this.$refs.knwlist.backTop();
|
||||
}
|
||||
|
||||
}
|
||||
this.loading = true;
|
||||
this.isLoadingData = true;//正在加载
|
||||
this.type='knwlhome';
|
||||
let option = {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_attr_search_dosearch",
|
||||
searchDimensionIds: "[]",
|
||||
schemaMetaData:this.filterSetting.schemaMetaData,
|
||||
curPage:this.curPage<=0?1:this.curPage+1,
|
||||
rowsPerPage:0,
|
||||
cardName: this.filterSetting.cardName,
|
||||
publishTime: this.filterSetting.publishTime,
|
||||
publishUser: this.filterSetting.publishUser,
|
||||
departId: this.filterSetting.departId,
|
||||
tags:this.filterSetting.tags,// encodeURIComponent(JSON.stringify([])),
|
||||
sortIndx:this.sortIndx,
|
||||
sortDir: "down",
|
||||
lastPublishId: '',
|
||||
searchType: ""
|
||||
};
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: option,
|
||||
}).then(function (r) {
|
||||
that.isLoadingData = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true});
|
||||
} else {
|
||||
that.initLoad = false;
|
||||
if(that.curPage<=0){
|
||||
// that.resultList = r.data.data;
|
||||
that.lists = r.data.data;
|
||||
}else{
|
||||
that.lists = that.lists.concat(r.data.data);
|
||||
}
|
||||
that.loading = false;
|
||||
that.searchsize = that.lists.length;
|
||||
that.curPage = r.data.curPage;
|
||||
if(!r.data.hasNextPage){
|
||||
that.finished = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
searchListParams(){
|
||||
this.searchMobileList();
|
||||
|
||||
},
|
||||
checkFullsearchAppActive(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd:"com.actionsoft.apps.kms_knwl_center_mobile_check_fullsearch"
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.isFullsearchAppActive = r.data.isFullsearchAppActive;
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let hh = window.innerHeight-51-87;
|
||||
this.contentStyle = 'height:'+hh+"px";
|
||||
this.checkFullsearchAppActive();
|
||||
this.searchListParams();
|
||||
},
|
||||
watch: {
|
||||
|
||||
keyword: function () {
|
||||
var that = this
|
||||
if (that.keyword !== '') {
|
||||
that.type = 'search'
|
||||
}else{
|
||||
this.isSearch = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.knwlhome {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.knwlhome .content {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
color: #666;
|
||||
/*height: 100%;*/
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 6px 12px;
|
||||
line-height: 17px;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.icon-descending {
|
||||
position: absolute;
|
||||
font-size: 16px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
font-weight: normal;
|
||||
z-index: 10;
|
||||
top: 30px;
|
||||
background: #fff;
|
||||
padding: 2px 6px;
|
||||
box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.2);
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.dropdown-menu .van-sidebar {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dropdown-menu .van-sidebar-item {
|
||||
padding: 8px 8px 8px 24px;
|
||||
font-size: 12px;
|
||||
background: none;
|
||||
border-bottom: 1px solid #f6f6f6;
|
||||
}
|
||||
|
||||
.dropdown-menu .van-sidebar-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.dropdown-menu .van-sidebar-item--select {
|
||||
color: #378DEC;
|
||||
}
|
||||
|
||||
.dropdown-menu .van-sidebar-item--select::before {
|
||||
position: absolute;
|
||||
top: 46%;
|
||||
left: 6px;
|
||||
transform: translateY(-50%);
|
||||
content: "\2713";
|
||||
background: none;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.search-list {
|
||||
height: calc(100% - 135px) !important;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.search-list {
|
||||
height: calc(100% - 85px) !important;
|
||||
}
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con .img {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.con .text {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
53
com.actionsoft.apps.kms.mobile/pages/knwlportal.vue
Normal file
53
com.actionsoft.apps.kms.mobile/pages/knwlportal.vue
Normal file
@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div class="knwlportal">
|
||||
<div style="margin-top: 7px;">
|
||||
<van-row>
|
||||
<van-col span="22">
|
||||
<div style="font-size: 14px;color:#555555;margin-left:15px;text-align: left;">最新发布</div>
|
||||
</van-col>
|
||||
<van-col span="2">
|
||||
<van-icon name="descending" @click="showPopup"/>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<list></list>
|
||||
<van-popup v-model="show" position="right" :get-container="getContainer" style="height:100%;">
|
||||
<radio/>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/*知识库*/
|
||||
import list from '../components/list'
|
||||
import TreeSelect from '../components/treeSelect'
|
||||
import DropdownMenu from '../components/dropdownMenu'
|
||||
import cell from '../components/cell'
|
||||
import Radio from '../components/radio'
|
||||
|
||||
export default {
|
||||
name: 'knwlportal',
|
||||
components: {Radio, DropdownMenu, TreeSelect, list, cell},
|
||||
data () {
|
||||
return {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
showPopup () {
|
||||
this.show = true
|
||||
},
|
||||
// 返回一个特定的 DOM 节点,作为挂载的父节点
|
||||
getContainer () {
|
||||
return document.querySelector('.my-container')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
94
com.actionsoft.apps.kms.mobile/pages/myBorrow.vue
Normal file
94
com.actionsoft.apps.kms.mobile/pages/myBorrow.vue
Normal file
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div class="myborrow" :style="hstyle">
|
||||
<van-loading v-if="initLoad" size="24" style="text-align: center;height: 300px;line-height: 300px;"/>
|
||||
<list v-else @downLoadMore="downLoadMore" :pageSetting="{'loading':loading,'finished':finished}" type="borrow" :list="lists"></list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from '../components/list'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'myborrow',
|
||||
components: {list},
|
||||
data() {
|
||||
return {
|
||||
hstyle:"",
|
||||
initLoad:true,
|
||||
isLoadingData:false,//防止重复加载数据
|
||||
loading:false,
|
||||
finished:false,
|
||||
curPage:0,
|
||||
keyWord:"",
|
||||
lists: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downLoadMore(){
|
||||
this.searchMobileList("");
|
||||
},
|
||||
refreshList() {
|
||||
console.log('myborrow:refreshList')
|
||||
},
|
||||
searchMobileList(key,type){
|
||||
if(this.isLoadingData){
|
||||
return;
|
||||
}
|
||||
this.isLoadingData = true;
|
||||
let that = this;
|
||||
if(type=='search'){
|
||||
this.keyWord = key;
|
||||
this.curPage =0;
|
||||
this.finished = false;
|
||||
}
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_borrow_card_list_json",
|
||||
sortIndx:"CREATEDATE",
|
||||
sortDir: "down",
|
||||
rowsPerPage:0,
|
||||
curPage:this.curPage<=0?1:this.curPage+1,
|
||||
filter: encodeURIComponent(this.keyWord)
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.initLoad = false;
|
||||
that.isLoadingData = false;
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
let rowsPerPage = r.data.rowsPerPage;
|
||||
if(that.curPage==0){
|
||||
that.lists = r.data.data;
|
||||
}else{
|
||||
that.lists =that.lists.concat( r.data.data);
|
||||
}
|
||||
that.loading = false;
|
||||
that.curPage = r.data.curPage;
|
||||
let totalRecords = r.data.totalRecords;
|
||||
if(that.curPage*rowsPerPage>=totalRecords){
|
||||
that.finished = true;
|
||||
}
|
||||
if(!that.finished&&that.curPage>=2&&that.lists.length<8){
|
||||
that.searchMobileList("");
|
||||
}
|
||||
|
||||
that.$emit("func",r.data.totalRecords,"borrow");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
// this.hstyle ="height:"+ (window.innerHeight-44-54-51)+"px";
|
||||
this.searchMobileList("");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
99
com.actionsoft.apps.kms.mobile/pages/myFavorite.vue
Normal file
99
com.actionsoft.apps.kms.mobile/pages/myFavorite.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="myfavorite" :style="hstyle">
|
||||
<van-loading v-if="initLoad" size="24" style="text-align: center;height: 300px;line-height: 300px;"/>
|
||||
<list v-else @downLoadMore="downLoadMore" :pageSetting="{'loading':loading,'finished':finished}" type="favorite" :list="lists"></list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from '../components/list'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'myfavorite',
|
||||
components: {list},
|
||||
data () {
|
||||
return {
|
||||
initLoad:true,
|
||||
hstyle:"",
|
||||
isLoadingData:false,//防止重复加载数据
|
||||
loading:false,
|
||||
finished:true,
|
||||
curPage:0,
|
||||
keyWord:"",
|
||||
profileId:"",
|
||||
count:0,
|
||||
lists: [
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refreshList () {
|
||||
console.log('myfavorite:refreshList')
|
||||
},
|
||||
downLoadMore(){
|
||||
|
||||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
async:false,
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.favorite_load_category_names"
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
console.log(r.msg);
|
||||
} else {
|
||||
let data = r.data.categoryNames;
|
||||
for(let i in data){
|
||||
if(data[i]['categoryName']=='KMS'){
|
||||
that.profileId=data[i]['id'];
|
||||
that.count = (data[i]['amount'] == undefined) ? 0 : data[i]['amount'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
that.$emit("func",that.count,"favorite");
|
||||
that.loadData("");
|
||||
});
|
||||
|
||||
},
|
||||
loadData(key){
|
||||
// 获取知识列表数据
|
||||
if(this.isLoadingData){
|
||||
return;
|
||||
}
|
||||
this.isLoadingData = true;
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.favorite_load_data",
|
||||
profileId:this.profileId,
|
||||
searchValue: key
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.initLoad = false;
|
||||
that.isLoadingData = false;
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
that.lists = r.data.list;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
// this.hstyle ="height:"+ (window.innerHeight-44-54-51)+"px";
|
||||
this.getData();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
117
com.actionsoft.apps.kms.mobile/pages/myKnowledge.vue
Normal file
117
com.actionsoft.apps.kms.mobile/pages/myKnowledge.vue
Normal file
@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div class="myknowledge" :style="hstyle">
|
||||
<van-loading v-if="initLoad" size="24" style="text-align: center;height: 300px;line-height: 300px;"/>
|
||||
<list v-else @changeSizeInfo="changeSizeInfo" @downLoadMore="downLoadMore" :pageSetting="{'loading':loading,'finished':finished}" type="knowl" :list="lists"></list>
|
||||
<van-button round type="info" class="createBtn" @click="onNewKnowl">
|
||||
<i class="awsui-iconfont"></i>
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from '../components/list'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'myknowledge',
|
||||
components: {list},
|
||||
props:{
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
hstyle:"",
|
||||
initLoad:true,
|
||||
isLoadingData:false,//防止重复加载数据
|
||||
loading:false,
|
||||
finished:false,
|
||||
curPage:0,
|
||||
keyWord:"",
|
||||
lists: [
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downLoadMore(){
|
||||
this.searchMobileList("");
|
||||
},
|
||||
refreshList () {
|
||||
console.log('myknowledge:refreshList')
|
||||
},
|
||||
onNewKnowl() {
|
||||
this.$router.push({
|
||||
name:'new-knowledge',
|
||||
params:{
|
||||
type:"create",
|
||||
cardId:""
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
searchMobileList(key,type){
|
||||
if(this.isLoadingData){
|
||||
return;
|
||||
}
|
||||
let that = this;
|
||||
if(type=='search'){
|
||||
this.keyWord = key;
|
||||
this.curPage =0;
|
||||
this.finished = false;
|
||||
}
|
||||
this.isLoadingData = true;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_me_card_list_json",
|
||||
sortIndx:"createTime",
|
||||
sortDir: "down",
|
||||
rowsPerPage:0,
|
||||
curPage:this.curPage<=0?1:this.curPage+1,
|
||||
filter: encodeURIComponent(this.keyWord)
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.initLoad = false;
|
||||
that.isLoadingData = false;
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
let rowsPerPage = r.data.rowsPerPage;
|
||||
if(that.curPage==0){
|
||||
that.lists = r.data.data;
|
||||
}else{
|
||||
that.lists =that.lists.concat( r.data.data);
|
||||
}
|
||||
that.loading = false;
|
||||
that.curPage = r.data.curPage;
|
||||
let totalRecords = r.data.totalRecords;
|
||||
if(that.curPage*rowsPerPage>=totalRecords){
|
||||
that.finished = true;
|
||||
}
|
||||
if(!that.finished&&that.curPage>=2&&that.lists.length<8){
|
||||
that.searchMobileList("");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
changeSizeInfo(){
|
||||
this.$emit("func",-1,"knowledge");
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.hstyle ="height:"+ (window.innerHeight-44-54-51)+"px";
|
||||
this.searchMobileList("");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.createBtn {
|
||||
border: 0 !important;
|
||||
background-color:#378DEC !important;
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
right: 30px;
|
||||
box-shadow:0px 4px 9px 1px #cfe1f5;
|
||||
}
|
||||
</style>
|
||||
101
com.actionsoft.apps.kms.mobile/pages/myPublish.vue
Normal file
101
com.actionsoft.apps.kms.mobile/pages/myPublish.vue
Normal file
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div class="mypublish" :style="hstyle">
|
||||
<van-loading v-if="initLoad" size="24" style="text-align: center;height: 300px;line-height: 300px;"/>
|
||||
<list v-else @refreshCount="refreshCount" :myPublicCount="myPublicCount" @downLoadMore="downLoadMore" :pageSetting="{'loading':loading,'finished':finished}" type="publish" :list="lists"></list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from '../components/list'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'mypublish',
|
||||
components: {list},
|
||||
props:{
|
||||
myPublicCount:Number
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
initLoad:true,
|
||||
hstyle:"",
|
||||
isLoadingData:false,
|
||||
loading:false,
|
||||
finished:false,
|
||||
curPage:0,
|
||||
keyWord:"",
|
||||
lists: [
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downLoadMore(){
|
||||
this.searchMobileList("");
|
||||
},
|
||||
refreshCount(count){
|
||||
this.$emit("func",count,"publish");
|
||||
},
|
||||
refreshList () {
|
||||
console.log('mypublish:refreshList')
|
||||
},
|
||||
searchMobileList(key,type){
|
||||
if(this.isLoadingData){
|
||||
return;
|
||||
}
|
||||
this.isLoadingData = true;
|
||||
let that = this;
|
||||
if(type=='search'){
|
||||
this.keyWord = key;
|
||||
this.curPage =0;
|
||||
this.finished = false;
|
||||
}
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_publish_card_list_json",
|
||||
sortIndx:"publishTime",
|
||||
sortDir: "down",
|
||||
rowsPerPage:0,
|
||||
curPage:this.curPage<=0?1:this.curPage+1,
|
||||
filter: encodeURIComponent(this.keyWord)
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.initLoad = false;
|
||||
that.isLoadingData = false;
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
let rowsPerPage = r.data.rowsPerPage;
|
||||
if(that.curPage==0){
|
||||
that.lists = r.data.data;
|
||||
}else{
|
||||
that.lists =that.lists.concat( r.data.data);
|
||||
}
|
||||
that.loading = false;
|
||||
that.curPage = r.data.curPage;
|
||||
let totalRecords = r.data.totalRecords;
|
||||
if(that.curPage*rowsPerPage>=totalRecords){
|
||||
that.finished = true;
|
||||
}
|
||||
if(!that.finished&&that.curPage>=2&&that.lists.length<6){
|
||||
that.searchMobileList("");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
// this.hstyle ="height:"+ (window.innerHeight-44-54-51)+"px";
|
||||
this.searchMobileList("");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
179
com.actionsoft.apps.kms.mobile/pages/myknwl.vue
Normal file
179
com.actionsoft.apps.kms.mobile/pages/myknwl.vue
Normal file
@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div class="myknwl">
|
||||
<van-search v-model="value" placeholder="请输入文件名关键词" @search="search"/>
|
||||
<van-tabs v-model="active" @click="onClick" line-width="25%" line-height="1" title-active-color="#378DEC">
|
||||
<van-tab name="myknowledge" title="我的知识" :info="myKnowlageCount">
|
||||
<my-knowledge ref="myknowledge" @func="changeCount"></my-knowledge>
|
||||
</van-tab>
|
||||
<van-tab name="mypublish" title="我发布的" :info="myPublicCount">
|
||||
<my-publish ref="mypublish" @func="changeCount" :myPublicCount="myPublicCount"></my-publish>
|
||||
</van-tab>
|
||||
<van-tab name="myborrow" title="我借阅的" :info="myBorrowCount">
|
||||
<my-borrow ref="myborrow" @func="changeCount" ></my-borrow>
|
||||
</van-tab>
|
||||
<template>
|
||||
<span v-if="showFavorite">
|
||||
<van-tab name="myfavorite" title="我的收藏" :info="myFavoriteCount">
|
||||
<my-favorite ref="myfavorite" @func="changeCount"></my-favorite>
|
||||
</van-tab>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</van-tabs>
|
||||
<tabbar/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from '../components/tabbar'
|
||||
import myKnowledge from '../pages/myKnowledge'
|
||||
import myPublish from '../pages/myPublish'
|
||||
import myBorrow from '../pages/myBorrow'
|
||||
import myFavorite from '../pages/myFavorite'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
|
||||
export default {
|
||||
name: 'myknwl',
|
||||
components: {
|
||||
tabbar,
|
||||
myKnowledge,
|
||||
myPublish,
|
||||
myBorrow,
|
||||
myFavorite
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showFavorite:false,//是否显示收藏
|
||||
value: '',
|
||||
active: 'myknowledge',
|
||||
myFavoriteCount:"",
|
||||
myKnowlageCount:"",
|
||||
myBorrowCount:"",
|
||||
myPublicCount:"",
|
||||
rowpage:23
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
search(){
|
||||
if(this.active=='myknowledge'){
|
||||
this.$refs.myknowledge.searchMobileList(this.value,"search");
|
||||
}else if(this.active=='mypublish'){
|
||||
this.$refs.mypublish.searchMobileList(this.value,"search");
|
||||
}else if(this.active=='myborrow'){
|
||||
this.$refs.myborrow.searchMobileList(this.value,"search");
|
||||
}else if(this.active=='myfavorite'){
|
||||
this.$refs.myfavorite.loadData(this.value,"search");
|
||||
}
|
||||
},
|
||||
onClick(name, title) {
|
||||
this.value = "";
|
||||
localStorage.setItem("activeTab",name);
|
||||
this.$nextTick(() => {
|
||||
this.$refs[name].refreshList()
|
||||
})
|
||||
},
|
||||
getfavoriteData(){
|
||||
let that = this;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
async:false,
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.favorite_load_category_names"
|
||||
},
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
console.log(r.msg);
|
||||
} else {
|
||||
let data = r.data.categoryNames;
|
||||
let countTmp = 0;
|
||||
for(let i in data){
|
||||
if(data[i]['categoryName']=='KMS'){
|
||||
countTmp = (data[i]['amount'] == undefined) ? 0 : data[i]['amount'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
that.myFavoriteCount = countTmp==0?'':countTmp;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
changeCount(count,type){
|
||||
if(type=='favorite'){
|
||||
this.myFavoriteCount = count>0?count:"";
|
||||
}else if(type=='knowledge'){
|
||||
if(count==-1){
|
||||
count = parseInt(this.myKnowlageCount)-1;
|
||||
}
|
||||
this.myKnowlageCount=count>0?count:"";
|
||||
}else if(type=='borrow'){
|
||||
this.myBorrowCount=count>0?count:"";
|
||||
}else if(type=='publish'){
|
||||
this.myPublicCount=count>0?count:"";
|
||||
}
|
||||
this.getfavoriteData();
|
||||
},
|
||||
initCount(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_mobile_center_knowladge_count"
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
let data = r.data;
|
||||
that.myKnowlageCount = data.meCount==0?"":data.meCount;
|
||||
that.myBorrowCount = data.borrowCount==0?"":data.borrowCount;
|
||||
that.myPublicCount = data.publishCount==0?"":data.publishCount;
|
||||
that.showFavorite = data.showFavorite;
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value:function () {
|
||||
this.search();
|
||||
}
|
||||
},
|
||||
created(){
|
||||
let activel = localStorage.getItem("activeTab");
|
||||
if(activel=='myfavorite'){
|
||||
this.showFavorite = true;
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
let activel = localStorage.getItem("activeTab");
|
||||
if(activel!=undefined&&activel!=''){
|
||||
this.active=activel;
|
||||
}
|
||||
this.initCount();
|
||||
this.getfavoriteData();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.myknwl {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.myknwl .van-tab {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.myknwl .van-tabs__nav .van-tabs__line {
|
||||
height: 2px !important;
|
||||
background-color:#378DEC !important;
|
||||
}
|
||||
.van-info{
|
||||
top: -3px;
|
||||
right: 0px;
|
||||
}
|
||||
</style>
|
||||
712
com.actionsoft.apps.kms.mobile/pages/new-knowledge.vue
Normal file
712
com.actionsoft.apps.kms.mobile/pages/new-knowledge.vue
Normal file
@ -0,0 +1,712 @@
|
||||
<template>
|
||||
<div class="knowledge"
|
||||
:style="heights">
|
||||
<div style="padding: 3px 10px;position: fixed;width: 100%;background:#f2f3f5;z-index: 999">
|
||||
<i style="font-size: 18px;color:#000"
|
||||
class="awsui-iconfont"
|
||||
@click="backHome"></i>
|
||||
</div>
|
||||
<van-form style="margin-top: 30px;">
|
||||
<van-field
|
||||
class="border"
|
||||
v-model="knwlName"
|
||||
required
|
||||
label="标题"
|
||||
placeholder="请输入标题"
|
||||
/>
|
||||
<van-field-date
|
||||
class="border"
|
||||
v-model="validDate"
|
||||
:minDate="minDate"
|
||||
cancel-button-text="清除"
|
||||
type="date"
|
||||
label="有效期"
|
||||
placeholder="默认长期有效"
|
||||
@change="confirmDate"
|
||||
@cancelDate="cancelDate"
|
||||
/>
|
||||
<van-field-select
|
||||
class="border"
|
||||
label="格式转换"
|
||||
placeholder="请选择"
|
||||
:defaultIndex="defaultIndex2"
|
||||
ref="control"
|
||||
v-model="control"
|
||||
:columns="controlOption"
|
||||
/>
|
||||
<van-field-select
|
||||
class="border"
|
||||
label="保密级别"
|
||||
placeholder="请选择"
|
||||
:defaultIndex="defaultIndex3"
|
||||
v-model="secrecyLevel"
|
||||
ref="secrecyLevel"
|
||||
:columns="secrecyLevelOption"
|
||||
/>
|
||||
<van-field-select
|
||||
class="border"
|
||||
label="评论"
|
||||
placeholder="请选择"
|
||||
ref="comment"
|
||||
:defaultIndex="defaultIndex4"
|
||||
v-model="comment"
|
||||
:columns="commentOption"
|
||||
/>
|
||||
<van-field-select
|
||||
class="border"
|
||||
label="打分"
|
||||
placeholder="请选择"
|
||||
v-model="grade"
|
||||
:defaultIndex="defaultIndex1"
|
||||
ref="rate"
|
||||
:columns="gradeOption"
|
||||
@change="onSelectChange"
|
||||
/>
|
||||
<van-field
|
||||
v-show="displayContent"
|
||||
ref="knowContent"
|
||||
v-html="remarks"
|
||||
:autosize="{ maxHeight: 100, minHeight: 100 }"
|
||||
type="textarea"
|
||||
label="内容"
|
||||
placeholder="请输入知识正文描述"
|
||||
/>
|
||||
</van-form>
|
||||
<div style="display: none"
|
||||
v-html="remarksTmp"
|
||||
ref="tmpcontent">{{ remarksTmp }}
|
||||
</div>
|
||||
<div style="width: 100%;text-align: center;"><span class="upfile-title">请到PC端上传附件</span></div>
|
||||
<div class="divide"></div>
|
||||
<ul v-if="list.length > 0"
|
||||
class="list">
|
||||
<li v-for="(item,index) in list"
|
||||
:key="index">
|
||||
<div class="icon">
|
||||
<i class="awsui-iconfont"
|
||||
v-html="getIcon(item.fileSuffixIcon)"></i>
|
||||
</div>
|
||||
<div class="left">
|
||||
<div class="title"
|
||||
style="color: #378DEC;"
|
||||
@click="fileOperatePreview(item)">
|
||||
{{ item.fileName }}
|
||||
</div>
|
||||
<div class="description">
|
||||
{{ item.createTime }} <span style="color: #dcdee0">|</span> {{ item.createUsername }} <span style="color: #dcdee0">|</span>
|
||||
{{ formatSize(item.fileSize) }} <span style="color: #dcdee0">|</span> v{{ item.fileVer }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<i v-show="item.fileState!=2"
|
||||
class="awsui-iconfont"
|
||||
@click="downloadFile(item)"
|
||||
style="color: #4A90E2;margin-right: 10px;"></i>
|
||||
<i class="awsui-iconfont"
|
||||
@click="deleteFile(item)"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else
|
||||
class="content">
|
||||
<div class="img">
|
||||
<img src="../assets/no_content.png"
|
||||
alt=""
|
||||
style="width: 88px;">
|
||||
</div>
|
||||
<span style="font-size: 13px; margin: 2px 0 5px;">暂无知识文件</span>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button plain
|
||||
type="info"
|
||||
@click="onSave('')">保存
|
||||
</van-button>
|
||||
<van-button type="info"
|
||||
:disabled="disableRelease"
|
||||
@click="onRelease">发布
|
||||
</van-button>
|
||||
</div>
|
||||
<van-dialog v-model="showDialog"
|
||||
show-cancel-button
|
||||
@confirm="handleDialog">
|
||||
<span style="text-align: center;padding: 20px 0;display: inline-block;width: 100%;">确定要删除该文件吗?</span>
|
||||
</van-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vanFieldSelect from "@/components/fieldSelect";
|
||||
import vanFieldDate from "@/components/fieldDate";
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
|
||||
export default {
|
||||
name: "new-knowledge",
|
||||
components: {
|
||||
vanFieldSelect,
|
||||
vanFieldDate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
kmsSetting: {},
|
||||
heights: "",
|
||||
disableRelease: false,
|
||||
defaultIndex1: 0,
|
||||
defaultIndex2: 0,
|
||||
defaultIndex3: 0,
|
||||
defaultIndex4: 0,
|
||||
cardSetting: {},
|
||||
displayContent: true,//隐藏编辑页面知识简介
|
||||
knwlName: "",
|
||||
validDate: "",
|
||||
formatter: "date",
|
||||
minDate: new Date(),
|
||||
showDialog: false,
|
||||
control: "转换PDF格式在线阅读,允许下载",
|
||||
controlOption: [{
|
||||
text: "常规",
|
||||
children: [{
|
||||
text: "转换PDF格式在线阅读,允许下载",
|
||||
value: "1"
|
||||
}, {
|
||||
text: "转换PDF格式在线阅读,禁止下载",
|
||||
value: "2"
|
||||
}]
|
||||
}, {
|
||||
text: "安全",
|
||||
children: [{
|
||||
text: "转换图片格式在线阅读,禁止下载(首次转换时间较长)",
|
||||
value: "0"
|
||||
}]
|
||||
// defaultIndex: 0
|
||||
}],
|
||||
secrecyLevel: "普通",
|
||||
secrecyLevelOption: ["普通", "秘密", "机密"],
|
||||
comment: "允许评论",
|
||||
commentOption: ["允许评论", "禁止评论"],
|
||||
grade: "允许打分",
|
||||
gradeOption: ["允许打分", "禁止打分"],
|
||||
remarks: "",
|
||||
remarksTmp: "",
|
||||
id: 1,
|
||||
list: [],
|
||||
deleteFileItem: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
backHome() {
|
||||
window.history.back();
|
||||
},
|
||||
handleDialog() {
|
||||
this.showDialog = false;
|
||||
let that = this;
|
||||
that.deleteFileId = this.deleteFileItem.id;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cardId: this.cardSetting.cardId,
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_delete_file",
|
||||
fileId: this.deleteFileItem.id
|
||||
}
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
that.$toast({message: "删除成功", overlay: true});
|
||||
let size = that.list.length;
|
||||
for (let i = 0; i < size; i++) {
|
||||
if (that.list[i]["id"] == that.deleteFileId) {
|
||||
that.list.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getIcon(fileSuffixIcon) {
|
||||
if (["jpg", "gif", "tif", "tiff", "bmp", "jpeg2000", "psd", "png", "svg", "pcx", "dxf", "wmf", "emf", "eps", "tga"].includes(fileSuffixIcon)) {
|
||||
return "";
|
||||
} else if (["ppt", "pptx"].includes(fileSuffixIcon)) {
|
||||
return "";
|
||||
} else if (["doc", "docx"].includes(fileSuffixIcon)) {
|
||||
return "";
|
||||
} else if (["xls", "xlsx"].includes(fileSuffixIcon)) {
|
||||
return "";
|
||||
} else if (["pdf"].includes(fileSuffixIcon)) {
|
||||
return "";
|
||||
} else if (["zip"].includes(fileSuffixIcon)) {
|
||||
return "";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
deleteFile(item) {
|
||||
this.showDialog = true;
|
||||
this.deleteFileItem = item;
|
||||
},
|
||||
onSave(type) {
|
||||
let knwlName = this.knwlName;
|
||||
if (knwlName == "") {
|
||||
this.$toast({message: "[标题]不允许为空", overlay: true});
|
||||
return false;
|
||||
}
|
||||
if (knwlName.length > 128) {
|
||||
this.$toast({message: "[标题]长度不能超过128个字符", overlay: true});
|
||||
return false;
|
||||
}
|
||||
let commentVal = this.comment == "允许评论";
|
||||
let control = "1";
|
||||
let secrecyLevel = 0;
|
||||
let grade = this.grade == "允许打分";
|
||||
if (this.secrecyLevel == "秘密") {
|
||||
secrecyLevel = "1";
|
||||
} else if (this.secrecyLevel == "机密") {
|
||||
secrecyLevel = "2";
|
||||
}
|
||||
if (this.control == "转换PDF格式在线阅读,禁止下载") {
|
||||
control = "2";
|
||||
} else if (this.control.indexOf("首次转换时间较长") > -1) {
|
||||
control = "0";
|
||||
}
|
||||
let vali = this.validDate;
|
||||
if (vali != "") {
|
||||
let date = new Date(this.validDate);
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
month = month < 10 ? "0" + month : month;
|
||||
day = day < 10 ? "0" + day : day;
|
||||
vali = year + "-" + month + "-" + day;
|
||||
}
|
||||
let cardId = this.cardSetting.cardId;
|
||||
let that = this;
|
||||
that.saveType = type;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: cardId == "" ? "com.actionsoft.apps.kms_knwl_center_insert_card" : "com.actionsoft.apps.kms_knwl_center_update_card",
|
||||
cardId: cardId,
|
||||
cardName: knwlName,
|
||||
validDate: vali,
|
||||
onlineLevel: control,
|
||||
securityLevel: secrecyLevel,
|
||||
cardType: 0,
|
||||
isComment: commentVal,
|
||||
isRate: grade,
|
||||
cardContext: this.remarks
|
||||
}
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
if (r.data && !that.cardSetting.cardId) {
|
||||
that.cardSetting.cardId = r.data.cardId;
|
||||
}
|
||||
if (that.saveType == "release") {
|
||||
if (that.remarks.length == 0 && that.list.length == 0) {
|
||||
that.$toast({message: "知识[" + that.knwlName + "]没有文件或知识内容,不允许发布该知识", overlay: true});
|
||||
} else {
|
||||
that.cardSetting.type = "editor";
|
||||
localStorage.setItem("cardSetting", JSON.stringify(that.cardSetting));
|
||||
that.$router.push({
|
||||
name: "release-knowledge",
|
||||
params: {
|
||||
id: r.data ? r.data.cardId : that.cardSetting.cardId,
|
||||
name: that.knwlName,
|
||||
type: "myknowledge"
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
that.$toast({message: "保存成功", overlay: true});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
formatSize(size) {
|
||||
if (size == "0") {
|
||||
return "-";
|
||||
}
|
||||
size = parseFloat(size);
|
||||
let units = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "BB"];
|
||||
let step = 1024;
|
||||
let unitIndex = 0;
|
||||
while (true) {
|
||||
if (size > 1024) {
|
||||
size = parseFloat(size / step).toFixed(2);
|
||||
unitIndex++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return size + units[unitIndex];
|
||||
},
|
||||
getFiles() {
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cardId: this.cardSetting.cardId,
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_file_list_json"
|
||||
}
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
that.list = r.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
getCardDetail() {
|
||||
let that = this;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_browse_card_info_json",
|
||||
cardId: this.cardSetting.cardId,
|
||||
isBorrow: false,
|
||||
boId: "",
|
||||
isEdit: true,
|
||||
dimensionId: this.cardSetting.dimensionId
|
||||
}
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
that.cardSetting.type = "editor";
|
||||
let data = r.data;
|
||||
let card = data.card;
|
||||
that.validDate = card.validDate;
|
||||
let secrecyLevel = card.securityLevel;
|
||||
let secrecy = "普通";
|
||||
if (secrecyLevel == 1) {
|
||||
that.defaultIndex3 = 1;
|
||||
secrecy = "秘密";
|
||||
} else if (secrecyLevel == 2) {
|
||||
secrecy = "机密";
|
||||
that.defaultIndex3 = 2;
|
||||
}
|
||||
let commentl = "允许评论";
|
||||
if (!card.isComment || card.isComment == 0) {
|
||||
that.defaultIndex4 = 1;
|
||||
commentl = "禁止评论";
|
||||
}
|
||||
let rate = "允许打分";
|
||||
if (!card.isRate || card.isRate == 0) {
|
||||
that.defaultIndex1 = 1;
|
||||
rate = "禁止打分";
|
||||
}
|
||||
let onlineLevel = "转换PDF格式在线阅读,允许下载";
|
||||
if (card.onlineLevel == 2) {
|
||||
that.defaultIndex2 = 1;
|
||||
onlineLevel = "转换PDF格式在线阅读,禁止下载";
|
||||
} else if (card.onlineLevel == 0) {
|
||||
that.defaultIndex2 = 2;
|
||||
onlineLevel = "转换图片格式在线阅读,禁止下载(首次转换时间较长)";
|
||||
}
|
||||
that.secrecyLevel = secrecy;
|
||||
that.comment = commentl;
|
||||
that.grade = rate;
|
||||
that.control = onlineLevel;
|
||||
that.$refs.secrecyLevel.changeValue(secrecy);
|
||||
that.$refs.comment.changeValue(commentl);
|
||||
that.$refs.rate.changeValue(rate);
|
||||
that.$refs.control.changeValue(onlineLevel);
|
||||
that.knwlName = data.cardName;
|
||||
/*let re1 = new RegExp("<.+?>", "g");
|
||||
that.remarks = card.cardContext.replace(re1, "");*/
|
||||
//隐藏编辑页面的知识编辑
|
||||
that.remarks = card.cardContext;
|
||||
let validDateTmp = card.validDate;
|
||||
let datee = new Date();
|
||||
let mm = datee.getMonth() + 1;
|
||||
let day = datee.getDate();
|
||||
let currentDate = datee.getFullYear() + "-" + (mm < 10 ? "0" : "") + mm + "-" + (day < 10 ? "0" : "") + day;
|
||||
if (validDateTmp && validDateTmp != "" && validDateTmp < currentDate) {
|
||||
that.disableRelease = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onSelectChange(indx) {
|
||||
},
|
||||
onRelease() {
|
||||
this.onSave("release");
|
||||
},
|
||||
confirmDate(tmpdate) {
|
||||
if (tmpdate != "") {
|
||||
let date = new Date(tmpdate);
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
month = month < 10 ? "0" + month : month;
|
||||
day = day < 10 ? "0" + day : day;
|
||||
tmpdate = year + "-" + month + "-" + day;
|
||||
let datee = new Date();
|
||||
let mm = datee.getMonth() + 1;
|
||||
let currDay = datee.getDate();
|
||||
let currentDate = datee.getFullYear() + "-" + (mm < 10 ? "0" : "") + mm + "-" + (currDay < 10 ? "0" : "") + currDay;
|
||||
if (tmpdate < currentDate) {
|
||||
this.disableRelease = true;
|
||||
} else {
|
||||
this.disableRelease = false;
|
||||
}
|
||||
} else {
|
||||
this.disableRelease = false;
|
||||
}
|
||||
},
|
||||
cancelDate() {
|
||||
this.validDate = "";
|
||||
},
|
||||
downloadFile(obj) {
|
||||
localStorage.setItem("cardSetting", JSON.stringify(this.cardSetting));
|
||||
window.location.href = obj.fileDownloadURL;
|
||||
},
|
||||
fileOperatePreview(obj) {
|
||||
localStorage.setItem("cardSetting", JSON.stringify(this.cardSetting));
|
||||
let fileType = obj.fileName.lastIndexOf(".") > -1 ? obj.fileName.substring(obj.fileName.lastIndexOf(".") + 1, obj.fileName.length) : "";
|
||||
let tmpSetting = this.kmsSetting;
|
||||
let previewTypes = tmpSetting.browserPreview.split(",");
|
||||
let hasType = false;
|
||||
previewTypes.forEach((ob, index) => {
|
||||
if (ob == fileType) {
|
||||
hasType = true;
|
||||
}
|
||||
});
|
||||
let data = {};
|
||||
if (hasType || obj.fileState == 2) {// 浏览器直接预览,不调用onlinedoc
|
||||
data = {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_browser_preview",
|
||||
fileId: obj.id
|
||||
};
|
||||
} else {
|
||||
if (tmpSetting.isOnlinedocAppActive) {
|
||||
//showFullScreenPanel
|
||||
data = {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_preview_file",
|
||||
isDownload: false,
|
||||
isCopy: true,
|
||||
fileId: obj.id
|
||||
};
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: data
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data ? r.data.desc : r.msg, overlay: true});
|
||||
} else {
|
||||
let url = r.data.url;
|
||||
var head = document.location.origin + "/portal";
|
||||
if (url.indexOf("./df") > -1) {
|
||||
url = url.replace("./df", head + "/r/df");
|
||||
} else {
|
||||
url = url.replace("./w", head + "/r/w");
|
||||
}
|
||||
try {
|
||||
if (awsWebview.openWebviewPost(url, null) === false) {
|
||||
window.location.href = url;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getSettingFile() {
|
||||
// 获取知识列表数据
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_mobile_check_fullsearch"
|
||||
}
|
||||
}).then(function (r) {
|
||||
that.kmsSetting = r.data.setting;
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.displayContent = false;
|
||||
let h = window.innerHeight - 64;
|
||||
this.heights = "height:" + h + "px;";
|
||||
let tmpParams = this.$route.params;
|
||||
if (tmpParams.cardId == undefined) {
|
||||
tmpParams = JSON.parse(localStorage.getItem("cardSetting"));
|
||||
localStorage.setItem("cardSetting", "");
|
||||
}
|
||||
this.getSettingFile();
|
||||
this.cardSetting = tmpParams;
|
||||
if (this.cardSetting.type != "create") {
|
||||
this.getCardDetail();
|
||||
this.getFiles();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.knowledge {
|
||||
height: calc(100% - 64px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 0 12px;
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 11px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .icon {
|
||||
float: left;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.list li .icon .awsui-iconfont {
|
||||
font-size: 16px;
|
||||
color: #FFB800;
|
||||
}
|
||||
|
||||
.list li .left {
|
||||
width: calc(100% - 35px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
.list li .left .title {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
line-height: 18px;
|
||||
margin-bottom: 4px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
|
||||
.list li .left .description {
|
||||
color: #999999;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list li .left .description .line {
|
||||
display: inline-block;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.list li .right {
|
||||
/*width: 50px;*/
|
||||
text-align: right;
|
||||
float: right;
|
||||
/*margin-top: 18px;*/
|
||||
color: #D54C4C;
|
||||
}
|
||||
|
||||
.list li .right .awsui-iconfont {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
padding: 16px 0 20px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content span {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.content .img {
|
||||
width: 86px;
|
||||
height: 86px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
/*width: 100%;*/
|
||||
width: calc(100% / 2 - 12px);
|
||||
margin-right: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.footer .van-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.upfile-title {
|
||||
border: 1px dashed #ccc;
|
||||
width: calc(100% - 40px);
|
||||
display: inline-block;
|
||||
padding: 8px;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #e9e9e9 !important;
|
||||
}
|
||||
|
||||
.van-picker-column {
|
||||
overflow: unset !important;
|
||||
width: calc(100% - 64px) !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
/*控制输入框的内容不与下拉箭头重叠*/
|
||||
.knowledge .van-field__body {
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
194
com.actionsoft.apps.kms.mobile/pages/release-apply.vue
Normal file
194
com.actionsoft.apps.kms.mobile/pages/release-apply.vue
Normal file
@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<div class="apply">
|
||||
<van-form>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="applyName"
|
||||
required
|
||||
label="申请人"
|
||||
placeholder="请输入申请人"
|
||||
:rules="[{ required: true, message: '申请人不能为空' }]"
|
||||
/>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="knwlName"
|
||||
label="知识名称"
|
||||
placeholder="请输入知识名称"
|
||||
/>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="knwlPath"
|
||||
label="知识路径"
|
||||
placeholder=""
|
||||
/>
|
||||
<van-field
|
||||
class="background"
|
||||
v-model="admin"
|
||||
label="管理员"
|
||||
placeholder=""
|
||||
/>
|
||||
<van-field
|
||||
class="border"
|
||||
v-model="remarks"
|
||||
required
|
||||
:autosize="{ maxHeight: 100, minHeight: 100 }"
|
||||
type="textarea"
|
||||
label="备注"
|
||||
placeholder=""
|
||||
/>
|
||||
</van-form>
|
||||
<div class="divide"></div>
|
||||
<ul class="list">
|
||||
<li v-for="(item,index) in list" :key="index">
|
||||
<div class="icon">
|
||||
<i class="awsui-iconfont" v-html="item.icon"></i>
|
||||
</div>
|
||||
<div class="title">
|
||||
{{index+1}}、{{item.file}}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<van-button type="danger">作废</van-button>
|
||||
<van-button plain type="info" @click="onSave">保存</van-button>
|
||||
<van-button type="info" @click="onHandle">办理</van-button>
|
||||
<van-button type="default">更多</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vanFieldSelect from '@/components/fieldSelect'
|
||||
import vanFieldDate from '@/components/fieldDate'
|
||||
|
||||
export default {
|
||||
name: 'release-apply',
|
||||
components: {
|
||||
vanFieldSelect,
|
||||
vanFieldDate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
applyName: '司马懿',
|
||||
knwlName: 'AWS访问连接池参数调整',
|
||||
knwlPath: '知识目录 > 公司 > 重要文件',
|
||||
admin: '张飞',
|
||||
remarks: '',
|
||||
list: [
|
||||
{
|
||||
file: '这里是文件名称',
|
||||
icon: ''
|
||||
},
|
||||
{
|
||||
file: '这里是文件名称',
|
||||
icon: ''
|
||||
},
|
||||
{
|
||||
file: '这里是文件名称',
|
||||
icon: ''
|
||||
}
|
||||
],
|
||||
approveName: '诸葛亮'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSave(values) {
|
||||
console.log('submit', values)
|
||||
},
|
||||
onHandle() {
|
||||
this.$toast({
|
||||
message: '已发送给【' + this.approveName + '】审批',
|
||||
overlay: true,
|
||||
onClose: (() => {
|
||||
this.$router.push({
|
||||
name: 'release-approve'
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
control: function () {
|
||||
if (this.control === '阅读次数') {
|
||||
this.showReadTimes = true
|
||||
this.showDate = false
|
||||
} else {
|
||||
this.showReadTimes = false
|
||||
this.showDate = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.apply {
|
||||
height: calc(100% - 64px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 7px 12px;
|
||||
width: calc(100% - 24px);
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 5px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list li .icon {
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.list li .icon .awsui-iconfont {
|
||||
font-size: 23px;
|
||||
color: #FFB800;
|
||||
}
|
||||
|
||||
.list li .title {
|
||||
width: calc(100% - 33px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
line-height: 20px;
|
||||
color: #565656;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
width: calc(100% / 4 - 12px);
|
||||
margin-right: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.footer .van-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
323
com.actionsoft.apps.kms.mobile/pages/release-approve.vue
Normal file
323
com.actionsoft.apps.kms.mobile/pages/release-approve.vue
Normal file
@ -0,0 +1,323 @@
|
||||
<template>
|
||||
<div class="approve">
|
||||
<van-form @submit="onSubmit" style="padding:0 16px;">
|
||||
<van-field
|
||||
v-model="applyName"
|
||||
label="申请人"
|
||||
/>
|
||||
<van-field
|
||||
v-model="knwlName"
|
||||
label="知识名称"
|
||||
/>
|
||||
<van-field
|
||||
v-model="knwlPath"
|
||||
label="知识路径"
|
||||
/>
|
||||
<van-field
|
||||
v-model="admin"
|
||||
label="管理员"
|
||||
/>
|
||||
<van-field
|
||||
v-model="documentClass"
|
||||
label="文档类别"
|
||||
/>
|
||||
<van-field
|
||||
v-model="projectProcess"
|
||||
label="项目过程"
|
||||
/>
|
||||
<van-field
|
||||
v-model="tags"
|
||||
label="标签"
|
||||
/>
|
||||
<van-field
|
||||
v-model="remarks"
|
||||
label="备注"
|
||||
/>
|
||||
</van-form>
|
||||
<div class="divide"></div>
|
||||
<ul class="list">
|
||||
<li v-for="(item,index) in list" :key="index">
|
||||
<div class="icon">
|
||||
<i class="awsui-iconfont" v-html="item.icon"></i>
|
||||
</div>
|
||||
<div class="title">
|
||||
{{index+1}}、{{item.file}}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="divide"></div>
|
||||
<div class="steps" :class="recordList.length==1?'center':''">
|
||||
<span class="title" style="margin-bottom: 15px;">审批记录</span>
|
||||
<div class="items" v-for="(item,index) in recordList" :key="index">
|
||||
<span class="left">
|
||||
<label class="head">
|
||||
<img :src="item.headImg" alt="">
|
||||
</label>
|
||||
<label class="name">{{item.name}}</label>
|
||||
</span>
|
||||
<span class="right">
|
||||
<label class="title" :style="index==recordList.length-1?'padding:0':''">{{item.title}}</label>
|
||||
<label class="date">{{item.date}}</label>
|
||||
<label class="circle" :class="{'active':currentActive==index}"></label>
|
||||
<label class="line" :style="index==recordList.length-1?'height:30px;':''"></label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button type="danger">不同意</van-button>
|
||||
<van-button type="info">同意</van-button>
|
||||
<van-button type="default">更多</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vanFieldSelect from '@/components/fieldSelect'
|
||||
import vanFieldDate from '@/components/fieldDate'
|
||||
|
||||
export default {
|
||||
name: 'release-approve',
|
||||
components: {
|
||||
vanFieldSelect,
|
||||
vanFieldDate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
applyName: '司马懿',
|
||||
knwlName: 'AWS访问连接池参数调整',
|
||||
knwlPath: '知识目录 > 公司 > 重要文件',
|
||||
admin: '张飞',
|
||||
documentClass: '销售;流程管理方案库;流程管理;项目管理',
|
||||
projectProcess:'流程管理方案库;流程管理;项目管理; 流程管理方案库;流程管理;项目管理',
|
||||
tags:'这里是标签内容;标签的内容;',
|
||||
remarks: '申请发布',
|
||||
list: [
|
||||
{
|
||||
file: '这里是文件名称',
|
||||
icon: ''
|
||||
},
|
||||
{
|
||||
file: '这里是文件名称',
|
||||
icon: ''
|
||||
},
|
||||
{
|
||||
file: '这里是文件名称',
|
||||
icon: ''
|
||||
}
|
||||
],
|
||||
currentActive: 1,
|
||||
recordList: [
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
title: '发布申请 (提交)',
|
||||
date: '2019-12-10 08:22:23'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/logo.png'),
|
||||
name: '司马懿',
|
||||
title: '发布审批 (正在办理)',
|
||||
date: '2019-12-10 09:32:17'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
title: '发布审批 (办理中)',
|
||||
date: '2019-12-10 08:22:23'
|
||||
},
|
||||
{
|
||||
headImg: require('../assets/header.png'),
|
||||
name: '司马懿',
|
||||
title: '办理成功',
|
||||
date: '2019-12-10 08:22:23'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(values) {
|
||||
console.log('submit', values)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.approve {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.approve .van-form .van-cell {
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.approve .van-form .van-cell:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
width: calc(100% / 3 - 12px);
|
||||
margin-right: 12px;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.footer .van-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.approve .steps {
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
padding: 16px 14px 0;
|
||||
margin-bottom: 63px;
|
||||
}
|
||||
|
||||
.approve .center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.approve .steps .items {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/*.approve .steps .active {
|
||||
color: #3CA772;
|
||||
background-color: #3CA772;
|
||||
}*/
|
||||
.approve .steps .left {
|
||||
width: 46px;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.approve .steps .left .head {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #e0e0e0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.approve .steps .left .head img {
|
||||
max-width: 70%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.approve .steps .left .name {
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.approve .steps .right {
|
||||
width: calc(100% - 90px);
|
||||
padding: 10px 0 40px 40px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.approve .steps .title {
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
min-height: 20px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.approve .steps .date {
|
||||
color: #666;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.approve .steps .items .circle, .approve .steps .active .circle {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 11px;
|
||||
background-color: #3CA772;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.approve .steps .active .circle {
|
||||
background-color: #3CA772;
|
||||
}
|
||||
|
||||
.approve .steps .items .line {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 16px;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
.list {
|
||||
padding: 7px 12px;
|
||||
width: calc(100% - 24px);
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 5px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list li .icon {
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.list li .icon .awsui-iconfont {
|
||||
font-size: 23px;
|
||||
color: #FFB800;
|
||||
}
|
||||
|
||||
.list li .title {
|
||||
width: calc(100% - 33px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
line-height: 20px;
|
||||
color: #565656;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
514
com.actionsoft.apps.kms.mobile/pages/release-knowledge.vue
Normal file
514
com.actionsoft.apps.kms.mobile/pages/release-knowledge.vue
Normal file
@ -0,0 +1,514 @@
|
||||
<template>
|
||||
<div class="release" v-if="showRelease">
|
||||
<div class="title" style="font-weight: bold;">发布知识:{{title}}</div>
|
||||
<div class="release-data" :style="datastyle">
|
||||
<div class="knowlSelect">
|
||||
<van-field
|
||||
v-model="publishDimensionNames"
|
||||
label="知识维度"
|
||||
required
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
input-align="right"
|
||||
@click="onDimension"
|
||||
/>
|
||||
</div>
|
||||
<div class="divide"></div>
|
||||
<ul class="list">
|
||||
<li v-for="(item,index) in list" :key="index">
|
||||
<div :class="item.isNullable==1?'title':'title required' " >
|
||||
{{item.schemaTitle}}
|
||||
<span v-show="item.showType==1" @click="clearData(item)" style="float: right">清空</span>
|
||||
</div>
|
||||
<div class="con">
|
||||
<span v-show="item.showType<2" class="classify"
|
||||
:style="(index+1)%3===0?'width: calc(100% / 3 - 17px); margin-right:1px;':''"
|
||||
v-for="(el,index) in item.attrList" :key="index" @click="onClassify(el,item)"
|
||||
:class="{classActive:el.active}">
|
||||
<label class="name">{{el.attrTitle}}</label>
|
||||
</span>
|
||||
<div v-show="item.showType==2">
|
||||
<van-field v-model="item.value" placeholder="请输入..." />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tag">
|
||||
<div class="name" style="font-size: 14px;">标签</div>
|
||||
<ul class="con">
|
||||
<span class="classify classActive"
|
||||
:style="(index+1)%3===0?'width: calc(100% / 3 - 17px); margin-right:1px;':''"
|
||||
v-for="(el,index) in itemArr" :key="index" @click="onClassify(el)">
|
||||
<label class="name">{{el}}</label>
|
||||
<i class="awsui-iconfont" style="font-size: 12px;" @click="deleteExceptPrice(index,el)"></i>
|
||||
</span>
|
||||
</ul>
|
||||
<van-field class="tag-field" v-model="tagValue" placeholder="添加标签 最多10个">
|
||||
<template #button>
|
||||
<button class="button" @click="addExceptPrice"><span class="line"></span>添加</button>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<van-button type="default" @click="backHome">取消</van-button>
|
||||
<van-button type="info" @click="onRelease">发布</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<knowDimension @dimensionBack="dimensionBack" :publishDimensionData="publishDimensionData" v-else></knowDimension>
|
||||
<!--<van-notify v-model="notifyshow" type="success">-->
|
||||
<!--<van-icon name="bell" style="margin-right: 4px;" />-->
|
||||
<!--<span>通知内容</span>-->
|
||||
<!--</van-notify>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vanFieldSelect from '@/components/fieldSelect'
|
||||
import knowDimension from '@/pages/know-dimension'
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'release-knowledge',
|
||||
components: {
|
||||
vanFieldSelect,
|
||||
knowDimension
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val:'',
|
||||
title:'',
|
||||
id: '',
|
||||
notifyshow:false,
|
||||
showRelease:true,
|
||||
publishDimensionNames: '',
|
||||
publishDimensionIds:[],
|
||||
publishPerm:"",
|
||||
publishDimensionData:{},
|
||||
classify: '',
|
||||
classifyOption: ['AWS5产品线', 'AWS6产品线'],
|
||||
list: [
|
||||
{
|
||||
id: 'release1',
|
||||
schemaTitle: '文档类别',
|
||||
attrList: [
|
||||
{
|
||||
id: 'wordClass',
|
||||
attrTitle: '制度',
|
||||
active: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'release2',
|
||||
schemaTitle: '项目过程',
|
||||
attrList: [
|
||||
{
|
||||
id: 'manage1',
|
||||
attrTitle: '项目管理',
|
||||
active: false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
itemArr: [],
|
||||
tagValue: '',
|
||||
authority:true, //是否有权限
|
||||
datastyle:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backHome(){
|
||||
window.history.back();
|
||||
},
|
||||
onDimension() {
|
||||
this.showRelease = false;
|
||||
},
|
||||
dimensionBack(dimensionData,type){
|
||||
this.showRelease = true;
|
||||
if(type=='ok'){
|
||||
let namesTmp = "";
|
||||
this.publishDimensionData = dimensionData;
|
||||
let tmpData = dimensionData;
|
||||
let indx = 0;
|
||||
if(Object.keys(tmpData).length>0){
|
||||
for (let key of Object.keys(tmpData)) {
|
||||
let item = tmpData[key];
|
||||
if(indx==0){
|
||||
this.publishPerm = item['publishPerm'];
|
||||
}
|
||||
this.publishDimensionIds.push(item['id']);
|
||||
namesTmp+=item['name']+",";
|
||||
indx++;
|
||||
}
|
||||
if(namesTmp.length>0){
|
||||
this.publishDimensionNames = namesTmp.substring(0,namesTmp.length-1);
|
||||
}
|
||||
}else{
|
||||
this.publishDimensionIds=[];
|
||||
this.publishDimensionNames='';
|
||||
}
|
||||
}
|
||||
},
|
||||
clearData(itemTmp){
|
||||
itemTmp.attrList.forEach((ob, index) => {
|
||||
ob.active = false;
|
||||
})
|
||||
},
|
||||
onClassify(el,itemTmp) {
|
||||
if(!el.active){
|
||||
if(itemTmp.showType==1){//单选
|
||||
itemTmp.attrList.forEach((ob, index) => {
|
||||
ob.active = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
el.active = !el.active;
|
||||
},
|
||||
publishCardSchemaDiv(){
|
||||
//初始化元数据
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_mobile_schema_attr_list_json"
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
that.list = r.data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
addExceptPrice() {
|
||||
if(this.tagValue.trim()==''){
|
||||
this.$toast({message: '请输入标签内容', overlay: true});
|
||||
return false;
|
||||
}else{
|
||||
//点击添加
|
||||
if(this.itemArr.length==10){
|
||||
this.$toast({message: '添加标签 最多10个', overlay: true});
|
||||
}else{
|
||||
if (this.itemArr.length<10&&this.tagValue != ''&&!this.itemArr.includes(this.tagValue)) {
|
||||
this.itemArr.push(this.tagValue)
|
||||
}
|
||||
}
|
||||
this.tagValue = "";
|
||||
}
|
||||
},
|
||||
|
||||
deleteExceptPrice(index) {
|
||||
//删除一项
|
||||
this.itemArr.splice(index, 1)
|
||||
},
|
||||
onRelease() {
|
||||
let that = this;
|
||||
if(Object.keys(this.publishDimensionData).length==0){
|
||||
this.$toast({message: '请选择要发布到的知识分类', overlay: true});
|
||||
return false;
|
||||
}
|
||||
let tags = this.itemArr.join('@`@');
|
||||
if (tags && tags != '') {
|
||||
tags = '@`@' + tags + '@`@'; // 前后包裹分隔符,便于SQL查询
|
||||
}
|
||||
let newschemaMetaData01=[];
|
||||
let schemaMetaData2=[];
|
||||
let isNull = false;
|
||||
for(let k=0;k<this.list.length;k++){
|
||||
let obj = this.list[k];
|
||||
if(obj.showType==2){
|
||||
let val = obj.value?obj.value:'';
|
||||
if(obj.isNullable==0&&val.trim()==''){
|
||||
this.$toast({message:'元数据['+obj.schemaTitle+']不允许为空', overlay: true});
|
||||
return false;
|
||||
}
|
||||
schemaMetaData2[schemaMetaData2.length] = {
|
||||
metaValue: val.trim(),
|
||||
schemaId: obj.id
|
||||
};
|
||||
}else{
|
||||
let attrList = obj.attrList;
|
||||
let activeL = 0;
|
||||
for(let j=0;j<attrList.length;j++){
|
||||
let ob = attrList[j];
|
||||
if(ob.active){
|
||||
activeL++;
|
||||
newschemaMetaData01.push({
|
||||
attrId:ob.id,
|
||||
schemaId:ob.schemaId
|
||||
})
|
||||
}
|
||||
}
|
||||
if(obj.isNullable==0&&activeL==''){
|
||||
this.$toast({message:'元数据['+obj.schemaTitle+']不允许为空', overlay: true});
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
let schemaMetaData ={
|
||||
'01': newschemaMetaData01, // 复选框和单选按钮
|
||||
'2': schemaMetaData2
|
||||
}
|
||||
let cardIds = [];
|
||||
cardIds.push(this.id);
|
||||
if (this.publishPerm==='publish') {
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_publish_card",
|
||||
publishCardIds: JSON.stringify(cardIds),
|
||||
publishDimensionIds: JSON.stringify(this.publishDimensionIds),
|
||||
schemaMetaData: encodeURIComponent(JSON.stringify(schemaMetaData)),
|
||||
tags: encodeURIComponent(tags),
|
||||
publishMemo: encodeURIComponent("")
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true})
|
||||
} else {
|
||||
that.$toast({
|
||||
message: '已发布',
|
||||
overlay: true,
|
||||
onClose(){
|
||||
that.$router.push({
|
||||
name: 'myknwl'
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_publish_card_process_start_mobile",
|
||||
cardIds: JSON.stringify(cardIds),
|
||||
dimensionId: this.publishDimensionIds[0],
|
||||
schemaMetaData: encodeURIComponent(JSON.stringify(schemaMetaData)),
|
||||
tags: encodeURIComponent(tags),
|
||||
publishMemo: encodeURIComponent("")
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true})
|
||||
} else {
|
||||
window.location.href=r.data.url;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.dimensionValue = this.$route.params.dir
|
||||
this.id = this.$route.params.id;
|
||||
this.title = this.$route.params.name;
|
||||
localStorage.setItem("publishhome",this.$route.params.type);
|
||||
})
|
||||
let hh = window.innerHeight-130;
|
||||
this.datastyle = "height:"+hh+"px";
|
||||
},
|
||||
created(){
|
||||
let publishf =localStorage.getItem("publishflag");
|
||||
let publishhome =localStorage.getItem("publishhome");
|
||||
if(publishf=="true"){
|
||||
localStorage.setItem("publishflag",undefined);
|
||||
localStorage.setItem("publishhome",undefined);
|
||||
this.$router.push({
|
||||
name: publishhome=="myknowledge"?'myknwl':"knwldir"
|
||||
})
|
||||
}
|
||||
this.publishCardSchemaDiv();
|
||||
},
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.release {
|
||||
height: calc(100% - 64px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.title {
|
||||
width: 96%;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
line-height: 22px;
|
||||
padding: 15px;
|
||||
background: #F8F8F8;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.knowlSelect {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
line-height: 19px;
|
||||
padding: 7px 0 7px 7px;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list, .tag {
|
||||
padding: 0 15px;
|
||||
width: calc(100% - 30px);
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 12px 0 4px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .title, .tag .title {
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
background: none;
|
||||
width: 100%;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
.list li .con, .tag .con {
|
||||
padding: 12px 0 0;
|
||||
position: relative;
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list li .con .classify, .tag .con .classify {
|
||||
width: calc(100% / 3 - 16px - 10px);
|
||||
height: 30px;
|
||||
line-height: 16px;
|
||||
padding: 5px 8px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 2px;
|
||||
background: #F5F5F5;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tag .con .classify {
|
||||
height: auto;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.list li .con .classify .name, .tag .con .classify .name {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.list li .con .classify:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.tag {
|
||||
clear: both;
|
||||
padding: 8px 15px;
|
||||
width: calc(100% - 30px);
|
||||
}
|
||||
|
||||
.tag .title {
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.tag .con {
|
||||
padding: 12px 0 0;
|
||||
}
|
||||
|
||||
.con .classActive {
|
||||
background: #E1EFFF !important;
|
||||
color: #1B6EC9;
|
||||
}
|
||||
|
||||
.tag .tag-field {
|
||||
padding: 3px 0 3px 10px;
|
||||
border: 0.33px solid #e9e9e9;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.tag .button {
|
||||
border: none;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
font-size: 12px;
|
||||
background: none;
|
||||
color: #4A90E2;
|
||||
padding-right: 10px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tag .button .line {
|
||||
display: inline-block;
|
||||
width: 1px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
background: #d6d6d6;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 12px;
|
||||
position: fixed;
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
z-index: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer .van-button {
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
width:40%;
|
||||
border-radius: 2px;
|
||||
padding: 0 !important;
|
||||
margin: 0px 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
.classify .name{
|
||||
font-size: 13px;
|
||||
}
|
||||
.required:before{
|
||||
content: '*';
|
||||
color: red;
|
||||
}
|
||||
.release-data{
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
576
com.actionsoft.apps.kms.mobile/pages/sub-knwldir.vue
Normal file
576
com.actionsoft.apps.kms.mobile/pages/sub-knwldir.vue
Normal file
@ -0,0 +1,576 @@
|
||||
<template>
|
||||
<div class="knwldir">
|
||||
<van-search v-model="value" placeholder="请输入文件内容关键词" @allSearch="getDimensionCardList"/>
|
||||
<div class="top" ref="top">
|
||||
<span v-for="(item,index) in tablist" :key="index" >
|
||||
<span class="tabname" :style="(index<(tablist.length-1)?'color: #378DEC;':'color: #333;')" @click="(index<(tablist.length-1)?backtop(item.id,item.parentHasPerm):'')">{{item.name}}</span>
|
||||
<span v-show="index<(tablist.length-1)"> <i style="font-size: 12px" class="awsui-iconfont"></i> </span>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="content" :style="contentH">
|
||||
<div class="item">
|
||||
<van-cell
|
||||
is-link
|
||||
v-for="(item, index) in list"
|
||||
clickable
|
||||
:key="index"
|
||||
@click="onCell($event,item,index)"
|
||||
>
|
||||
<i class="awsui-iconfont" :style="item.hasPerm?'':'color:#c8c9cc;'" :class="{default:item.default}"></i>{{item.name}}
|
||||
</van-cell>
|
||||
</div>
|
||||
<div v-show="hasPerm&&list.length>0&&cardlist.length>0" class="divide"></div>
|
||||
<div :style="heights" v-show="cardlist.length>0">
|
||||
<ul class="list" :style="heights">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
@load="downLoad"
|
||||
finished-text="没有更多了"
|
||||
loading-text="加载中..."
|
||||
:offset="offset"
|
||||
>
|
||||
<li v-for="(item,index) in cardlist" :key="index" @click="(isNeedBorrow&&item.createUser!=item.uid)?'':onDetail(item)">
|
||||
<div class="left">
|
||||
<div class="title">{{item.cardName}}</div>
|
||||
<div class="description">
|
||||
<label>
|
||||
{{item.publishUsername}}
|
||||
</label>
|
||||
<label v-if="item.cardContext!=''" class="line">|</label>
|
||||
<label>
|
||||
{{item.publishTime}}
|
||||
</label>
|
||||
<label class="line">|</label>
|
||||
<label>阅读(<font>{{item.readCount}}</font>)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="isDimensionManager||isNeedBorrow" class="right" @click.stop="openDialog(item)">
|
||||
<i v-show="isNeedBorrow&&item.createUser!=item.uid" class="awsui-iconfont"></i>
|
||||
<i v-show="!isNeedBorrow" class="awsui-iconfont" ></i>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</van-list>
|
||||
</ul>
|
||||
</div>
|
||||
<van-loading v-show="initLoad" size="24" style="line-height: 120px;height: 120px;text-align: center"/>
|
||||
<div v-show="!initLoad&&list.length==0&&cardlist.length==0">
|
||||
<div class="con">
|
||||
<div class="img">
|
||||
<img src="../assets/no_content.png" alt="" style="width: 110px;">
|
||||
</div>
|
||||
<div class="text">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-dialog v-model="showDialog" show-cancel-button @confirm="handleDialog">
|
||||
<span style="text-align: center;padding: 20px 0;display: inline-block;width: 100%;">{{dialogMsg}}</span>
|
||||
</van-dialog>
|
||||
<van-action-sheet v-model="showShare" :title="activeCardName">
|
||||
<div class="content" style="width: 100%;padding: 20px 0px">
|
||||
<div class="options_op" @click="editorFun">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">编辑</div>
|
||||
</div>
|
||||
<div class="options_op" @click="publishFun">
|
||||
<div class="icon" ><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">发布</div>
|
||||
</div>
|
||||
<div class="options_op" @click="unPublish">
|
||||
<div class="icon"><i class="awsui-iconfont" style="color: red;"></i></div>
|
||||
<div class="label">取消发布</div>
|
||||
</div>
|
||||
<div class="options_op" @click="logData">
|
||||
<div class="icon"><i class="awsui-iconfont"></i></div>
|
||||
<div class="label">日志</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'sub-knwldir',
|
||||
data() {
|
||||
return {
|
||||
contentH:"",
|
||||
offset:10,
|
||||
isLoadingData:false,
|
||||
loading:false,
|
||||
finished:false,
|
||||
initLoad:true,//初始化页面标志
|
||||
curPage:0,
|
||||
heights:"",
|
||||
hasPerm:true,
|
||||
value: '',
|
||||
id: 0,
|
||||
name: '',
|
||||
list: [],
|
||||
cardlist:[],
|
||||
showShare:false,
|
||||
tablist:[
|
||||
{
|
||||
name:"目录",
|
||||
id:""
|
||||
}
|
||||
],
|
||||
menuActiveId:"",
|
||||
tabicon:">",
|
||||
showDialog:false,
|
||||
dialogMsg:"确认启动知识借阅流程吗?",
|
||||
currentParentId:"",
|
||||
activePublishId:"",
|
||||
activeCardName:"",
|
||||
cardId:'',
|
||||
isDimensionManager:false,
|
||||
isNeedBorrow:false //是否展示借阅按钮
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
downLoad(){
|
||||
setTimeout(()=>{
|
||||
this.getDimensionCardList(this.currentParentId);
|
||||
})
|
||||
},
|
||||
editorFun(){
|
||||
localStorage.setItem("dimensionhasPerm",this.hasPerm);
|
||||
localStorage.setItem("dimensionhasId",this.currentParentId);
|
||||
localStorage.setItem("dimensionhasPath",JSON.stringify(this.tablist));
|
||||
this.$router.push({
|
||||
name: 'new-knowledge',
|
||||
params: {
|
||||
cardId: this.cardId,
|
||||
dimensionId:this.currentParentId,
|
||||
type:"editor"
|
||||
}
|
||||
})
|
||||
},
|
||||
publishFun(){
|
||||
localStorage.setItem("dimensionhasPerm",this.hasPerm);
|
||||
localStorage.setItem("dimensionhasId",this.currentParentId);
|
||||
localStorage.setItem("dimensionhasPath",JSON.stringify(this.tablist));
|
||||
let that = this;
|
||||
that.publicCardId = this.cardId;
|
||||
// 获取知识列表数据
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_check_card_has_file",
|
||||
cardIds:JSON.stringify([this.cardId])
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result != "ok") {
|
||||
that.$toast({message: r.msg, overlay: true});
|
||||
} else {
|
||||
that.$router.push({
|
||||
name: 'release-knowledge',
|
||||
params: {
|
||||
id: that.publicCardId,
|
||||
type:"myknowledge"
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
unPublish(){
|
||||
let title = this.tablist[this.tablist.length-1]['name'];
|
||||
this.dialogMsg="确认取消发布知识目录["+title+"]下的知识["+this.activeCardName+"]吗?";
|
||||
this.showDialog =true;
|
||||
this.showShare = false;
|
||||
},
|
||||
logData(){
|
||||
localStorage.setItem("dimensionhasPerm",this.hasPerm);
|
||||
localStorage.setItem("dimensionhasId",this.currentParentId);
|
||||
localStorage.setItem("dimensionhasPath",JSON.stringify(this.tablist));
|
||||
this.showShare = false;
|
||||
this.$router.push({
|
||||
name: 'knwlborrow',
|
||||
params: {
|
||||
id: this.cardId,
|
||||
name:this.activeCardName,
|
||||
}
|
||||
})
|
||||
},
|
||||
onDetail(item){
|
||||
localStorage.setItem("dimensionhasPerm",item.hasPerm);
|
||||
localStorage.setItem("dimensionhasId",this.currentParentId);
|
||||
localStorage.setItem("dimensionhasPath",JSON.stringify(this.tablist));
|
||||
this.$router.push({
|
||||
name: 'know-detail',
|
||||
params: {
|
||||
id: item.cardId,
|
||||
dimensionId:this.currentParentId
|
||||
}
|
||||
})
|
||||
},
|
||||
onCell(event, item, index) {
|
||||
if(item.id!=""){
|
||||
this.currentParentId = item.id;
|
||||
this.refreshData(item);
|
||||
}
|
||||
},
|
||||
refreshData(item){
|
||||
this.curPage=0;
|
||||
this.getDimensionList(item.id);
|
||||
this.hasPerm = item.hasPerm;
|
||||
if(item.hasPerm){
|
||||
this.getDimensionCardList(item.id);
|
||||
}else{
|
||||
this.cardlist=[];
|
||||
}
|
||||
},
|
||||
backtop(parentId,parentHasPerm){
|
||||
if(parentId==''){
|
||||
localStorage.setItem("dimensionhasPerm",undefined);
|
||||
localStorage.setItem("dimensionhasId",undefined);
|
||||
localStorage.setItem("dimensionhasPath",undefined);
|
||||
this.$router.push({
|
||||
name: 'knwldir'
|
||||
})
|
||||
}else{
|
||||
this.currentParentId =parentId;
|
||||
this.hasPerm =parentHasPerm;
|
||||
this.curPage=0;
|
||||
this.getDimensionList(parentId);
|
||||
if(parentHasPerm){
|
||||
this.getDimensionCardList(parentId);
|
||||
}else{
|
||||
this.cardlist=[];
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
openDialog(item){
|
||||
if(this.isNeedBorrow){
|
||||
this.showDialog = true;
|
||||
}else{
|
||||
this.showShare = true;
|
||||
}
|
||||
this.cardId=item.cardId;
|
||||
this.activeCardName=item.cardName;
|
||||
this.activePublishId=item.publishId;
|
||||
},
|
||||
handleDialog(){
|
||||
localStorage.setItem("dimensionhasPerm",this.hasPerm);
|
||||
localStorage.setItem("dimensionhasId",this.currentParentId);
|
||||
localStorage.setItem("dimensionhasPath",JSON.stringify(this.tablist));
|
||||
//借阅申请
|
||||
let that = this;
|
||||
if(!this.isNeedBorrow){
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_cancel_publish_card",
|
||||
publishId:this.activePublishId,
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.msg, overlay: true})
|
||||
} else {
|
||||
that.$toast({message: "取消发布成功", overlay: true});
|
||||
let datas = that.cardlist;
|
||||
for(let i=0;i<datas.length;i++){
|
||||
if(datas[i]["publishId"]==that.activePublishId){
|
||||
that.cardlist.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}else{
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_borrow_card_process_start_mobile",
|
||||
cardId:this.cardId,
|
||||
dimensionId:this.currentParentId
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.msg, overlay: true})
|
||||
} else {
|
||||
window.location.href=r.data.url;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getDimensionList(parentId){
|
||||
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_mobile_center_dimension_tree_json",
|
||||
parentId:parentId==''?this.$route.params.id:parentId,
|
||||
isDimensionKnwlPage:false
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
that.list = r.data.dimensionJA;
|
||||
let parentid = r.data.parentId;
|
||||
that.currentParentId = parentid;
|
||||
let tmpd = that.tablist;
|
||||
let indx = 0;
|
||||
let has = false;
|
||||
for(let n=0;n<tmpd.length;n++){
|
||||
if( tmpd[n]['id']==parentid){
|
||||
indx =n;
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(has){
|
||||
that.tablist=that.tablist.slice(0,indx+1);
|
||||
}else{
|
||||
that.tablist.push({
|
||||
name:r.data.parentLabel,
|
||||
id:parentid,
|
||||
parentHasPerm:that.hasPerm
|
||||
})
|
||||
}
|
||||
let size = that.list.length;
|
||||
if(size>0&&size<=4){
|
||||
let hh = window.innerHeight-43*size-54-12-36;
|
||||
that.heights = "height:"+hh+"px";
|
||||
}else if(size>4){
|
||||
let hh = window.innerHeight-43*4-54-12-36;
|
||||
that.heights = "height:"+hh+"px";
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getDimensionCardList(parentId){
|
||||
let that = this;
|
||||
if(this.curPage==0){
|
||||
this.finished=false;
|
||||
}
|
||||
if(this.isLoadingData){
|
||||
return;
|
||||
}
|
||||
this.isLoadingData = true;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_dimension_card_list_json",
|
||||
dimensionId: parentId==''?this.$route.params.id:parentId,
|
||||
curPage: this.curPage<=0?1:this.curPage+1,
|
||||
rowsPerPage:0,
|
||||
sortIndx: "publishTime",
|
||||
sortDir: "down",
|
||||
filter: encodeURIComponent(this.value)
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.initLoad = false;
|
||||
that.loading = false;
|
||||
that.isLoadingData = false;
|
||||
if (r.result == "error") {
|
||||
that.$toast({message: r.data?r.data.desc:r.msg, overlay: true});
|
||||
} else {
|
||||
let rowsPerPage = r.data.rowsPerPage;
|
||||
if(that.curPage==0){
|
||||
that.cardlist = r.data.data;
|
||||
}else{
|
||||
that.cardlist =that.cardlist.concat(r.data.data) ;
|
||||
}
|
||||
that.isNeedBorrow = r.data.isNeedBorrow;
|
||||
that.isDimensionManager = r.data.isDimensionManager;
|
||||
if(that.curPage*rowsPerPage>=r.data.totalRecords){
|
||||
that.finished=true;
|
||||
}
|
||||
that.curPage = r.data.curPage;
|
||||
}
|
||||
that.contentH = "height:"+(window.innerHeight-54-that.$refs.top.clientHeight)+"px";
|
||||
});
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value:function () {
|
||||
this.curPage=0;
|
||||
this.getDimensionCardList(this.currentParentId);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let dimendionId='';
|
||||
this.contentH = "height:"+(window.innerHeight-90)+"px";
|
||||
let tmphasPerm = this.$route.params.hasPerm;
|
||||
if(tmphasPerm==undefined){
|
||||
tmphasPerm= localStorage.getItem("dimensionhasPerm");
|
||||
dimendionId = localStorage.getItem("dimensionhasId");
|
||||
this.tablist = JSON.parse(localStorage.getItem("dimensionhasPath"));
|
||||
}
|
||||
this.getDimensionList(dimendionId);
|
||||
if(tmphasPerm!=undefined){
|
||||
this.hasPerm = tmphasPerm;
|
||||
}
|
||||
if(this.hasPerm ){
|
||||
this.getDimensionCardList(dimendionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.path_title{
|
||||
color:#378DEC;
|
||||
}
|
||||
.knwldir {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.knwldir .content {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
height: calc(100% - 105px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.knwldir .content .item {
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.knwldir .content .divide {
|
||||
background: #e9e9e9;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell {
|
||||
padding: 8px 0;
|
||||
/*border-bottom: 1px solid #efefef;*/
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell .awsui-iconfont {
|
||||
color: #FABD01;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell .default {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 9px 12px 7px;
|
||||
line-height: 18px;
|
||||
/*border-bottom: 0.33px solid #e9e9e9;*/
|
||||
font-size: 12px;
|
||||
}
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 11px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
/*border-bottom: 0.33px solid #e9e9e9;*/
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .left {
|
||||
width: calc(100% - 20px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list li .left .title {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
line-height: 18px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.list li .left .description {
|
||||
color: #999999;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list li .left .description .line {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #E8E8E8;
|
||||
}
|
||||
|
||||
.list li .right {
|
||||
width: 20px;
|
||||
text-align: right;
|
||||
float: right;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.list li .right .awsui-iconfont {
|
||||
color: #a4a4a4;
|
||||
}
|
||||
.list {
|
||||
padding: 0 12px;
|
||||
float: left;
|
||||
/*height: calc(100% - 86px);*/
|
||||
/*overflow: hidden;*/
|
||||
/*overflow-y: auto;*/
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
.top .tabname{
|
||||
font-size: 14px;
|
||||
}
|
||||
.top .tabname:last-child{
|
||||
color: #999 !important;
|
||||
}
|
||||
.con {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.con .img {
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.con .text {
|
||||
color: #999;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
.options_op{
|
||||
width: 25%;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.options_op .icon{
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.options_op .label{
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
</style>
|
||||
231
com.actionsoft.apps.kms.mobile/pages/sub-knwldir1.vue
Normal file
231
com.actionsoft.apps.kms.mobile/pages/sub-knwldir1.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<div class="knwldir">
|
||||
<van-search v-model="value" placeholder="请输入文件内容关键词" @allSearch="getDimensionCardList"/>
|
||||
<div class="content">
|
||||
<div class="top">
|
||||
<span v-html="tabPath"></span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<van-cell v-for="(item,index) in list" :key="index" is-link :to="{name:'knwlborrow', params: {id:item.id,path:(path+'>'+item.name)}}">
|
||||
<i class="awsui-iconfont" :class="item.default"></i>{{item.name}}
|
||||
</van-cell>
|
||||
</div>
|
||||
<div class="divide"></div>
|
||||
<ul class="list">
|
||||
<li v-for="(item,index) in cardlist" :key="index" @click="showDialog = true">
|
||||
<div class="left">
|
||||
<div class="title">{{item.cardName}}</div>
|
||||
<div class="description">
|
||||
<label>
|
||||
{{item.publishUsername}}
|
||||
</label>
|
||||
<label v-if="item.cardContext!=''" class="line">|</label>
|
||||
<label>
|
||||
{{item.publishTime}}
|
||||
</label>
|
||||
<label class="line">|</label>
|
||||
<label>阅读次数:
|
||||
<font>{{item.readCount}}</font>
|
||||
</label>
|
||||
<label class="line">|</label>
|
||||
<label>级别:
|
||||
<font>{{item.rdoSL}}</font>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<i class="awsui-iconfont"></i>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import awsuiAxios from "../awsuiAxios";
|
||||
export default {
|
||||
name: 'sub-knwldir1',
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
id: 0,
|
||||
name: '',
|
||||
list: [],
|
||||
path:"",
|
||||
tabPath:""
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getDimensionList(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_mobile_center_dimension_tree_json",
|
||||
parentId:this.$route.params.id,
|
||||
isDimensionKnwlPage:false
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
that.list = r.data.dimensionJA;
|
||||
}
|
||||
});
|
||||
},
|
||||
getDimensionCardList(){
|
||||
let that = this;
|
||||
awsuiAxios.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
cmd: "com.actionsoft.apps.kms_knwl_center_dimension_card_list_json",
|
||||
dimensionId: this.$route.params.id,
|
||||
curPage: 1,
|
||||
rowsPerPage: 50,
|
||||
sortIndx: "publishTime",
|
||||
sortDir: "down",
|
||||
filter: encodeURIComponent(this.value)
|
||||
|
||||
},
|
||||
}).then(function (r) {
|
||||
that.loading = false;
|
||||
if (r.result == "error") {
|
||||
alert(r.msg);
|
||||
} else {
|
||||
that.list = r.data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
let path1 = this.$route.params.path.split(">");
|
||||
let pathName = `<span style="color:#378DEC;">知识目录</span>` ;
|
||||
let path1L = path1.length;
|
||||
for(let i=0;i<path1L;i++){
|
||||
if(i<path1L-1){
|
||||
pathName+='>'+'<span style="color:#378DEC;">'+path1[i]+'</span>';
|
||||
}else{
|
||||
pathName+='>'+path1[i];
|
||||
}
|
||||
}
|
||||
this.name= pathName;
|
||||
this.path=this.$route.params.path;
|
||||
this.getDimensionList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.path_title{
|
||||
color:#378DEC;
|
||||
}
|
||||
.knwldir {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.knwldir .content {
|
||||
border-top: 0.33px solid #e9e9e9;
|
||||
height: calc(100% - 105px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.knwldir .content .item {
|
||||
padding: 0 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.knwldir .content .divide {
|
||||
background: #e9e9e9;
|
||||
width: 100%;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell {
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell .awsui-iconfont {
|
||||
color: #03A76B;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.knwldir .content .van-cell .default {
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
.top {
|
||||
padding: 9px 12px 7px;
|
||||
line-height: 18px;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
font-size: 12px;
|
||||
}
|
||||
.list li {
|
||||
float: left;
|
||||
padding: 11px 0;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li:not(:last-child) {
|
||||
border-bottom: 0.33px solid #e9e9e9;
|
||||
}
|
||||
|
||||
.list li .left {
|
||||
width: calc(100% - 20px);
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.list li .left .title {
|
||||
font-size: 13px;
|
||||
color: #333;
|
||||
line-height: 18px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.list li .left .description {
|
||||
color: #999999;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.list li .left .description .line {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #E8E8E8;
|
||||
}
|
||||
|
||||
.list li .right {
|
||||
width: 20px;
|
||||
text-align: right;
|
||||
float: right;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.list li .right .awsui-iconfont {
|
||||
color: #a4a4a4;
|
||||
}
|
||||
.list {
|
||||
padding: 0 12px;
|
||||
float: left;
|
||||
height: calc(100% - 86px);
|
||||
overflow-y: auto;
|
||||
width: calc(100% - 24px);
|
||||
}
|
||||
|
||||
.list span, .list label {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
167
com.actionsoft.apps.kms.mobile/router/index.js
Normal file
167
com.actionsoft.apps.kms.mobile/router/index.js
Normal file
@ -0,0 +1,167 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import store from '../store'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'knwlhome',
|
||||
component: function (res) {
|
||||
require(['@/pages/knwlhome'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '知识库'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/know-detail',
|
||||
name: 'know-detail',
|
||||
component: function (res) {
|
||||
require(['@/pages/know-detail'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '知识详情'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/knwldir',
|
||||
name: 'knwldir',
|
||||
component: function (res) {
|
||||
require(['@/pages/knwldir'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '目录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sub-knwldir/:id',
|
||||
name: 'sub-knwldir',
|
||||
component: function (res) {
|
||||
require(['@/pages/sub-knwldir'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '知识目录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/sub-knwldir1/:id',
|
||||
name: 'sub-knwldir1',
|
||||
component: function (res) {
|
||||
require(['@/pages/sub-knwldir1'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '知识目录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/knwlborrow/:id',
|
||||
name: 'knwlborrow',
|
||||
component: function (res) {
|
||||
require(['@/pages/knwlborrow'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '知识目录'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/borrow-apply',
|
||||
name: 'borrow-apply',
|
||||
component: function (res) {
|
||||
require(['@/pages/borrow-apply'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '借阅申请'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/borrow-approve',
|
||||
name: 'borrow-approve',
|
||||
component: function (res) {
|
||||
require(['@/pages/borrow-approve'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '借阅审批'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/myknwl',
|
||||
name: 'myknwl',
|
||||
component: function (res) {
|
||||
require(['@/pages/myknwl'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '我的'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/new-knowledge',
|
||||
name: 'new-knowledge',
|
||||
component: function (res) {
|
||||
require(['@/pages/new-knowledge'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '新建知识'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/release-knowledge',
|
||||
name: 'release-knowledge',
|
||||
component: function (res) {
|
||||
require(['@/pages/release-knowledge'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '发布知识'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/know-dimension',
|
||||
name: 'know-dimension',
|
||||
component: function (res) {
|
||||
require(['@/pages/know-dimension'], res)
|
||||
},
|
||||
meta: {
|
||||
title: '知识维度'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/devGetSession',
|
||||
name: 'devGetSession',
|
||||
component: () => import('../views/DevGetSession.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
/**
|
||||
*
|
||||
* to 表示将要跳转到的组件 (目标组件)
|
||||
* console.log(from); //(源组件)
|
||||
* next();
|
||||
* next 是一个函数
|
||||
* next() 进入下一个组件的钩子函数
|
||||
* next(false) 阻止跳转 中断导航
|
||||
* next("/login") 进入指定的组件的钩子函数
|
||||
*/
|
||||
// 路由守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (production === false && store.state.sessionId == null && to.path != "/devGetSession") {
|
||||
//进入一个路由获取session,获取session后再进入主入口
|
||||
next("/devGetSession");
|
||||
} else {
|
||||
//跳转前设置title
|
||||
//window.document.title = to.meta.title;
|
||||
next();
|
||||
}
|
||||
//to.matched.some(res=>{res.meta.isLogin}) 能够获取路由配置的参数
|
||||
|
||||
});
|
||||
|
||||
//跳转后设置scroll为原点
|
||||
router.afterEach((to, from, next) => {
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
export default router
|
||||
21
com.actionsoft.apps.kms.mobile/store/index.js
Normal file
21
com.actionsoft.apps.kms.mobile/store/index.js
Normal file
@ -0,0 +1,21 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
sessionId: settingParam.sessionId
|
||||
},
|
||||
mutations: {
|
||||
edit(state, data) {
|
||||
for (let p in data) {
|
||||
state[p] = data[p];
|
||||
}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
||||
40
com.actionsoft.apps.kms.mobile/views/DevGetSession.vue
Normal file
40
com.actionsoft.apps.kms.mobile/views/DevGetSession.vue
Normal file
@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<div class="devGetSession">
|
||||
正在获取session
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import router from "../router/index";
|
||||
import awsuiAxios from "../awsuiAxios/index";
|
||||
import store from "../store/index";
|
||||
awsuiAxios
|
||||
.post({
|
||||
url: "jd",
|
||||
data: {
|
||||
userid: devUserInfo.userid,
|
||||
pwd: devUserInfo.pwd,
|
||||
lang: "cn",
|
||||
cmd: "com.actionsoft.apps.getsession.get",
|
||||
deviceType: "mobile",
|
||||
},
|
||||
})
|
||||
.then(function (r) {
|
||||
// let r = response.data;
|
||||
if (r.result == "error") {
|
||||
//$.simpleAlert(r.msg, "error");
|
||||
alert("获取session错误:" + r.msg);
|
||||
} else {
|
||||
store.commit("edit", { sessionId: r.data.sid });
|
||||
router.replace("/");
|
||||
}
|
||||
});
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dwList: [], //dw的获取列表
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user