调整
This commit is contained in:
parent
de770f0b33
commit
a1a3cec421
@ -75,7 +75,7 @@ body #app .hideSidebar .sidebar-container {
|
||||
width: 65px !important;
|
||||
}
|
||||
body #app .openSidebar .sidebar-container {
|
||||
width:180px !important;
|
||||
width:220px !important;
|
||||
}
|
||||
body #app .sidebar-container .nest-menu .el-sub-menu>.el-sub-menu__title,
|
||||
body #app .sidebar-container .el-sub-menu .el-menu-item {
|
||||
@ -344,7 +344,7 @@ body #app .hideSidebar .main-container {
|
||||
margin-left: 65px;
|
||||
}
|
||||
body #app .main-container {
|
||||
margin-left: 180px;
|
||||
margin-left: 220px;
|
||||
background:#f9fafe;
|
||||
background-size:100%;
|
||||
}
|
||||
|
53
src/api/tool/toolRelation.js
Normal file
53
src/api/tool/toolRelation.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询tool_relation列表
|
||||
export function listRelation(query) {
|
||||
return request({
|
||||
url: '/system/relation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询tool_relation详细
|
||||
export function getRelation(id) {
|
||||
return request({
|
||||
url: '/system/relation/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增tool_relation
|
||||
export function addRelation(data) {
|
||||
return request({
|
||||
url: '/system/relation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改tool_relation
|
||||
export function updateRelation(data) {
|
||||
return request({
|
||||
url: '/system/relation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除tool_relation
|
||||
export function delRelation(id) {
|
||||
return request({
|
||||
url: '/system/relation/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取关联树列表
|
||||
export function getDataThree(data) {
|
||||
return request({
|
||||
url: '/system/relation/get/three',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
ref="fileUpload"
|
||||
>
|
||||
<!-- 上传按钮 -->
|
||||
<el-button size="mini" type="primary">选取文件</el-button>
|
||||
<el-button size="mini" type="primary">上传文件</el-button>
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
||||
请上传
|
||||
|
@ -11,7 +11,7 @@
|
||||
:auto-upload="true"
|
||||
:http-request="uploadFile"
|
||||
show-file-list>
|
||||
<el-button slot="trigger" size="small" type="primary" @click="isFolder = false">选取文件</el-button>
|
||||
<el-button slot="trigger" size="small" type="primary" @click="isFolder = false">上传文件</el-button>
|
||||
<el-button size="small" type="primary" @click="handleUploadFile" >
|
||||
上传文件夹
|
||||
</el-button>
|
||||
|
@ -12,7 +12,7 @@
|
||||
:auto-upload="true"
|
||||
:http-request="uploadFile"
|
||||
show-file-list>
|
||||
<el-button slot="trigger" size="small" type="primary" >选取文件</el-button>
|
||||
<el-button slot="trigger" size="small" type="primary" >上传文件</el-button>
|
||||
<el-button size="small" type="primary" @click="handleUploadFile" >
|
||||
上传文件夹
|
||||
</el-button>
|
||||
@ -21,7 +21,7 @@
|
||||
multiple="multiple" />
|
||||
|
||||
<!-- <input v-show="false" type="file" ref="fileRef" webkitdirectory @change="handleFolderUpload">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件夹</el-button>-->
|
||||
<el-button slot="trigger" size="small" type="primary">上传文件夹</el-button>-->
|
||||
</el-upload>
|
||||
<div slot="tip" class="el-upload__tip" >只能上传{{acceptType}}文件</div>
|
||||
<div v-show="progressFlag" class="head-img">
|
||||
|
@ -8,23 +8,24 @@
|
||||
:append-to-body="true"
|
||||
:close-on-press-escape="false"
|
||||
@close="handleClose"
|
||||
style="height: 100%"
|
||||
>
|
||||
<template v-if="isTxt">
|
||||
<!-- 在文本框中预览文件内容 -->
|
||||
<el-input type="textarea" :rows="40" v-model="resultContentObj">
|
||||
<el-input type="textarea" :rows="30" v-model="resultContentObj" >
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-if="isDocx">
|
||||
<vue-office-docx
|
||||
:src="docxData"
|
||||
style="height: 100vh;"
|
||||
style="height: 600px;"
|
||||
@rendered="rendered"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="isPdf">
|
||||
<vue-office-pdf
|
||||
:src="pdfFileData"
|
||||
style="height: 100vh;"
|
||||
style="height: 600px;"
|
||||
@rendered="renderedHandler"
|
||||
@error="errorHandler"
|
||||
/>
|
||||
|
@ -92,7 +92,7 @@ export default {
|
||||
type: Function,
|
||||
default: (row, index, toolData, selectInfoData)=>{
|
||||
if (toolData) {
|
||||
return toolData.findIndex(item=>item.id===row.id)<0
|
||||
return toolData.findIndex(item=>item.toolId===row.toolId)<0
|
||||
}else {
|
||||
return true
|
||||
}
|
||||
@ -133,20 +133,27 @@ export default {
|
||||
recordStatus: 'done',
|
||||
},
|
||||
selectInfoData: [],
|
||||
//需要过滤的ids
|
||||
filterToolIds: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//来源、序号、是否多选
|
||||
init(source,index,multiple){
|
||||
init(source,index,multiple,ids){
|
||||
this.filterToolIds = []
|
||||
this.visible = true
|
||||
this.source = source
|
||||
this.index = index
|
||||
this.multiple= multiple
|
||||
this.filterToolIds = ids
|
||||
this.resetQuery()
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
if(this.filterToolIds && this.filterToolIds.length > 0){
|
||||
this.$set(this.queryParams, "filterToolIds", this.filterToolIds )
|
||||
}
|
||||
listTool(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -18,7 +18,7 @@
|
||||
</el-form><!--el-form-->
|
||||
</div><!--el-form-border 表单-->
|
||||
</el-tab-pane><!--el-tab-pane-->
|
||||
<el-tab-pane label="关联附件" name="second" v-loading="previewLoading" >
|
||||
<el-tab-pane label="关联附件" name="second" v-loading="previewLoading" element-loading-text="预览转换中,请耐心等待">
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
@ -48,7 +48,7 @@
|
||||
</el-tabs><!--el-tabs-->
|
||||
</div><!--fl 左侧页签-->
|
||||
|
||||
<div class="fr" v-if="isComment">
|
||||
<div class="fr" v-if="isComment && form.docStatus == 'yfb'">
|
||||
<div class="tboper">
|
||||
<div class="tit">评论</div>
|
||||
</div><!--tboper 标题与操作按钮-->
|
||||
@ -112,11 +112,11 @@
|
||||
import { addDocument, updateDocument, getDocument } from "@/api/document/document";
|
||||
import { deptTreeSelect } from "@/api/system/user";
|
||||
import { documentTree } from "@/api/documentCategory/documentCategory.js";
|
||||
import { listDiscussions, addDiscussions } from "@/api/tool/discussions.js";
|
||||
import { listReplies, addReplies} from "@/api/tool/replies.js";
|
||||
import { listAttachment } from "@/api/attachment/attachment";
|
||||
import { addCount } from "@/api/tool/downloadCount";
|
||||
import previewUtil from '@/components/PreviewUtil/previewUtil.vue'
|
||||
import { listDiscussions, addDiscussions } from "@/api/tool/discussions.js";
|
||||
|
||||
export default {
|
||||
name: 'editDocument',
|
||||
@ -217,6 +217,7 @@
|
||||
created(){
|
||||
// this.getDeptTree();
|
||||
this.getDocumentTree();
|
||||
// this.getDiscussionsList()
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
@ -311,6 +312,7 @@
|
||||
self.dataFile.push(fileData) */
|
||||
|
||||
self.getAttachmentList()
|
||||
self.getDiscussionsList()
|
||||
|
||||
setTimeout(() => {
|
||||
self.$set(self.form, "docCategoryName" , self.findLabelById(self.docCategory, self.form.docCategoryId) )
|
||||
@ -343,7 +345,7 @@
|
||||
type:'success', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
self.getAttachmentList()
|
||||
self.getDiscussionsList()
|
||||
}).catch(err =>{
|
||||
this.discussionContent = null
|
||||
console.error("handleDiscussions==err==", err)
|
||||
@ -411,7 +413,7 @@
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
self.cancelReplySon(parentIndex, repIndex)
|
||||
self.getAttachmentList()
|
||||
self.getDiscussionsList()
|
||||
}).catch(err =>{
|
||||
console.error("submitReplySon==err==", err)
|
||||
self.$modal.msgError("发布失败");
|
||||
@ -447,7 +449,7 @@
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
self.cancelReply(index)
|
||||
self.getAttachmentList()
|
||||
self.getDiscussionsList()
|
||||
}).catch(err =>{
|
||||
console.error("handleDiscussions==err==", err)
|
||||
self.$modal.msgError("发布失败");
|
||||
@ -574,7 +576,22 @@
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getDiscussionsList() {
|
||||
let self = this
|
||||
listDiscussions({businessId:self.form.docId}).then(res => {
|
||||
self.discussionsList = res.rows
|
||||
self.discussionsList.forEach(item => {
|
||||
if(item.repliesList && item.repliesList.length > 0){
|
||||
self.$set(item, 'showReplyFormSon', new Array(item.repliesList.length).fill(false))
|
||||
self.$set(item, 'replyContentSon', new Array(item.repliesList.length).fill(''))
|
||||
}else{
|
||||
self.$set(item, 'showReplyFormSon', false)
|
||||
self.$set(item, 'replyContentSon', '')
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="fbox1">
|
||||
<div class="fl">
|
||||
<el-tabs v-model="detailActiveName">
|
||||
<el-tab-pane label="附件信息" name="first" v-loading="previewLoading" >
|
||||
<el-tab-pane label="附件信息" name="first" v-loading="previewLoading" element-loading-text="预览转换中,请耐心等待">
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="序号" width="60" align="center" type="index"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
|
@ -128,7 +128,7 @@
|
||||
<div class="tboper">
|
||||
<div class="tit">关联附件</div>
|
||||
</div>
|
||||
<div class="el-form-border" v-loading="previewLoading" >
|
||||
<div class="el-form-border" v-loading="previewLoading" element-loading-text="预览转换中,请耐心等待">
|
||||
<div class="operate">
|
||||
<template v-if="editStatus && !detailBoolean">
|
||||
<uploadVue
|
||||
@ -330,7 +330,7 @@
|
||||
// 表单校验
|
||||
rules: {
|
||||
docCategoryId: [
|
||||
{ required: true, message: "文档分类不能为空", trigger: "blur" }
|
||||
{ required: true, message: "文档分类不能为空", trigger: "change" }
|
||||
],
|
||||
docCode: [
|
||||
{ required: true, message: "文档编号不能为空", trigger: "blur" }
|
||||
@ -339,23 +339,23 @@
|
||||
{ required: true, message: "文档名称不能为空", trigger: "blur" }
|
||||
],
|
||||
docType: [
|
||||
{ required: true, message: "类别不能为空", trigger: "blur" }
|
||||
{ required: true, message: "类别不能为空", trigger: "change" }
|
||||
],
|
||||
docSource: [
|
||||
{ required: true, message: "文档来源不能为空", trigger: "blur" }
|
||||
{ required: true, message: "文档来源不能为空", trigger: "change" }
|
||||
],
|
||||
docPrincipals: [
|
||||
{ required: true, message: "负责人不能为空", trigger: ['change','blur'] }
|
||||
],
|
||||
docRespDept: [
|
||||
{ required: true, message: "请选择归属部门", trigger: ['blur','change'] }
|
||||
{ required: true, message: "请选择归属部门", trigger: ['change','change'] }
|
||||
],
|
||||
},
|
||||
docCategory:[],
|
||||
deptOptions:[],
|
||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
|
||||
fileData: null,
|
||||
acceptType: ".txt,.doc,.docx,.pdf,.mp4,.avi,.rmvb,.zip,.rar,.7z,.png,.jpg,.jpeg,.bmp",
|
||||
acceptType: ".txt,.docx,.pdf,.mp4,.zip,.rar,.7z,.png,.jpg",
|
||||
editStatus: true,
|
||||
toolDataInfo: [],
|
||||
dataFile: [],
|
||||
@ -526,7 +526,7 @@
|
||||
}
|
||||
//判断是否有文件再上传
|
||||
if (this.fileList.length == 0) {
|
||||
return this.$message.warning('请选取文件后再上传')
|
||||
return self.$message.warning('最少上传一个附件')
|
||||
}
|
||||
/*this.fileList.map(file =>{
|
||||
this.form.docName = file.name
|
||||
|
@ -113,9 +113,10 @@
|
||||
v-hasPermi="['document:add']"
|
||||
>上传文档</el-button>
|
||||
<el-button type="primary" icon="el-icon-position" @click="handlePush" v-hasPermi="['document:push']">发布</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['document:export']">全量导出</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="handleOpenBatchExport()" v-hasPermi="['document:batch:export']">批量导出</el-button>
|
||||
<el-button icon="el-icon-delete" @click="handleDelete" v-hasPermi="['document:batch:remove']">批量删除</el-button>
|
||||
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['document:export']">全量导出</el-button>
|
||||
<el-button icon="el-icon-download" @click="handleOpenBatchExport()" v-hasPermi="['document:batch:export']">批量导出</el-button>
|
||||
|
||||
|
||||
</div><!--operate 操作按钮-->
|
||||
|
||||
@ -230,16 +231,17 @@
|
||||
|
||||
<!--文档修改-->
|
||||
<el-drawer :visible.sync="open"
|
||||
:wrapperClosable="false"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="75%">
|
||||
<template #title>
|
||||
<span class="title">{{docTitle}}</span>
|
||||
<div class="drawer-head-btn" v-if="docDetailDisable">
|
||||
<el-button type="primary" @click="docConfrim()">确 定</el-button>
|
||||
<el-button @click="docCancel()">取 消</el-button>
|
||||
<el-button icon="el-icon-check" type="primary" @click="docConfrim()">保 存</el-button>
|
||||
<el-button icon="el-icon-close" @click="docCancel()">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
<div class="drawer-head-btn" v-else>
|
||||
<el-button @click="docCancel()">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="docCancel()">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<edit-document ref="editDocumentRef" @submit="editDocumentSubmit"/>
|
||||
@ -248,20 +250,24 @@
|
||||
|
||||
<!--文档详情-->
|
||||
<el-drawer :visible.sync="detailDocOpen"
|
||||
:wrapperClosable="false"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="75%">
|
||||
<template #title>
|
||||
<span class="title">{{docTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="docDetailCancel()">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="docDetailCancel()">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<doc-detail ref="docDetailRef" @submit="docDetailFormSubmit"/>
|
||||
<template v-if="detailOpen">
|
||||
<doc-detail ref="docDetailRef" @submit="docDetailFormSubmit"/>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
|
||||
<!-- 文档导出对话框 -->
|
||||
<el-dialog :title="exportTitle" :visible.sync="exportDrawerOpen"
|
||||
:wrapperClosable="false"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
width="980px" append-to-body>
|
||||
<div class="el-form-border">
|
||||
@ -305,12 +311,13 @@
|
||||
|
||||
<!-- 文档下载对话框 -->
|
||||
<el-drawer :visible.sync="fileDetailDrawerOpen"
|
||||
:wrapperClosable="false"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="80%" class="no-padding" @close="handleFileCloseDetail()">
|
||||
<template #title>
|
||||
<span>文档附件下载</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="fileDetailDrawerOpen = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="fileDetailDrawerOpen = false">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<template v-if="fileDetailOpen">
|
||||
@ -467,6 +474,7 @@ export default {
|
||||
selection: undefined,
|
||||
docDetail: {},
|
||||
detailDocOpen: false,
|
||||
detailOpen: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -547,6 +555,7 @@ export default {
|
||||
this.docTipAddOrEdit = 'detail'
|
||||
this.docDetailDisable=false
|
||||
this.detailDocOpen = true
|
||||
this.detailOpen = true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.docDetailRef.editInit(row.docId, "detail");
|
||||
})
|
||||
@ -572,6 +581,7 @@ export default {
|
||||
},
|
||||
docDetailFormSubmit: function() {
|
||||
this.detailDocOpen = false;
|
||||
this.detailOpen = false;
|
||||
this.getList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
@ -579,7 +589,7 @@ export default {
|
||||
let self = this
|
||||
const docIds = row.docId || this.ids;
|
||||
if(docIds == null || docIds == undefined || docIds =='' || docIds.length < 0){
|
||||
this.$modal.msgError(`最少选择一条数据`);
|
||||
this.$modal.msgWarning(`最少选择一条数据`);
|
||||
return;
|
||||
}
|
||||
//只能删除已上传数据
|
||||
@ -675,7 +685,7 @@ export default {
|
||||
let self = this
|
||||
const docIds = row.docId || this.ids;
|
||||
if(docIds == null || docIds == undefined || docIds =='' || docIds.length < 0){
|
||||
this.$modal.msgError(`最少选择一条数据`);
|
||||
this.$modal.msgWarning(`最少选择一条数据`);
|
||||
return;
|
||||
}
|
||||
//只能删除已上传数据
|
||||
@ -713,6 +723,7 @@ export default {
|
||||
docDetailCancel(){
|
||||
this.$refs.docDetailRef.resetForm();
|
||||
this.detailDocOpen = false
|
||||
this.detailOpen = false
|
||||
},
|
||||
previewAuth(row){
|
||||
if(row.docUrl == null || row.docUrl == '' || row.docUrl == undefined){
|
||||
@ -739,7 +750,7 @@ export default {
|
||||
handleOpenBatchExport() {
|
||||
let self = this
|
||||
if(self.selection == null || self.selection == '' || self.selection == undefined || self.selection.length <= 0){
|
||||
this.$modal.msgError(`最少选择一条数据`);
|
||||
this.$modal.msgWarning(`最少选择一条数据`);
|
||||
return;
|
||||
}
|
||||
if (this.checkList.length<1) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="消息类型" prop="businessType">
|
||||
<el-select v-model="queryParams.businessType" placeholder="请选择消息类型" clearable>
|
||||
<el-select v-model="queryParams.businessType" placeholder="请选择消息类型" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.msg_type"
|
||||
:key="dict.value"
|
||||
@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态" prop="states">
|
||||
<el-select v-model="queryParams.states" placeholder="请选择状态" clearable>
|
||||
<el-select v-model="queryParams.states" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.msg_status"
|
||||
:key="dict.value"
|
||||
@ -102,7 +102,7 @@
|
||||
<template #title>
|
||||
<span>{{toolTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="detailDrawerOpen = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="detailDrawerOpen = false">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<template v-if="detailOpen">
|
||||
@ -119,7 +119,7 @@
|
||||
<template #title>
|
||||
<span class="title">{{docTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="docCancel()">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="docCancel()">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<doc-detail ref="editDocumentRef" @submit="editDocumentSubmit" :isDownload="false" :isComment="false"/>
|
||||
|
@ -284,7 +284,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="openView = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="openView = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -173,7 +173,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="open = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="open = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -195,7 +195,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="open = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="open = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog title="新增附件信息" :visible.sync="visible" width="85%" append-to-body>
|
||||
<edit-document ref="editDocumentRef" :toolId="toolId" @docSubmitData="editDocumentSubmit" :relatedTool="false"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm()">确 定</el-button>
|
||||
<el-button @click="cancel()">取 消</el-button>
|
||||
<el-button type="primary" icon="el-icon-check" @click="submitForm()">保 存</el-button>
|
||||
<el-button icon="el-icon-close" @click="cancel()">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="fbox1">
|
||||
<div class="fl">
|
||||
<el-tabs v-model="detailActiveName">
|
||||
<el-tab-pane label="附件信息" name="first" v-loading="previewLoading" >
|
||||
<el-tab-pane label="附件信息" name="first" v-loading="previewLoading" element-loading-text="预览转换中,请耐心等待">
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="序号" width="60" align="center" type="index"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
|
@ -89,9 +89,10 @@
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>工具发布</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['tool:export']">全量导出</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" @click="handleOpenBatchExport()" v-hasPermi="['tool:batch:export']">批量导出</el-button>
|
||||
<el-button icon="el-icon-delete" @click="handleDelete(selection)" v-hasPermi="['tool:batch:remove']">批量删除</el-button>
|
||||
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['tool:export']">全量导出</el-button>
|
||||
<el-button icon="el-icon-download" @click="handleOpenBatchExport()" v-hasPermi="['tool:batch:export']">批量导出</el-button>
|
||||
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table v-loading="loading" :data="toolList" ref="tableRef" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
@ -114,7 +115,7 @@
|
||||
<dict-tag :options="dict.type.flow_status" :value="scope.row.recordStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="引用工具" align="center" :show-overflow-tooltip="true">
|
||||
<!-- <el-table-column label="关联工具" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="handleRelationTool(scope.row.relationToolList)">
|
||||
<el-link target="_blank" v-for="assItem in scope.row.relationToolList" :key="assItem.id" @click="handleToolDetail(assItem)">{{assItem.toolName}}</el-link>
|
||||
@ -122,14 +123,14 @@
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="引用工具" align="center" :show-overflow-tooltip="true" width="100">
|
||||
<el-table-column label="关联工具" align="center" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
trigger="click"
|
||||
placement="top-start"
|
||||
v-if="Array.isArray(scope.row.relationToolList) && scope.row.relationToolList.length > 0"
|
||||
>
|
||||
<!-- 这里展示引用工具的详细信息 -->
|
||||
<!-- 这里展示关联工具的详细信息 -->
|
||||
<ul>
|
||||
<li v-for="assItem in scope.row.relationToolList" :key="assItem.id">
|
||||
<el-link target="_blank" @click="handleToolDetail(assItem)">
|
||||
@ -139,7 +140,7 @@
|
||||
</ul>
|
||||
<!-- 弹出框触发器 -->
|
||||
<el-link slot="reference">
|
||||
引用工具 ({{ scope.row.relationToolList.length }})
|
||||
关联工具 ({{ scope.row.relationToolList.length }})
|
||||
</el-link>
|
||||
</el-popover>
|
||||
</template>
|
||||
@ -184,7 +185,8 @@
|
||||
</el-card><!--el-card-->
|
||||
|
||||
<!-- 工具导出对话框 -->
|
||||
<el-dialog :title="exportTitle" :visible.sync="exoportDrawerOpen" width="980px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false" :show-close="false">
|
||||
<el-dialog :title="exportTitle" :visible.sync="exoportDrawerOpen" width="980px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false"
|
||||
:show-close="false" :wrapperClosable="false">
|
||||
<div class="el-form-border">
|
||||
<el-form ref="exportFrom" label-width="180px">
|
||||
<el-row>
|
||||
@ -243,12 +245,12 @@
|
||||
</el-drawer>
|
||||
|
||||
<!-- 工具详情对话框 -->
|
||||
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" :show-close="false"
|
||||
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" :show-close="false" :wrapperClosable="false"
|
||||
size="80%" class="no-padding" :close-on-press-escape="false" @close="handleCloseDetail()">
|
||||
<template #title>
|
||||
<span>{{toolTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="detailDrawerOpen = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="detailDrawerOpen = false">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<template v-if="detailOpen">
|
||||
@ -259,12 +261,12 @@
|
||||
|
||||
|
||||
<!-- 工具详情对话框 -->
|
||||
<el-drawer :visible.sync="fileDetailDrawerOpen" :modal-append-to-body="false" :show-close="false"
|
||||
<el-drawer :visible.sync="fileDetailDrawerOpen" :modal-append-to-body="false" :show-close="false" :wrapperClosable="false"
|
||||
size="80%" class="no-padding" :close-on-press-escape="false" @close="handleFileCloseDetail()">
|
||||
<template #title>
|
||||
<span>工具附件下载</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="fileDetailDrawerOpen = false">关 闭</el-button>
|
||||
<el-button icon="el-icon-close" @click="fileDetailDrawerOpen = false">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<template v-if="fileDetailOpen">
|
||||
@ -608,7 +610,7 @@ export default {
|
||||
handleOpenBatchExport() {
|
||||
let self = this
|
||||
if(self.selection == null || self.selection == '' || self.selection == undefined || self.selection.length <= 0){
|
||||
this.$modal.msgError(`最少选择一条数据`);
|
||||
this.$modal.msgWarning(`最少选择一条数据`);
|
||||
return;
|
||||
}
|
||||
if (this.checkList.length<1) {
|
||||
@ -697,7 +699,7 @@ export default {
|
||||
handleDelete(list){
|
||||
let _this = this
|
||||
if (!list||list.length<1) {
|
||||
this.$modal.msgError(`最少选择一条数据`);
|
||||
this.$modal.msgWarning(`最少选择一条数据`);
|
||||
return
|
||||
}
|
||||
//只能删除草稿数据
|
||||
|
@ -19,17 +19,19 @@
|
||||
<el-col :span="12"> <el-form-item label="操作说明">{{detailData.operateExplain}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="备注">{{detailData.remark}}</el-form-item> </el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="引用工具">
|
||||
<span v-if="detailData.association != null && detailData.association != '' && detailData.association != undefined">
|
||||
<el-tag :key="tag.toolId" v-for="tag in JSON.parse(detailData.association)" type="info" style="margin-right: 5px">{{tag.toolName}}</el-tag>
|
||||
</span>
|
||||
<el-form-item label="关联工具">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" v-if="detailData.association != null && detailData.association != '' && detailData.association != undefined" @click="getToolRelationTree">查看</el-button>
|
||||
|
||||
<!-- <span v-if="detailData.association != null && detailData.association != '' && detailData.association != undefined">
|
||||
<el-tag :key="tag.toolId" v-for="tag in JSON.parse(detailData.association)" type="info" style="margin-right: 5px">{{tag.toolName}}</el-tag>
|
||||
</span>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form><!--el-form-->
|
||||
</div><!--el-form-border 表单-->
|
||||
</el-tab-pane><!--el-tab-pane-->
|
||||
<el-tab-pane label="关联附件" name="second" v-loading="previewLoading" >
|
||||
<el-tab-pane label="关联附件" name="second" v-loading="previewLoading" element-loading-text="预览转换中,请耐心等待">
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" >
|
||||
@ -130,6 +132,44 @@
|
||||
|
||||
<preview-util v-if="isPreviewDisable" ref="previewForm" @previewClose="previewClose" @previewLoadingClose="previewLoadingClose"></preview-util>
|
||||
|
||||
|
||||
<!-- 关联工具展示 -->
|
||||
<el-dialog title="关联工具" :visible.sync="toolTreeVisible" width="980px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false"
|
||||
:show-close="false" :wrapperClosable="false" v-loading="toolTreeLoading">
|
||||
<el-tree :data="toolRelationOptions" :props="defaultProps"></el-tree>
|
||||
<!-- <el-table
|
||||
:data="relationToolData"
|
||||
border
|
||||
ref="multipleTable"
|
||||
header-align="left"
|
||||
>
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column label="工具编号" key="toolCode" prop="toolCode"/>
|
||||
<el-table-column label="工具名称" key="toolName" prop="toolName":show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" width="100px" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="selectDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!– 分页组件 –>
|
||||
<el-pagination
|
||||
v-show="relationToolTotal > 0"
|
||||
:current-page.sync="currentToolPage"
|
||||
:page-size.sync="pageToolSize"
|
||||
:total="relationToolTotal"
|
||||
@current-change="handlePageToolChange"
|
||||
layout="total, prev, pager, next"
|
||||
/>-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button icon="el-icon-close" @click="toolTreeVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 上传 -->
|
||||
<!-- <AddDoc :show.sync="open" :toolId="detailData.toolId" @callback="getAttachmentList"/>-->
|
||||
</div><!--fbox1 左右分栏-->
|
||||
@ -144,6 +184,7 @@
|
||||
import { addCount } from "@/api/tool/downloadCount";
|
||||
import { listAttachment } from "@/api/attachment/attachment";
|
||||
import previewUtil from '@/components/PreviewUtil/previewUtil.vue'
|
||||
import { getDataThree } from '@/api/tool/toolRelation'
|
||||
|
||||
export default {
|
||||
name: 'toolDetail',
|
||||
@ -208,7 +249,17 @@
|
||||
previewLoading:false,
|
||||
previewUseFront: "txt,doc,docx,pdf",
|
||||
isPreviewDisable: false,
|
||||
total: 0
|
||||
total: 0,
|
||||
//工具树显示
|
||||
toolTreeVisible: false,
|
||||
toolTreeLoading: false,
|
||||
toolDataList: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
//工具关系选择项
|
||||
toolRelationOptions: [],
|
||||
|
||||
}
|
||||
},
|
||||
@ -445,6 +496,7 @@
|
||||
self.detailLoading = true
|
||||
getTool(self.toolDetail.toolId).then((res) => {
|
||||
self.detailData = res.data
|
||||
self.detailData.association = JSON.parse(res.data.association)
|
||||
/*let formData = res.data;
|
||||
formData.type = _this.form.type
|
||||
_this.form = formData*/
|
||||
@ -470,6 +522,45 @@
|
||||
const extension = parts.pop();
|
||||
return extension;
|
||||
},
|
||||
/** 获取工具关联树展示 */
|
||||
getToolRelationTree() {
|
||||
let self = this
|
||||
let toolRelation ={
|
||||
resourceId: "",
|
||||
}
|
||||
let toolIds = []
|
||||
if(self.detailData.toolId){
|
||||
self.$set(toolRelation,"resourceIds",[self.detailData.toolId])
|
||||
}else if(self.detailData.association && self.detailData.association.length > 0){
|
||||
self.detailData.association.forEach(item=>{
|
||||
toolIds.push(item.toolId)
|
||||
})
|
||||
self.$set(toolRelation,"resourceIds",toolIds)
|
||||
}
|
||||
|
||||
self.toolTreeVisible = true;
|
||||
self.toolTreeLoading = true;
|
||||
getDataThree(toolRelation).then(res => {
|
||||
if(self.detailData.toolName){
|
||||
let treeArray = []
|
||||
let treeData = {
|
||||
"id": "20240908001",
|
||||
"label": self.detailData.toolName,
|
||||
"types": null,
|
||||
"children": res.data
|
||||
}
|
||||
treeArray.push(treeData)
|
||||
this.toolRelationOptions = treeArray;
|
||||
self.toolTreeLoading = false;
|
||||
return
|
||||
}
|
||||
this.toolRelationOptions = res.data;
|
||||
self.toolTreeLoading = false;
|
||||
}).catch(err => {
|
||||
console.error("err========", err)
|
||||
self.toolTreeLoading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -191,8 +191,11 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="引用工具" prop="association">
|
||||
<el-select
|
||||
<el-form-item label="关联工具" prop="association">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="getToolRelationTree">查看</el-button>
|
||||
<el-button type="primary" icon="el-icon-check" size="mini" @click="handleToolSelect">新增关联工具</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleToolEdit">编辑关联工具</el-button>
|
||||
<!-- <el-select
|
||||
:disabled="!editStatus"
|
||||
v-model="form.association"
|
||||
ref="selectHeadTool"
|
||||
@ -200,7 +203,7 @@
|
||||
value-key="toolId"
|
||||
filterable
|
||||
remote
|
||||
placeholder="请选择引用工具"
|
||||
placeholder="请选择关联工具"
|
||||
@focus="toolSelect">
|
||||
<el-option
|
||||
v-for="item in form.association"
|
||||
@ -208,7 +211,7 @@
|
||||
:label="item.toolName"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -243,7 +246,7 @@
|
||||
</template>
|
||||
<!-- <el-button icon="el-icon-delete">删除</el-button>-->
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table :data="paginatedData" style="width: 100%" v-loading="previewLoading" >
|
||||
<el-table :data="paginatedData" style="width: 100%" v-loading="previewLoading" element-loading-text="预览转换中,请耐心等待">
|
||||
<!-- <el-table-column type="selection" width="50" align="center"> </el-table-column>-->
|
||||
<el-table-column label="序号" width="60" align="center" type="index"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
@ -297,9 +300,7 @@
|
||||
></processcode>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleWorkflowSubmit"
|
||||
>提 交</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleWorkflowSubmit">提 交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 流程选择下一环节及人员 结束 -->
|
||||
@ -307,7 +308,7 @@
|
||||
v-if="monitorDrawerVisible"
|
||||
ref="monitorDrawer"
|
||||
></monitor-drawer>
|
||||
<tool-selector ref="toolSelect" @selectHandle="selectHandle"></tool-selector>
|
||||
<tool-selector ref="toolSelect" @selectHandle="selectHandle" :toolData="form.association"></tool-selector>
|
||||
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" :deptFilter="true" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
||||
|
||||
<preview-util v-if="isPreviewDisable" ref="previewForm" @previewClose="previewClose" @previewLoadingClose="previewLoadingClose"></preview-util>
|
||||
@ -315,11 +316,85 @@
|
||||
<el-dialog :title="viewDialogTitle" :visible.sync="viewDialogOpen" fullscreen width="500px" append-to-body :before-close="handleBeforeClose">
|
||||
<i-frame :src="previewUrl" v-if="viewDialogOpen"/>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 关联工具展示 -->
|
||||
<el-dialog title="编辑关联工具" :visible.sync="editToolVisible" width="980px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false"
|
||||
:show-close="false" :wrapperClosable="false">
|
||||
<el-table
|
||||
:data="relationToolData"
|
||||
border
|
||||
ref="multipleTable"
|
||||
header-align="left"
|
||||
>
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column label="工具编号" key="toolCode" prop="toolCode"/>
|
||||
<el-table-column label="工具名称" key="toolName" prop="toolName":show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" width="100px" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="selectDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination
|
||||
v-show="relationToolTotal > 0"
|
||||
:current-page.sync="currentToolPage"
|
||||
:page-size.sync="pageToolSize"
|
||||
:total="relationToolTotal"
|
||||
@current-change="handlePageToolChange"
|
||||
layout="total, prev, pager, next"
|
||||
/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button icon="el-icon-close" @click="editToolVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 关联工具展示 -->
|
||||
<el-dialog title="关联工具" :visible.sync="toolTreeVisible" width="980px" append-to-body :close-on-press-escape="false" :close-on-click-modal="false"
|
||||
:show-close="false" :wrapperClosable="false" v-loading="toolTreeLoading">
|
||||
<el-tree :data="toolRelationOptions" :props="defaultProps" @node-click="handleToolNodeClick"></el-tree>
|
||||
<!-- <el-table
|
||||
:data="relationToolData"
|
||||
border
|
||||
ref="multipleTable"
|
||||
header-align="left"
|
||||
>
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column label="工具编号" key="toolCode" prop="toolCode"/>
|
||||
<el-table-column label="工具名称" key="toolName" prop="toolName":show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" width="100px" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="selectDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!– 分页组件 –>
|
||||
<el-pagination
|
||||
v-show="relationToolTotal > 0"
|
||||
:current-page.sync="currentToolPage"
|
||||
:page-size.sync="pageToolSize"
|
||||
:total="relationToolTotal"
|
||||
@current-change="handlePageToolChange"
|
||||
layout="total, prev, pager, next"
|
||||
/>-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button icon="el-icon-close" @click="toolTreeVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iFrame from "@/components/iFrame/index"
|
||||
import { listDocument,delDocument } from "@/api/document/document";
|
||||
import { listAttachment } from "@/api/attachment/attachment";
|
||||
import processcode from "@/views/workflowList/processcode/index.vue";
|
||||
import {
|
||||
@ -333,6 +408,7 @@ import AddDoc from '@/views/tool/AddDoc.vue'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import { addUser, deptTreeSelect, updateUser } from '@/api/system/user'
|
||||
import { addTool, checkToolExist, getInfoByBpmcId, updateTool } from '@/api/tool/tool'
|
||||
import { getDataThree } from '@/api/tool/toolRelation'
|
||||
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
|
||||
import ToolSelector from '@/components/tool-selector/index.vue'
|
||||
import uploadVue from '@/components/FileUpload/optimizeToolUpload.vue'
|
||||
@ -400,7 +476,8 @@ export default {
|
||||
monitorDrawerVisible:false,
|
||||
form: {
|
||||
toolRespDept: this.$store.getters.userInfo.deptId,
|
||||
status: "zy"
|
||||
status: "zy",
|
||||
association: []
|
||||
},
|
||||
rules: {
|
||||
toolCode: [
|
||||
@ -465,7 +542,7 @@ export default {
|
||||
curDeptName: null,
|
||||
|
||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
|
||||
acceptType: ".txt,.doc,.docx,.pdf,.mp4,.avi,.rmvb,.zip,.rar,.7z,.png,.jpg,.jpeg,.bmp",
|
||||
acceptType: ".txt,.docx,.pdf,.mp4,.zip,.rar,.7z,.png,.jpg",
|
||||
dataFile: [],
|
||||
detailBoolean: false,
|
||||
attachmentList: [],
|
||||
@ -475,6 +552,21 @@ export default {
|
||||
currentPage: 1, // 当前页
|
||||
pageSize: 10, // 每页显示数量
|
||||
previewLoading: false,
|
||||
editToolVisible: false,
|
||||
//编辑
|
||||
currentToolPage: 1, // 当前页
|
||||
pageToolSize: 10, // 每页显示数量
|
||||
//工具树显示
|
||||
toolTreeVisible: false,
|
||||
toolTreeLoading: false,
|
||||
toolDataList: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
//工具关系选择项
|
||||
toolRelationOptions: [],
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -488,6 +580,16 @@ export default {
|
||||
total() {
|
||||
return this.attachmentList.length;
|
||||
},
|
||||
// 分页后的数据
|
||||
relationToolData() {
|
||||
const start = (this.currentToolPage - 1) * this.pageToolSize;
|
||||
const end = this.currentToolPage * this.pageToolSize;
|
||||
return this.form.association.slice(start, end);
|
||||
},
|
||||
// 总数据条数
|
||||
relationToolTotal() {
|
||||
return this.form.association.length;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
data (val) {
|
||||
@ -899,19 +1001,32 @@ export default {
|
||||
this.$set(this.form,'toolRespDept',node.id)
|
||||
this.$refs.eForm.validateField('toolRespDept');
|
||||
},
|
||||
toolSelect(){
|
||||
this.$refs.selectHeadTool.blur();
|
||||
handleToolSelect(){
|
||||
let self = this
|
||||
let toolIds = []
|
||||
if(self.form.association && self.form.association.length > 0){
|
||||
self.form.association.forEach(item=>{
|
||||
toolIds.push(item.toolId)
|
||||
})
|
||||
}
|
||||
// this.form.association.list();
|
||||
// this.$refs.selectHeadTool.blur();
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.toolSelect.init(null,null,true)
|
||||
this.$refs.toolSelect.init(null,null,true, toolIds)
|
||||
})
|
||||
},
|
||||
/** 处理工具编辑 **/
|
||||
handleToolEdit(){
|
||||
let self = this
|
||||
self.editToolVisible = true
|
||||
},
|
||||
selectHandle(source,index,data){
|
||||
let list = this.form.association
|
||||
if (!list) {
|
||||
list = []
|
||||
}
|
||||
data.forEach(itme=>{
|
||||
list.push({toolId:itme.toolId,toolName:itme.toolName})
|
||||
data.forEach(item=>{
|
||||
list.push({toolId:item.toolId,toolCode:item.toolCode,toolName:item.toolName})
|
||||
})
|
||||
this.form.association = list
|
||||
},
|
||||
@ -1019,6 +1134,60 @@ export default {
|
||||
handlePageChange(newPage) {
|
||||
this.currentPage = newPage;
|
||||
},
|
||||
/** 删除 **/
|
||||
selectDelete(row){
|
||||
const index = this.form.association.findIndex(item => item.toolId == row.toolId);
|
||||
if (index !== -1) {
|
||||
// 从 attachmentList 中删除数据
|
||||
this.form.association.splice(index, 1);
|
||||
}
|
||||
},
|
||||
handlePageToolChange(newPage) {
|
||||
this.currentToolPage = newPage;
|
||||
},
|
||||
//处理树节点点击事件
|
||||
handleToolNodeClick(data){
|
||||
console.log(data);
|
||||
},
|
||||
/** 获取工具关联树展示 */
|
||||
getToolRelationTree() {
|
||||
let self = this
|
||||
let toolRelation ={
|
||||
resourceId: "",
|
||||
}
|
||||
let toolIds = []
|
||||
if(this.form.toolId){
|
||||
self.$set(toolRelation,"resourceIds",[this.form.toolId])
|
||||
}else if(self.form.association && self.form.association.length > 0){
|
||||
self.form.association.forEach(item=>{
|
||||
toolIds.push(item.toolId)
|
||||
})
|
||||
self.$set(toolRelation,"resourceIds",toolIds)
|
||||
}
|
||||
|
||||
self.toolTreeVisible = true;
|
||||
self.toolTreeLoading = true;
|
||||
getDataThree(toolRelation).then(res => {
|
||||
/* if(self.form.toolName){
|
||||
let treeArray = []
|
||||
let treeData = {
|
||||
"id": "20240908",
|
||||
"label": self.form.toolName,
|
||||
"types": null,
|
||||
"children": res.data
|
||||
}
|
||||
treeArray.push(treeData)
|
||||
this.toolRelationOptions = treeArray;
|
||||
self.toolTreeLoading = false;
|
||||
return
|
||||
} */
|
||||
this.toolRelationOptions = res.data;
|
||||
self.toolTreeLoading = false;
|
||||
}).catch(err => {
|
||||
console.error("err========", err)
|
||||
self.toolTreeLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user