|
@@ -123,9 +123,11 @@
|
|
|
<a-tabs v-model="tabsKeys" size="large" :animated="false">
|
|
|
<a-tab-pane v-for="(item,index) in tabRouteList" :key="index + 1 + ''">
|
|
|
<span slot="tab">
|
|
|
- <span style="margin:0 12px 0 20px;">{{ item.name }}</span>
|
|
|
- <a-icon type="form" :style="{ color: '#000' }" @click.stop="handleEditTabClick(item,index)"/>
|
|
|
- <a-icon type="close" :style="{ color: '#000' }" @click.stop="handleDelTabClick(index)"/>
|
|
|
+ <div style="margin: 0 15px">
|
|
|
+ <span style="margin:0 12px 0 0;">{{ item.name }}</span>
|
|
|
+ <a-icon type="form" :style="{ color: '#000' }" @click.stop="handleEditTabClick(item,index)"/>
|
|
|
+ <a-icon type="close" :style="{ color: '#000' }" style="margin-right:0;" @click.stop="handleDelTabClick(index)"/>
|
|
|
+ </div>
|
|
|
</span>
|
|
|
<a-button type="dashed" style="width: 100%;color: #aaa;" @click.stop="addLearnInfo"><a-icon type="plus" style="margin-right: 8px;color: #aaa;" />新增学习内容</a-button>
|
|
|
<pageList :contents="item.contents" @delItem="handleDelItemClick" @actionItem="handleActionItemClick" @setAddMapData="setAddMapData"></pageList>
|
|
@@ -183,10 +185,10 @@
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="系统名称" prop="outerSystemName" v-show="learnForm.type==1">
|
|
|
- <a-input v-model="learnForm.outerSystemName" placeholder="请输入" />
|
|
|
+ <a-input v-model="learnForm.outerSystemName" :maxLength="20" placeholder="请输入" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="内容名称" prop="outerContentName" v-show="learnForm.type==1">
|
|
|
- <a-input v-model="learnForm.outerContentName" placeholder="请输入" />
|
|
|
+ <a-input v-model="learnForm.outerContentName" :maxLength="100" placeholder="请输入" />
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="访问地址" prop="outerAccessUrl" v-show="learnForm.type==1">
|
|
|
<a-input v-model="learnForm.outerAccessUrl" placeholder="请输入一个网址" />
|
|
@@ -370,18 +372,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- transCheckedTarget(arg) {
|
|
|
- this.choosePeople = arg
|
|
|
- },
|
|
|
- // 每页条数
|
|
|
- handleShowSizeChange(current, pageSize) {
|
|
|
- this.pageParam.pageNo = current
|
|
|
- this.pageParam.pageSize = pageSize;
|
|
|
- },
|
|
|
- // 跳转
|
|
|
- onChange(pageNumber) {
|
|
|
- this.pageParam.pageNo = pageNumber
|
|
|
- },
|
|
|
load(pkId = false) {
|
|
|
// 获取所属组织
|
|
|
OsGroupApi.getAllOsGroupList({dimId:1}).then(res => {
|
|
@@ -408,53 +398,69 @@ export default {
|
|
|
api.dic({alias: 'KNOWLEDGE_MAP'}).then(res => {
|
|
|
this.mapTypeList = res.data
|
|
|
if(pkId) {
|
|
|
- api.info({pkId:pkId}).then(res => {
|
|
|
- let info = res.data
|
|
|
- this.mapForm.type = this.mapTypeList.find(item => item.name == info.typeName).value
|
|
|
- this.mapForm.name = info.name
|
|
|
- this.mapForm.groupId = info.groupId.split(',')
|
|
|
- this.mapForm.groupSummary = info.groupSummary
|
|
|
- this.mapForm.groupPurview = info.groupPurview.toString()
|
|
|
- if(info.routes && info.routes.length) {
|
|
|
- let disposeRoutes = info.routes
|
|
|
- disposeRoutes.forEach(item => {
|
|
|
- if(!item.contents) {
|
|
|
- item.contents = []
|
|
|
- }
|
|
|
- })
|
|
|
- this.tabRouteList = disposeRoutes
|
|
|
- } else {
|
|
|
- this.tabRouteList = []
|
|
|
- }
|
|
|
- if(this.mapForm.groupPurview == 2) {
|
|
|
- let queryParam = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 9999,
|
|
|
- params: {
|
|
|
- pkId: pkId
|
|
|
- },
|
|
|
- sortField: '',
|
|
|
- sortOrder: 'asc'
|
|
|
- }
|
|
|
- api.purview(queryParam).then(res => {
|
|
|
- this.userList = res.result.data
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if(this.$route.query.timeStamp) {
|
|
|
this.timeStamp = this.$route.query.timeStamp
|
|
|
if(SessionCache.getCache(this.timeStamp)) {
|
|
|
- let info = SessionCache.getCache(this.timeStamp)
|
|
|
- this.mapForm.type = info.type ? this.mapTypeList.find(item => item.value == info.type).value : undefined
|
|
|
- this.mapForm.name = info.name
|
|
|
- this.mapForm.groupId = info.groupId ? info.groupId.split(',') : []
|
|
|
- this.mapForm.groupSummary = info.groupSummary
|
|
|
- this.mapForm.groupPurview = info.groupPurview && info.groupPurview.toString()
|
|
|
- if(this.mapForm.groupPurview == 2) {
|
|
|
- this.userList = info.purviewUsers
|
|
|
+ let info = SessionCache.getCache(this.timeStamp)
|
|
|
+ this.mapForm.type = info.type ? this.mapTypeList.find(item => item.value == info.type).value : undefined
|
|
|
+ this.mapForm.name = info.name
|
|
|
+ this.mapForm.groupId = info.groupId ? info.groupId.split(',') : []
|
|
|
+ this.mapForm.groupSummary = info.groupSummary
|
|
|
+ this.mapForm.groupPurview = info.groupPurview && info.groupPurview.toString()
|
|
|
+ if(this.mapForm.groupPurview == 2) {
|
|
|
+ this.userList = info.purviewUsers
|
|
|
+ }
|
|
|
+ this.tabRouteList = info.routes
|
|
|
+ } else {
|
|
|
+ api.info({pkId:pkId}).then(res => {
|
|
|
+ let info = res.data
|
|
|
+ this.mapForm.type = this.mapTypeList.find(item => item.name == info.typeName).value
|
|
|
+ this.mapForm.name = info.name
|
|
|
+ this.mapForm.groupId = info.groupId.split(',')
|
|
|
+ this.mapForm.groupSummary = info.groupSummary
|
|
|
+ this.mapForm.groupPurview = info.groupPurview.toString()
|
|
|
+ if(info.routes && info.routes.length) {
|
|
|
+ let disposeRoutes = info.routes
|
|
|
+ disposeRoutes.forEach(item => {
|
|
|
+ if(!item.contents) {
|
|
|
+ item.contents = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tabRouteList = disposeRoutes
|
|
|
+ } else {
|
|
|
+ this.tabRouteList = []
|
|
|
+ }
|
|
|
+ if(this.mapForm.groupPurview == 2) {
|
|
|
+ let queryParam = {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ params: {
|
|
|
+ pkId: pkId
|
|
|
+ },
|
|
|
+ sortField: '',
|
|
|
+ sortOrder: 'asc'
|
|
|
+ }
|
|
|
+ api.purview(queryParam).then(res => {
|
|
|
+ this.userList = res.result.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if(this.$route.query.timeStamp) {
|
|
|
+ this.timeStamp = this.$route.query.timeStamp
|
|
|
+ if(SessionCache.getCache(this.timeStamp)) {
|
|
|
+ let info = SessionCache.getCache(this.timeStamp)
|
|
|
+ this.mapForm.type = info.type ? this.mapTypeList.find(item => item.value == info.type).value : undefined
|
|
|
+ this.mapForm.name = info.name
|
|
|
+ this.mapForm.groupId = info.groupId ? info.groupId.split(',') : []
|
|
|
+ this.mapForm.groupSummary = info.groupSummary
|
|
|
+ this.mapForm.groupPurview = info.groupPurview && info.groupPurview.toString()
|
|
|
+ if(this.mapForm.groupPurview == 2) {
|
|
|
+ this.userList = info.purviewUsers
|
|
|
+ }
|
|
|
+ this.tabRouteList = info.routes
|
|
|
}
|
|
|
- this.tabRouteList = info.routes
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -472,7 +478,7 @@ export default {
|
|
|
},
|
|
|
// 组织切换
|
|
|
handleTreeChange(value) {
|
|
|
- this.mapForm.groupPurview = ''
|
|
|
+ this.mapForm.groupPurview = '1'
|
|
|
this.userList = []
|
|
|
},
|
|
|
// 选中节点
|
|
@@ -570,7 +576,6 @@ export default {
|
|
|
...this.routeForm,
|
|
|
})
|
|
|
} else {
|
|
|
- console.log(this.routeForm)
|
|
|
// 找到tabRouteList中大于等于routeForm.sort的索引
|
|
|
let itemIndex = this.tabRouteList.findIndex(item => item.sort >= this.routeForm.sort)
|
|
|
if(itemIndex == -1) {
|
|
@@ -677,7 +682,6 @@ export default {
|
|
|
},
|
|
|
// 选中知识
|
|
|
async handleKnowledgeChange(value) {
|
|
|
- console.log(value)
|
|
|
let res = await api.knowledgeSnapshot({'pkId': value})
|
|
|
this.knowledgeInfo = res.data
|
|
|
},
|
|
@@ -692,6 +696,7 @@ export default {
|
|
|
// this.$message.error('已添加相同的学习内容')
|
|
|
// return
|
|
|
// }
|
|
|
+ // 外部系统
|
|
|
let systemInfo = tabs.filter(item => item.outerSystemName == this.learnForm.outerSystemName)
|
|
|
if(systemInfo.some(item => item.outerContentName == this.learnForm.outerContentName)) {
|
|
|
this.$message.error('已添加相同的学习内容')
|
|
@@ -702,6 +707,11 @@ export default {
|
|
|
...this.learnForm
|
|
|
})
|
|
|
} else {
|
|
|
+ // 站内知识
|
|
|
+ if(tabs.some(item => item.knowledgeId == this.learnForm.knowledgeId)) {
|
|
|
+ this.$message.error('已添加相同的学习内容')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.saveLoading = true
|
|
|
tabs.unshift({
|
|
|
...this.learnForm,
|
|
@@ -793,6 +803,18 @@ export default {
|
|
|
}
|
|
|
SessionCache.setCache(this.timeStamp,data)
|
|
|
},
|
|
|
+ transCheckedTarget(arg) {
|
|
|
+ this.choosePeople = arg
|
|
|
+ },
|
|
|
+ // 每页条数
|
|
|
+ handleShowSizeChange(current, pageSize) {
|
|
|
+ this.pageParam.pageNo = current
|
|
|
+ this.pageParam.pageSize = pageSize;
|
|
|
+ },
|
|
|
+ // 跳转
|
|
|
+ onChange(pageNumber) {
|
|
|
+ this.pageParam.pageNo = pageNumber
|
|
|
+ },
|
|
|
//加载左树下的子节点
|
|
|
onLoadGroupTree(treeNode) {
|
|
|
if (treeNode.dataRef.children) {
|