Browse Source

优化

master
陈裕财 4 years ago
parent
commit
cbe7d62e99
  1. 174
      src/views/xm/core/wiki/archive/WikiEdit.vue
  2. 597
      src/views/xm/core/wiki/archive/WikiList.vue
  3. 9
      src/views/xm/core/wiki/archive/WikiMenuEdit.vue
  4. 2
      src/views/xm/core/xmMenu/XmMenuEdit.vue
  5. 13
      src/views/xm/core/xmProduct/XmProductInfo.vue

174
src/views/xm/core/wiki/archive/WikiEdit.vue

@ -0,0 +1,174 @@
<template>
<section>
<el-row v-loading="load.list">
<el-col :span="24">
<!--新增界面 Archive 档案信息表-->
<el-form :model="editForm" label-width="120px" :rules="editFormRules" ref="editForm">
<el-form-item label="" label-width="0px">
<el-input placeholder="请输入标题" v-model="editForm.archiveTitle" @change="editSomeFields(editForm,'archiveTitle',$event)"></el-input>
</el-form-item>
<el-form-item label="" label-width="0px">
<vue-ueditor :key="editForm.id" class="rich-context" v-model="editForm.archiveContext"></vue-ueditor>
</el-form-item>
</el-form>
<el-row class="padding" v-if="this.currOpType=='edit'">
<el-button @click="saveSubmit()" type="primary" v-if="editForm.archiveContext!=editFormBak.archiveContext">保存</el-button>
</el-row>
<el-row class="padding" v-if="this.currOpType=='add'">
<el-button @click="saveSubmit()" type="primary">保存</el-button>
</el-row>
</el-col>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import seq from '@/common/js/sequence';//
import config from '@/common/config';//import
import {initDicts, addArchive,editArchive, getOneArchive,editSomeFieldsArchive,listArchive } from '@/api/mdp/arc/archive';
import { mapGetters } from 'vuex'
import VueUeditor from '@/components/Tinymce/index';
export default {
computed: {
...mapGetters([
'userInfo'
])
},
props:['archive','opType'],
watch: {
'archive.id':function( id ) {
this.initData();
}
},
data() {
return {
currOpType:'add',
dicts:{categoryType:[]},//
load:{ list:false, open:false, close:false, publish:false, unPublish:false, del:false,draft:false, edit:false },
editFormRules: {
archiveTitle: [
{ required: true, message: '标题不能为空', trigger: 'blur' }
],
archiveContext: [
{ required: true, message: '内容不能为空', trigger: 'blur' }
]
},
//
editForm: {
id:'',tagNames:'',deptid:'',userid:'',isShare:'',url:'',archiveAbstract:'',archiveContext:'',archiveTitle:'',archivingUserid:'',isFromArchiving:'',archivingDate:'',createDate:'',authorUserid:'',authorName:'',canDel:'',canEdit:'',canRead:'',bizKey:'',encryptType:'',canComment:'',status:'',isStorageDir:'',branchId:'',titleImgUrl:'',type:'',duration:'',tagIds:'',archiveType:'',imageUrls:'',linkArchives:'',readNums:'',commentNums:'',linkAds:'',linkUsers:'',extInfos:'',praiseSum:'',isHot:'',isMain:'',openComment:'',opDate:'',seqNo:'',pbizKey:'',ctime:''
},
editFormInit: {
id:'',tagNames:'',deptid:'',userid:'',isShare:'',url:'',archiveAbstract:'',archiveContext:'',archiveTitle:'',archivingUserid:'',isFromArchiving:'',archivingDate:'',createDate:'',authorUserid:'',authorName:'',canDel:'',canEdit:'',canRead:'',bizKey:'',encryptType:'',canComment:'',status:'',isStorageDir:'',branchId:'',titleImgUrl:'',type:'',duration:'',tagIds:'',archiveType:'',imageUrls:'',linkArchives:'',readNums:'',commentNums:'',linkAds:'',linkUsers:'',extInfos:'',praiseSum:'',isHot:'',isMain:'',openComment:'',opDate:'',seqNo:'',pbizKey:'',ctime:''
},
editFormBak: {
id:'',tagNames:'',deptid:'',userid:'',isShare:'',url:'',archiveAbstract:'',archiveContext:'',archiveTitle:'',archivingUserid:'',isFromArchiving:'',archivingDate:'',createDate:'',authorUserid:'',authorName:'',canDel:'',canEdit:'',canRead:'',bizKey:'',encryptType:'',canComment:'',status:'',isStorageDir:'',branchId:'',titleImgUrl:'',type:'',duration:'',tagIds:'',archiveType:'',imageUrls:'',linkArchives:'',readNums:'',commentNums:'',linkAds:'',linkUsers:'',extInfos:'',praiseSum:'',isHot:'',isMain:'',openComment:'',opDate:'',seqNo:'',pbizKey:'',ctime:''
},
/**end 在上面加自定义属性**/
}//end return
},//end data
methods: {
saveSubmit(){
if(this.currOpType=='add'){
this.addSubmit()
}else{
this.editSomeFields(this.editForm,'archiveContext',this.editForm.archiveContext);
}
},
addSubmit(){
var addParmas={archive:{...this.editForm},categoryId:this.xmProduct.id}
addParmas.archive.bizKey=this.xmProduct.id
addParmas.archive.pbizKey=this.xmProduct.id
addArchive(addParmas).then((res) => {
this.load.edit = false;
var tips=res.data.tips;
if(tips.isOk){
this.$emit('submit');// @submit="aftereditSubmit"
Object.assign(this.editForm,res.data.data)
this.editFormBak={...this.editForm}
this.currOpType="edit"
}
this.$message({ message: tips.msg, type: tips.isOk?'success':'error' });
}).catch(() => {
this.load.edit = false;
});
},
getArchvieDetail(){
this.load.list=true
getOneArchive({id:this.archive.id}).then(res=>{
this.load.list=false
if(res.data.tips.isOk){
if(res.data.data && res.data.data.id){
this.currOpType='edit'
this.editForm=res.data.data
this.editFormBak={...this.editForm}
}else{
this.currOpType='add'
Object.assign(this.editForm,this.editFormInit)
this.editFormBak={...this.editForm}
}
}
})
},
editSomeFields(row,fieldName,$event){
if(this.currOpType==='add'){
return;
}
let params={ids:[row.id]};
params[fieldName]=$event
var func = editSomeFieldsArchive
func(params).then(res=>{
let tips = res.data.tips;
if(tips.isOk){
this.editFormBak={...this.editForm}
this.$emit('edit-some-fields',this.editForm)
}else{
Object.assign(this.editForm,this.editFormBak)
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
}
}).catch((e)=>Object.assign(this.editForm,this.editFormBak))
},
initData(){
this.currOpType=this.opType
this.getArchvieDetail();
}
},//end method
components: {
VueUeditor
},
mounted() {
this.$nextTick(() => {
initDicts(this);
this.initData()
});
//this.getCategorys();
}//end mounted
}
</script>
<style scoped>
.box{
padding-top:10px;
margin-right: 10px;
margin-left: 10px;
}
.btn-bar{
align-items: center;
text-align: center;
}
</style>

597
src/views/xm/core/wiki/archive/WikiList.vue

@ -0,0 +1,597 @@
<template>
<section>
<el-row class="padding">
<el-row>
<el-input v-model="filters.key" style="width:20%;" clearable placeholder="按 标题 摘要 作者 模糊查询">
</el-input>
<el-select v-if="!archiveType" v-model="filters.categoryType" placeholder="请选择主题" clearable>
<el-option v-for="(it,index) in dicts.categoryType" :key="index" :value="it.id" :label="it.name">
</el-option>
</el-select>
<el-button type="primary" v-loading="load.list" v-on:click="searchArchives" icon="el-icon-search"> </el-button>
<el-button type="primary" @click="showAdd">新增</el-button>
<!--把记录变为取消发布 就是把状态变为2 并把ArchiveCategory删除对应的记录-->
<el-button v-loading="load.unPublish" @click="unPublishArchive" :disabled="this.sels.length===0" icon="el-icon-download">下架</el-button>
<el-popover
placement="top-start"
title=""
width="400"
v-model="moreVisible"
trigger="manual" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-input v-if="filters.queryScope=='iterationId'" size="mini" v-model="filters.id" style="width:100%;" placeholder="输入产品编号" @keyup.enter.native="searchXmProducts">
</el-input>
</el-col>
<el-checkbox v-model="filters.isMy" true-label="1" false-label="">我创建的</el-checkbox>
<el-col :span="24" style="padding-top:5px;">
<font class="more-label-font">创建日期:</font>
<date-range
v-model="filters"
type="daterange"
unlink-panels
start-key="fromStartTime"
end-key="toStartTime"
range-separator="至"
start-placeholder="创建日期"
end-placeholder="创建日期"
:auto-default="false" >
</date-range>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" type="primary" icon="el-icon-search" @click="searchArchives">查询</el-button>
<el-button size="mini" @click="moreVisible=false" icon="el-icon-close">关闭窗口</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button size="mini" v-loading="load.close" @click="closeArchiveComment" :disabled="this.sels.length===0" icon="el-icon-close">关闭评论</el-button>
<el-button size="mini" v-loading="load.open" @click="openArchiveComment" :disabled="this.sels.length===0" icon="el-icon-open">打开评论</el-button>
<el-button size="mini" type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0" icon="el-icon-delete"></el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle @click="moreVisible=!moreVisible"></el-button>
</el-popover>
</el-row>
<el-row>
<font v-if="filters.tags">
<el-tag
:key="tag.tagId"
v-for="tag in filters.tags"
:type="''"
closable
:disable-transitions="false"
@close="handleFiltersTagClose(tag,'tags')">
{{tag.tagName}}
</el-tag>
</font>
</el-row>
<el-row>
<!--列表 Archive 档案信息表-->
<el-table :data="archives" ref="table" :max-height="tableHeight" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick">
<el-table-column type="selection" width="40"></el-table-column>
<el-table-column type="index" width="40"></el-table-column>
<el-table-column prop="archiveType" label="主题" width="100">
<template slot-scope="scope">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'categoryType',scope.row.archiveType)" :key="index" :type="item.className">{{item.name}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="archiveTitle" label="标题" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
<el-link type='primary' @click="showEdit( scope.row,scope.$index)">{{scope.row.archiveTitle}}</el-link>
</template>
</el-table-column>
<el-table-column prop="authorName" label="作者" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="status" label="状态" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'archiveStatus',scope.row.status)" :key="index" :type="item.className">{{item.name}}</el-tag>
</template>
</el-table-column>
<!-- <el-table-column prop="categoryId" label="分类" min-width="80" show-overflow-tooltip :formatter="formatterCategoryid"></el-table-column> -->
<el-table-column prop="tagNames" label="标签" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="seqNo" label="排序" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="canComment" label="打开评论" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.canComment=='1'"></el-tag>
<el-tag type="info" v-else>×</el-tag>
</template>
</el-table-column>
<el-table-column prop="isMain" label="是否置顶" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.isMain=='1'"></el-tag>
<el-tag type="info" v-else>×</el-tag>
</template>
</el-table-column>
<el-table-column prop="isHot" label="推荐" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.isHot=='1'"></el-tag>
<el-tag type="info" v-else>×</el-tag>
</template>
</el-table-column>
<!--<el-table-column prop="deptid" label="创建部门" min-width="80" show-overflow-tooltip></el-table-column>-->
<!--
<el-table-column prop="isShare" label="是否共享" min-width="80" show-overflow-tooltip :formatter="formatterYesOrNo"></el-table-column>
<el-table-column prop="encryptType" label="加密类型" min-width="80" show-overflow-tooltip :formatter="formatterEncryptType"></el-table-column>
<el-table-column prop="archiveContext" label="内容" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="url" label="访问路径" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="createDate" label="创建日期" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="archivingUserid" label="归档人" min-width="80" show-overflow-tooltip></el-table-column>
<el-table-column prop="archivingDate" label="归档日期" min-width="80" show-overflow-tooltip></el-table-column>
-->
<el-table-column label="操作" width="200" fixed="right" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" @click="showDetail( scope.row,scope.$index)">预览</el-button>
<el-button type="text" @click="handleDel(scope.row,scope.$index)" icon="el-icon-delete" circle></el-button>
<el-button class="copyBtn" :data-clipboard-text = "arcBasePath+'/arc/archive/showArchive?id='+scope.row.id" type="text">复制地址</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
</el-row>
<!--编辑 Archive 档案信息表界面-->
<el-dialog title="编辑文章" :visible.sync="editFormVisible" :modal="false" fullscreen :close-on-click-modal="false" append-to-body>
<archive-edit v-if="editFormVisible" :op-type="'edit'" style="margin-top:-20px;" :archive="editForm" :archive-type="archiveType" :visible="editFormVisible" :category-name="categoryTree.selected.name" @cancel="editFormVisible=false" @submit="afterEditSubmit" @edit-some-fields="onEditSomeFields"></archive-edit>
</el-dialog>
<!--新增 Archive 档案信息表界面-->
<el-dialog title="新增文章" :visible.sync="addFormVisible" fullscreen :modal="false" :close-on-click-modal="false" append-to-body>
<archive-add v-if="addFormVisible" :op-type="'add'" style="margin-top:-20px;" :archive="addForm" :archive-type="archiveType" :category-name="categorys[0].name" :category-id="categorys[0].id" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></archive-add>
</el-dialog>
</section>
</template>
<script>
import util from '@/common/js/util';//
import config from '@/common/config';//
import { initDicts,listArchive, delArchive, batchDelArchive, openComment, closeComment, publish, unPublish } from '@/api/mdp/arc/archive';
import ArchiveAdd from './WikiEdit';//
import ArchiveEdit from './WikiEdit';//
import { mapGetters } from 'vuex'
import Clipboard from 'clipboard'
export default {
props:['xmProduct'],
computed: {
...mapGetters([
'userInfo'
])
},
watch:{
categorys(){
this.searchArchives();
}
},
data() {
return {
filters: {
key: '',
isMy:'',
categoryType:'',
categoryTreeNodes:[],
tags:[],
fromStartTime:null,
toStartTime:null,
},
archives: [],//
pageInfo:{//
total:0,//0>0
pageSize:10,//
pageNum:1,//1
orderFields:['seq_no'],// ['sex','student_id']
orderDirs:['asc']// asc,desc ['asc','desc']
},
sels: [],//
dicts:{categoryType:[],archiveStatus:[]},// options.sex,options.project
addFormVisible: false,//archive
//archive
addForm: {
id:'',tagNames:'',deptid:'',userid:'',isShare:'',url:'',archiveAbstract:'',archiveContext:'',archiveTitle:'',archivingUserid:'',isFromArchiving:'',archivingDate:'',createDate:'',authorUserid:'',authorName:'',canDel:'',canEdit:'',canRead:'',bizKey:'',encryptType:'',canComment:'1',status:'0',isStorageDir:'',isMain:'',isHot:'',seqNo:999
},
editFormVisible: false,//
//archive
editForm: {
id:'',tagNames:'',deptid:'',userid:'',isShare:'',url:'',archiveAbstract:'',archiveContext:'',archiveTitle:'',archivingUserid:'',isFromArchiving:'',archivingDate:'',createDate:'',authorUserid:'',authorName:'',canDel:'',canEdit:'',canRead:'',bizKey:'',encryptType:'',canComment:'1',status:'0',isStorageDir:'',isMain:'',isHot:'',seqNo:999
},
/**begin 自定义属性请在下面加 请加备注**/
categoryTree:{//
selected:{},//
refreshTree:false,
},
sendFormVisible:false,//
detailFormVisible:false,//
load:{ list:false, open:false, close:false, publish:false, unPublish:false, del:false },
arcBasePath: config.getArcImagePath(),
tagSelectVisible:false,
isBatchSetTags:false,
archiveTitle:"",//
tableHeight:300,
showLeft:true,
moreVisible:false,
/**end 自定义属性请在上面加 请加备注**/
}
},//end data
methods: {
...util,
handleSizeChange(pageSize) {
this.pageInfo.pageSize=pageSize;
this.pageInfo.count=true;
this.getArchives();
},
handleCurrentChange(pageNum) {
this.pageInfo.pageNum = pageNum;
this.getArchives();
},
// obj.order=ascending/descending, asc/desc ; obj.prop=,
sortChange( obj ){
var dir='asc';
if(obj.order=='ascending'){
dir='asc'
}else{
dir='desc';
}
if(obj.prop=='xxx'){
this.pageInfo.orderFields=['xxx'];
this.pageInfo.orderDirs=[dir];
}
this.getArchives();
},
searchArchives(){
this.pageInfo.count=true;
this.getArchives();
},
// Archive
getArchives() {
let params = {
pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum,
total: this.pageInfo.total,count:this.pageInfo.count,
};
if(this.pageInfo.orderFields!=null && this.pageInfo.orderFields.length>0){
let orderBys=[];
for(var i=0;i<this.pageInfo.orderFields.length;i++){
orderBys.push(this.pageInfo.orderFields[i]+" "+this.pageInfo.orderDirs[i])
}
params.orderBy= orderBys.join(",")
}
if(this.filters.key){
params.key= this.filters.key;
//params.archiveAbstract='%'+this.filters.key+'%';
//params.archiveContext='%'+this.filters.key+'%';
}
if(this.categorys!=null && this.categorys.length>0){
params.categoryIds=this.categorys.map(i=>i.id)
}
if(this.filters.tags!=null && this.filters.tags.length>0){
params.tagIds=this.filters.tags.map(i=>i.tagId)
}
if(this.filters.fromStartTime!=null && this.filters.toStartTime!=null){
params.fromStartTime=this.filters.fromStartTime
params.toStartTime=this.filters.toStartTime
}
if(this.filters.isMy){
params.authorUserid=this.userInfo.userid
}
if(this.archiveType){
params.archiveType=this.archiveType
}
if(this.filters.categoryType){
params.archiveType=this.filters.categoryType
}
params.branchId=this.userInfo.branchId
params.pbizKey=this.xmProduct.id
if(!params.pbizKey){
return;
}
this.load.list=true;
listArchive(params).then((res) => {
this.load.list=false;
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.total = res.data.data.total;this.pageInfo.count=false;
this.archives = res.data.data;
}else{
this.$message({ message: tips.msg, type: 'error' });
}
}).catch(() => {
this.load.list = false;
this.$message({ message: '访问错误', type: 'error' });
});
},
// Archive
showEdit: function ( row,index ) {
if(row.status == '3'){
this.$message.error('文章正在审核中,不能操作');
return;
}
this.editFormVisible = true;
this.editForm = row;
},
showDetail: function ( row,index ) {
let routerJump = this.$router.resolve({ path: '/mdp/arc/mate/archive/ArchiveDetail/'+row.id});
window.open(routerJump.href, '_blank');
},
// Archive
showAdd: function () {
if(this.categorys && this.categorys.length>0){
this.addFormVisible = true;
this.addForm.categoryId=this.categorys[0].id;
}else{
this.$message({ message: '请先选择分类', type: 'warning' });
}
},
afterAddSubmit(){
this.addFormVisible=false;
this.pageInfo.count=true;
this.categoryTree.refreshTree=!this.categoryTree.refreshTree
this.getArchives();
},
afterEditSubmit(){
this.editFormVisible=false;
this.getArchives();
},
//archive
selsChange: function (sels) {
this.sels = sels;
},
//archive
handleDel: function (row,index) {
if(row.status == '3'){
this.$message.error('文章正在审核中,不能操作');
return;
}
this.$confirm('确认删除该记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.load.del = true;
let params = { id: row.id };
delArchive(params).then((res) => {
this.load.del = false;
var tips=res.data.tips;
if(tips.isOk){
this.pageInfo.count=true;
this.getArchives();
this.categoryTree.refreshTree=!this.categoryTree.refreshTree
}
this.$message({ message: tips.msg, type: tips.isOk?'success':'error' });
});
}).catch(() => {
this.load.del = false;
});
},
//archive
batchDel: function () {
var ids = this.sels.map(item => item.id);
this.$confirm('确认删除选中记录吗?', '提示', {
type: 'warning'
}).then(() => {
this.load.del = true;
batchDelArchive(ids).then((res) => {
this.load.del = false;
var tips=res.data.tips;
if( tips.isOk ){
this.pageInfo.count=true;
this.getArchives();
this.categoryTree.refreshTree=!this.categoryTree.refreshTree
}
this.$message({ message: tips.msg, type: tips.isOk?'success':'error'});
});
}).catch(() => {
this.load.del = false;
});
},
rowClick: function(row, event, column){
this.$emit('row-click',row, event, column);// @row-click="rowClick"
},
handleFiltersTagClose:function(tag,paramsName){
if(paramsName=='key'){
this.filters.key=null;
}else if(paramsName=='categoryTreeNodes'){
this.categorys=this.categorys.filter(i=>i.id!=tag.id);
this.$refs.categoryTree.$refs.nodeTree.setChecked(tag.id,false,false);
}else if(paramsName=='tags'){
this.filters.tags=this.filters.tags.filter(i=>i.tagId!=tag.tagId);
}
},
onTagSelected(tags){
this.tagSelectVisible=false;
if(this.isBatchSetTags==true){
//TOD
if(!tags || tags.length==0){
this.$message.error("最少选中一个标签");
this.isBatchSetTags=false;
return;
}
var archiveTagsVos=[];
this.sels.forEach(row=>{
var archiveTags={
archiveId:row.id,
branchId:row.branchId,
userid:this.userInfo.userid,
tags:tags.map(i=>{return {tagId:i.tagId,tagName:i.tagName}})
}
archiveTagsVos.push(archiveTags);
})
var params= archiveTagsVos
batchInsertOrDeleteTags(params).then(res=>{
this.isBatchSetTags=false;
if(res.data.tips.isOk){
var tagIds=tags.map(i=>i.tagId).join(",");
var tagNames=tags.map(i=>i.tagName).join(",");
this.sels.forEach(row=>{
row.tagIds=tagIds
row.tagNames=tagNames
})
this.$message.success("打标签成功");
}else{
this.$message.error(res.data.tips.msg);
}
}).catch(e=>this.isBatchSetTags=false);
}else{
if(tags==null){
this.filters.tags=null
}else{
this.filters.tags=tags
}
}
},
showTagSelect:function(isBatchSetTags){
if(isBatchSetTags==true){
if(this.sels.length==0){
this.$message.error("请选中文章");
return false;
}
this.tagSelectVisible=true;
}else{
this.tagSelectVisible=true;
}
this.isBatchSetTags=isBatchSetTags;
},
// Archive
showSend: function ( row,index ) {
this.sendFormVisible = true;
this.editForm = Object.assign({}, row);
},
openArchiveComment: function(){
this.load.open=true
let ids=this.sels.map(i=>i.id)
openComment(ids).then(res=>{
this.load.open=false
this.getArchives()
});
},
closeArchiveComment: function(){
this.load.close=true
let ids=this.sels.map(i=>i.id)
closeComment(ids).then(res=>{
this.load.close=false
this.getArchives()
});
},
publishArchive: function(row,index){
if(row.status == '3'){
this.$message.error('文章正在审核中,不能操作');
return;
}
this.editForm = Object.assign(this.editForm,row);
this.archiveTitle=row.archiveTitle
this.load.publish=true
},
unPublishArchive: function(){
this.load.unPublish=true
let ids=this.sels.map(i=>i.id)
unPublish(ids).then(res=>{
this.load.unPublish=false
this.getArchives()
});
},
copyArchiveUrl(row,index){
var clipBoardContent=config.getArcBasePath()+"/arc/archive/showArchive?id="+row.id;
window.clipboardData.setData("Text",clipBoardContent);
},
//
openDrawer() {
this.isShowNav = !this.isShowNav;
this.isShowNav ? this.itemSpan = 20 : this.itemSpan = 24;
},
onEditSomeFields(row){
Object.assign(this.editForm,row)
}
/**end 自定义函数请在上面加**/
},//end methods
components: {
'archive-add':ArchiveAdd,
ArchiveEdit,
},
mounted() {
this.$nextTick(() => {
initDicts(this)
this.tableHeight = util.calcTableMaxHeight(this.$refs.table.$el)
this.getArchives();
});
let clipboard = new Clipboard('.copyBtn');
}
}
</script>
<style scoped>
.filters-show {
margin-top: 14px;
margin-bottom: 10px;
}
.filters-label {
font-size: 10px;
color:black;
font-weight: bold;
}
.el-dialog__wrapper {
z-index: 1003 !important;
}
.v-modal {
z-index: 1003 !important;
}
.more-label-font{
text-align:center;
float:left;
padding-top:5px;
}
.itemTable {
position: relative;
}
.showMenuIcon {
background: #1a59b7;
color:#ffffff;
overflow: hidden;
position: fixed;
text-align:center;
vertical-align:middle;
margin-left: -10px;
margin-top:0vh;
width: 10px;
height: 40px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
</style>

src/views/xm/core/wiki/archive/ArchiveEdit.vue → src/views/xm/core/wiki/archive/WikiMenuEdit.vue

2
src/views/xm/core/xmMenu/XmMenuEdit.vue

@ -215,7 +215,7 @@ import XmMenuExchangeMng from '../xmMenuExchange/XmMenuExchangeMng.vue';
import XmSubWorkItem from "@/views/xm/core/xmMenuWorkItem/XmSubWorkItem";
import XmRecord from '../xmRecord/XmRecord'
import XmMyDoFocus from '@/views/myWork/my/components/DoFocus';
import ArchiveEdit from '@/views/xm/core/wiki/archive/ArchiveEdit';
import ArchiveEdit from '@/views/xm/core/wiki/archive/WikiMenuEdit';
export default {
computed: {

13
src/views/xm/core/xmProduct/XmProductInfo.vue

@ -93,6 +93,10 @@
</el-menu-item>
<el-submenu index="知识" class="hidden-md-and-down">
<template slot="title">知识</template>
<el-menu-item index="wiki" >
<span slot="title"><i class="el-icon-document"></i>wiki</span>
</el-menu-item>
<el-menu-item index="文档" >
<span slot="title"><i class="el-icon-document"></i>文档</span>
</el-menu-item>
@ -159,13 +163,15 @@
<xm-product-overview-complex v-if="infotype=='产品概览'" :xm-product="xmProduct"></xm-product-overview-complex>
<xm-iteration-for-link-complex v-if="infotype=='迭代'" ref="xmIterationMng" :xm-product="xmProduct"></xm-iteration-for-link-complex>
<xm-project-for-link-complex v-if="infotype=='项目'" ref="xmProjectForLink" :xm-product="xmProduct"></xm-project-for-link-complex>
<xm-menu-box v-if="infotype=='需求'" :xm-product="xmProduct"></xm-menu-box>
<xm-menu-box v-if="infotype=='需求'" :xm-product="xmProduct" class="padding-top"></xm-menu-box>
<xm-task-mng v-if="infotype=='产品任务'" ptype="1" queryScope="task" ref="productXmTaskMng" :xm-product="xmProduct" key="productXmTaskMng"></xm-task-mng>
<xm-task-mng v-if="infotype=='项目任务'" ptype="0" queryScope="task" ref="projectXmTaskMng" :xm-product="xmProduct" key="projectXmTaskMng"></xm-task-mng>
<xm-question v-if="infotype=='缺陷'" :xm-product='xmProduct' ref="xmQuestion"></xm-question>
<xm-group-mng v-if="infotype=='项目团队'" pgClass="0" :xm-product="xmProduct" key="projectGroup"></xm-group-mng>
<xm-group-mng v-if="infotype=='产品团队'" pgClass="1" :xm-product="xmProduct" key="productGroup"></xm-group-mng>
<xm-file-mng v-if="infotype=='文档'" :xm-product="xmProduct"></xm-file-mng>
<xm-file-mng v-if="infotype=='文档'" :xm-product="xmProduct"></xm-file-mng>
<wiki-list v-if="infotype=='wiki'" :xm-product="xmProduct"></wiki-list>
<xm-plan v-if="infotype=='产品计划'" ref="productPlan" ptype="1" queryScope="planTask" :xm-product="xmProduct" key="productPlan"></xm-plan>
<xm-plan v-if="infotype=='项目计划'" ref="projectPlan" ptype="0" queryScope="planTask" :xm-product="xmProduct" key="projectPlan"></xm-plan>
@ -221,6 +227,7 @@
import XmReport from '@/views/xm/rpt/reportIndex';
import XmMenuBox from '../xmMenu/XmMenuBox.vue';
import WikiList from '../wiki/archive/WikiList.vue';
export default {
@ -452,7 +459,7 @@ import XmMenuBox from '../xmMenu/XmMenuBox.vue';
XmProjectForLink,
XmReport,
xmPlan,
XmMenuBox,
WikiList,
//
},
mounted() {

Loading…
Cancel
Save