Commit 740e8b9e authored by 高飞's avatar 高飞

修改文献数据

parent a5858bbc
import { get, post, delete_util, fileUpload_PUT, addParam } from "../../util/http_util";
const PREFIX_DOCUMENT = "api/rest/3z/document/";
const PREFIX_RESOURCE = "api/rest/3z/resource/";
const PREFIX_ELASTIC = "api/rest/elastic/";
export const queryDoc = (pageNum, pageSize, params) => {
return post(`${PREFIX_DOCUMENT}queryDoc?pageNum=${pageNum}&pageSize=${pageSize}`, params);
}
export const searchFiles = (pageNum, pageSize, params) => {
return post(`${PREFIX_ELASTIC}searchFiles?pageNum=${pageNum}&pageSize=${pageSize}`, params);
}
export const queryDocumentTree = (module) => {
return get(`${PREFIX_DOCUMENT}queryDocumentTree?module=${module}`);
}
export const updateDocumentTreeItem = (data) => {
return post(`${PREFIX_DOCUMENT}updateDocumentTreeItem`,data);
}
export const addDocumentTreeItem = (data) => {
return post(`${PREFIX_DOCUMENT}addDocumentTreeItem`,data);
}
export const removeDocumentTreeItem = (id) => {
return delete_util(`${PREFIX_DOCUMENT}removeDocumentTreeItem/${id}`);
}
......@@ -22,6 +22,7 @@ div::-webkit-scrollbar-thumb:hover {
div::-webkit-scrollbar-corner {
background: #a1dcf7;
}
/* input 边框*/
.public-input>.el-input__inner,
.public-input>.el-input--suffix>.el-input__inner {
......@@ -41,7 +42,8 @@ div::-webkit-scrollbar-corner {
box-shadow: 0 0 10px #3a5f94c9;
border: 1px solid #3a5f94c9 !important;
}
.el-table__body tr:hover > td{
.el-table__body tr:hover>td {
background-color: #89898954 !important;
}
......@@ -87,32 +89,42 @@ div::-webkit-scrollbar-corner {
background-color: #17354c;
background-image: url("../../assets/img/dfzy/new/6.png");
background-size: 100% 100%;
.popper__arrow::after{
.popper__arrow::after {
border-bottom-color: #17354c !important;
}
.el-tree{
.el-tree {
background: #ffffff00;
color: #ffffff;
}
.tree-select__option.el-select-dropdown__item{
.tree-select__option.el-select-dropdown__item {
background-color: #fff0;
}
.el-tree-node__content:hover{
.el-tree-node__content:hover {
background-image: linear-gradient(to right, #17344b, #2f91af, #17354c);
}
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content{
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
background-image: linear-gradient(to right, #17344b, #2f91af, #17354c);
}
.tree-select__tree.tree-select__tree--radio .el-tree-node.is-current > .el-tree-node__content{
.tree-select__tree.tree-select__tree--radio .el-tree-node.is-current>.el-tree-node__content {
color: orange;
}
.el-tree-node:focus > .el-tree-node__content{
.el-tree-node:focus>.el-tree-node__content {
background-color: #ffffff00;
}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover{
.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
background-image: linear-gradient(to right, #17344b, #2f91af, #17354c);
}
.el-select-dropdown__item{
.el-select-dropdown__item {
color: #ffffff;
}
}
......@@ -121,39 +133,49 @@ div::-webkit-scrollbar-corner {
.page-div {
width: 100%;
height: 50px;
.el-input--suffix .el-input__inner{
.el-input--suffix .el-input__inner {
height: 30px;
}
.el-pagination {
margin-top: 9px;
text-align: right;
.el-pagination__jump {
color: white;
}
.el-pagination__total {
color: white;
}
}
.myPagination.is-background .el-pager li:not(.disabled).active {
color: #fff;
border: 1px solid #146a80;
box-shadow: 0 0 10px #1b6097;
background-color: #1d2d46;
}
.el-pagination span:not([class*=suffix]), .el-pagination button{
.el-pagination span:not([class*=suffix]),
.el-pagination button {
font-size: 12px;
height: 24px;
line-height: 24px;
}
.el-pager li{
.el-pager li {
font-size: 12px;
height: 24px;
line-height: 24px;
}
.el-pagination__editor.el-input .el-input__inner{
.el-pagination__editor.el-input .el-input__inner {
height: 24px;
}
.el-input__inner{
.el-input__inner {
height: 24px;
}
}
......@@ -238,8 +260,29 @@ div::-webkit-scrollbar-corner {
}
}
.bk-xxzp-animation:hover {
&::before {
top: 17%;
left: 9.3%;
right: 2.5%;
bottom: 24%;
/* border:2px solid #ff9933; */
border:none;
}
&::after {
top: 17%;
left: 9.3%;
right: 2.5%;
bottom: 24%;
/* border:2px solid #ff9933; */
border:none;
}
}
.bk-xjs-animation {
position: relative;
&::before {
content: "";
position: absolute;
......@@ -266,16 +309,20 @@ div::-webkit-scrollbar-corner {
pointer-events: none;
}
}
.bk-xjs-animation:hover{
.bk-xjs-animation:hover {
&::before {
border-color: #ff9933;
}
&::after {
border-color:#ff9933;
border-color: #ff9933;
}
}
.bk-bmdx-animation {
position: relative;
&::before {
content: "";
position: absolute;
......@@ -302,22 +349,26 @@ div::-webkit-scrollbar-corner {
pointer-events: none;
}
}
.bk-bmdx-animation:hover{
.bk-bmdx-animation:hover {
&::before {
left: 6.4%;
right: 4.8%;
bottom: 15.6%;
border-color: #03fe37;
}
&::after {
left: 6.4%;
right: 4.8%;
bottom: 15.6%;
border-color:#03fe37;
border-color: #03fe37;
}
}
.bk-ddkz-animation {
position: relative;
&::before {
content: "";
position: absolute;
......@@ -344,11 +395,13 @@ div::-webkit-scrollbar-corner {
pointer-events: none;
}
}
.bk-ddkz-animation:hover{
.bk-ddkz-animation:hover {
&::before {
border-color: #ff9933;
}
&::after {
border-color:#ff9933;
border-color: #ff9933;
}
}
\ No newline at end of file
......@@ -175,7 +175,7 @@
</div>
</div>
</div>
<div style="width: 300px; float: left; margin-left: 20px">
<div style="width: 280px; float: left; margin-left: 20px">
<div class="xgnr-span" style="margin-top: 0px">
<span>相关人物</span>
</div>
......
......@@ -7,79 +7,12 @@
@node-click="handleNodeClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="first-span" :title="node.label">{{ node.label }}</span>
<!-- <span class="list-span">
<el-button
type="text"
size="mini"
@click="() => append(node, data)"
>
<i class="el-icon-circle-plus" title="添加子节点"></i>
</el-button>
<el-button type="text" size="mini" @click="() => edit(node, data)">
<i class="el-icon-edit-outline" title="编辑机构"></i>
</el-button>
<el-button
type="text"
size="mini"
@click="() => remove(node, data)"
>
<i class="el-icon-error" title="删除子节点"></i>
</el-button>
<el-button
class="import"
type="text"
size="mini"
:style="{
display: getparentNode(node) == 25 ? '' : 'none !important',
}"
>
<i class="el-icon-upload" @click="importExcelData(data)"></i>
</el-button> -->
</span>
</el-tree>
</div>
<div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild" />
</div>
<el-dialog title="新增文件夹" :visible.sync="dialogVisible">
<span class="dialogContent"><span>名称:</span>
<el-input v-model="name" placeholder="请输入名称"></el-input>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="add_xzzj()">确 定</el-button>
</span>
</el-dialog>
<el-dialog title="编辑文件夹" :visible.sync="dialogVisible_edit">
<span class="dialogContent"><span>名称:</span>
<el-input v-model="name_edit" placeholder="请输入名称"></el-input>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible_edit = false">取 消</el-button>
<el-button type="primary" @click="edit_xzzj()">确 定</el-button>
</span>
</el-dialog>
<el-dialog class="importData" :title="title" :visible.sync="dialogVisibleImport" id="impor_file">
<span>
<el-upload class="upload-demo" action="" :on-change="handleChange" :show-file-list="false" :auto-upload="false">
<el-button size="small" type="primary" style="margin-bottom:15px;">读取excel文件</el-button>
</el-upload>
<el-table :data="tableDataFromExcel" style="width: 100%" height="300px">
<template v-for="(item, index) in tableDataFromExcelHead">
<el-table-column :prop="item.column_name" :label="item.column_comment"></el-table-column>
</template>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="handleDelete(scope)" type="primary" icon="el-icon-delete" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
</span>
<span slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogVisibleImport = false">取 消</el-button>
<el-button size="mini" type="primary" @click="defineImport">导入</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -113,117 +46,10 @@ export default {
pickNew: "",
tableDataFromExcelHead: [],
tableDataFromExcel: [],
module_name: '辅助决策文档',
module_name: '战法策略文档',
};
},
methods: {
edit(node, data) {
this.name_edit = data.label;
this.dialogVisible_edit = true;
this.this_data = data;
this.this_node = node;
},
edit_xzzj() {
if (this.name_edit.trim() == "") {
this.$message({
type: "warning",
message: "名称不能为空",
});
return;
}
let paramDatas = {
id: this.this_data.id,
label: this.name_edit.trim(),
};
updateDocumentTreeItem(paramDatas)
.then((data) => {
if (data == 1) {
this.$message({
type: "success",
message: "文件夹编辑成功",
});
this.dialogVisible_edit = false;
this.$refs.mychild.searchs(1);
this.query_tree();
}
})
.catch((err) => {
console.log(err);
});
},
//添加子模块弹出框
append(node, data) {
this.name = "";
this.dialogVisible = true;
this.this_data = data;
this.this_node = node;
},
//新增文件夹确定按钮
add_xzzj() {
if (this.name.trim() == "") {
this.$message({
type: "warning",
message: "名称不能为空",
});
return;
}
let paramDatas = {
label: this.name.trim(),
level: this.this_node.data.level + 1,
module: this.module_name,
parentCode: this.this_node.data.code,
createId: this.$store.state.userInfo.account,
};
addDocumentTreeItem(paramDatas)
.then((data) => {
if (data == 1) {
this.$message({
type: "success",
message: "文件夹新增成功",
});
this.dialogVisible = false;
this.query_tree();
}
})
.catch((err) => {
console.log(err);
});
},
//删除子模块
remove(node, data) {
this.$confirm(
"此操作将永久删除该文件夹以及其下所有文件夹, 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
removeDocumentTreeItem(node.data.id)
.then((data) => {
if (data == 1) {
this.$message({
type: "success",
message: "删除成功!",
});
this.query_tree();
this.currentRole = "navs";
this.clientDetails = { type: 4 };
}
})
.catch((err) => {
console.log(err);
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//查询tree数据
query_tree() {
this.tree_data = [];
......@@ -267,108 +93,6 @@ export default {
return this.getparentNode(data.parent);
}
},
//导入数据弹出框
importExcelData(data) {
this.dialogVisibleImport = true;
this.title = data.label;
this.pickNew = data;
this.tableDataFromExcelHead = [];
this.tableDataFromExcel = [];
},
// 核心部分代码(handleChange 和 importfile)
handleChange(file, fileList) {
this.tableDataFromExcelHead = [];
this.tableDataFromExcel = [];
this.fileContent = file.raw;
const fileName = file.name;
const fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
if (this.fileContent) {
if (fileType === "xlsx" || fileType === "xls") {
this.importfile(this.fileContent);
} else {
this.$message({
type: "warning",
message: "附件格式错误,请重新上传!",
});
}
} else {
this.$message({
type: "warning",
message: "请上传附件!",
});
}
},
importfile(obj) {
const reader = new FileReader();
const that = this;
reader.readAsArrayBuffer(obj);
reader.onload = function () {
const buffer = reader.result;
const bytes = new Uint8Array(buffer);
const length = bytes.byteLength;
let binary = "";
for (let i = 0; i < length; i++) {
binary += String.fromCharCode(bytes[i]);
}
const XLSX = require("xlsx");
const wb = XLSX.read(binary, {
type: "binary",
});
const outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
this.excelData = [...outdata];
const arr = [],
arr1 = [];
if (this.excelData.length > 0) {
[this.excelData[0]].map((v) => {
for (let key in v) {
let obj = {};
obj["column_name"] = key;
obj["column_comment"] = key;
arr.push(obj);
}
});
this.excelData.map((v, i) => {
let obj1 = {};
for (let key in v) {
obj["column_name"] = key;
obj["column_comment"] = key;
obj1[key] = v[key];
}
arr1.push(obj1);
});
that.tableDataFromExcelHead = arr;
that.tableDataFromExcel = that.tableDataFromExcel.concat(arr1);
}
};
},
//导入数据确定事件
defineImport() {
let importData = [];
this.$refs.mychild.parentHandleclick("嘿嘿嘿");
return;
let obj = {
content: this.tableDataFromExcel,
title: this.tableDataFromExcelHead.reduce((pre, item) => {
pre[item.column_name] = item.column_comment;
return pre;
}, {}),
createId: "string",
id: "string",
name: this.pickNew.label,
treeId: this.pickNew.id,
};
let length = this.tableDataFromExcel.length;
post("api/rest/resource/addResourceItem", obj)
.then((res) => {
if (res == length) {
this.$message.success("上传成功!");
this.dialogVisibleImport = false;
}
})
.catch((err) => {
console.log(err);
});
},
},
watch: {
filterText(val) {
......
......@@ -418,13 +418,13 @@ export default {
current_page_qw: 1,
format_files: "",
get_files: [],
type_folder: "fzjc", //文件夹名称
type_folder: "DocumentPDF", //文件夹名称
wjfx_qh: true,
gjc_input: "",
tab_jsfx: true,
znjsfx_name: "",
clientDetails_type: "4", //默认查询id为21的方案预案
module_name: "辅助决策文档",
clientDetails_type: "1", //默认查询id为21的方案预案
module_name: "战法策略文档",
tab_actives: "-1", //表格切换
};
},
......@@ -564,8 +564,8 @@ export default {
_this.title = "正在播放视频---" + row.name;
_this.centerDialogVisible_video = true;
setTimeout(function () {
let path_srt = "api/rest/document/download/";
path_srt = path_srt + _this.type_folder + "/" + row.file.uuid;
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
_this.video_src = path_srt;
if (document.getElementById("video").currentTime != 0)
document.getElementById("video").currentTime = 0;
......@@ -574,39 +574,39 @@ export default {
_this.title_sound = "正在播放音频---" + row.name;
_this.centerDialogVisible_sound = true;
setTimeout(function () {
let path_srt = "api/rest/document/download/";
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + _this.type_folder + "/" + row.file.uuid;
_this.sound_src = path_srt;
if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0;
}, 500);
} else {
let path_srt =
"api/rest/document/pdf/" + _this.type_folder + "/" + row.file.uuid;
window.open(path_srt);
// let path_srt =
// "api/rest/document/pdf/" + _this.type_folder + "/" + row.file.uuid;
// window.open(path_srt);
window.open(`api/rest/file/pdf/DocumentPDF?objectName=${row.file.uuid}`);
}
},
//table_全文搜索预览
handleView_qwss(item) {
let path_srt =
"api/rest/document/pdf/" +
this.type_folder +
"/" +
item.fileInfo.file.uuid;
window.open(path_srt);
// let path_srt =
// "api/rest/document/pdf/" +
// this.type_folder +
// "/" +
// item.fileInfo.file.uuid;
// window.open(path_srt);
window.open(`api/rest/file/pdf/DocumentPDF?objectName=${item.fileInfo.file.uuid}`);
},
//table数据下载
handleDownload(index, row) {
let path_srt =
"api/rest/document/download/" + this.type_folder + "/" + row.file.uuid;
"api/rest/file/download/Document/DocumentPDF/" + row.file.uuid;
download(path_srt, row.file.name);
},
//table_全文搜索下载
handleDownload_qwss(item) {
let path_srt =
"api/rest/document/download/" +
this.type_folder +
"/" +
"api/rest/file/download/Document/DocumentPDF/" +
item.fileInfo.file.uuid;
download(path_srt, item.fileInfo.file.name);
},
......
......@@ -21,84 +21,17 @@
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="first-span" :title="node.label">{{ node.label }}</span>
<!-- <span class="list-span">
<el-button
type="text"
size="mini"
@click="() => append(node, data)"
>
<i class="el-icon-circle-plus" title="添加子节点"></i>
</el-button>
<el-button type="text" size="mini" @click="() => edit(node, data)">
<i class="el-icon-edit-outline" title="编辑机构"></i>
</el-button>
<el-button
type="text"
size="mini"
@click="() => remove(node, data)"
>
<i class="el-icon-error" title="删除子节点"></i>
</el-button>
<el-button
class="import"
type="text"
size="mini"
:style="{
display: getparentNode(node) == 25 ? '' : 'none !important',
}"
>
<i class="el-icon-upload" @click="importExcelData(data)"></i>
</el-button> -->
</span>
</el-tree>
</div>
<div class="right-div">
<component :is="currentRole" :clientDetails="clientDetails" ref="mychild"/>
</div>
<el-dialog title="新增文件夹" :visible.sync="dialogVisible">
<span class="dialogContent"
><span>名称:</span>
<el-input v-model="name" placeholder="请输入名称"></el-input>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="add_xzzj()">确 定</el-button>
</span>
</el-dialog>
<el-dialog title="编辑文件夹" :visible.sync="dialogVisible_edit">
<span class="dialogContent"><span>名称:</span>
<el-input v-model="name_edit" placeholder="请输入名称"></el-input>
</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible_edit = false">取 消</el-button>
<el-button type="primary" @click="edit_xzzj()">确 定</el-button>
</span>
</el-dialog>
<el-dialog class="importData" :title="title" :visible.sync="dialogVisibleImport" id="impor_file">
<span>
<el-upload class="upload-demo" action="" :on-change="handleChange" :show-file-list="false" :auto-upload="false">
<el-button size="small" type="primary" style="margin-bottom:15px;">读取excel文件</el-button>
</el-upload>
<el-table :data="tableDataFromExcel" style="width: 100%" height="300px">
<template v-for="(item,index) in tableDataFromExcelHead">
<el-table-column :prop="item.column_name" :label="item.column_comment"></el-table-column>
</template>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="handleDelete(scope)" type="primary" icon="el-icon-delete" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
</span>
<span slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogVisibleImport = false">取 消</el-button>
<el-button size="mini" type="primary" @click="defineImport">导入</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { get, post, delete_util } from "../../util/http_util";
import { queryDocumentTree, } from '../../api/xxzp/wxgl';
import XLSX from "xlsx";
import navs from "./znfx.vue";
// import navs1 from "./znjsfx.vue";
......@@ -127,123 +60,14 @@ export default {
pickNew: "",
tableDataFromExcelHead: [],
tableDataFromExcel: [],
module_name:'辅助决策文档',
module_name:'信息制品文档',
};
},
methods: {
edit(node,data){
this.name_edit = data.label;
this.dialogVisible_edit = true;
this.this_data = data;
this.this_node = node;
},
edit_xzzj(){
if (this.name_edit.trim() == "") {
this.$message({
type: "warning",
message: "名称不能为空",
});
return;
}
let paramDatas = {
id:this.this_data.id,
label: this.name_edit.trim(),
};
post("api/rest/document/updateDocumentTreeItem", paramDatas)
.then((data) => {
if (data == 1) {
this.$message({
type: "success",
message: "文件夹编辑成功",
});
this.dialogVisible_edit = false;
this.$refs.mychild.searchs(1);
this.query_tree();
}
})
.catch((err) => {
console.log(err);
});
},
//添加子模块弹出框
append(node, data) {
this.name = "";
this.dialogVisible = true;
this.this_data = data;
this.this_node = node;
},
//新增文件夹确定按钮
add_xzzj() {
if (this.name.trim() == "") {
this.$message({
type: "warning",
message: "名称不能为空",
});
return;
}
let paramDatas = {
label: this.name.trim(),
level: this.this_node.data.level + 1,
module: this.module_name,
parentCode: this.this_node.data.code,
createId:this.$store.state.userInfo.account,
};
post("api/rest/document/addDocumentTreeItem", paramDatas)
.then((data) => {
if (data == 1) {
this.$message({
type: "success",
message: "文件夹新增成功",
});
this.dialogVisible = false;
this.query_tree();
}
})
.catch((err) => {
console.log(err);
});
},
//删除子模块
remove(node, data) {
this.$confirm(
"此操作将永久删除该文件夹以及其下所有文件夹, 是否继续?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
delete_util(
"api/rest/document/removeDocumentTreeItem/" + node.data.id
)
.then((data) => {
if (data == 1) {
this.$message({
type: "success",
message: "删除成功!",
});
this.query_tree();
this.currentRole = "navs";
this.clientDetails = { type: 4 };
}
})
.catch((err) => {
console.log(err);
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//查询tree数据
query_tree() {
this.tree_data = [];
get("api/rest/document/queryDocumentTree?module="+this.module_name)
queryDocumentTree(this.module_name)
.then((res) => {
this.tree_data = [{
id:4,
......@@ -283,108 +107,6 @@ export default {
return this.getparentNode(data.parent);
}
},
//导入数据弹出框
importExcelData(data) {
this.dialogVisibleImport = true;
this.title = data.label;
this.pickNew = data;
this.tableDataFromExcelHead = [];
this.tableDataFromExcel = [];
},
// 核心部分代码(handleChange 和 importfile)
handleChange(file, fileList) {
this.tableDataFromExcelHead = [];
this.tableDataFromExcel = [];
this.fileContent = file.raw;
const fileName = file.name;
const fileType = fileName.substring(fileName.lastIndexOf(".") + 1);
if (this.fileContent) {
if (fileType === "xlsx" || fileType === "xls") {
this.importfile(this.fileContent);
} else {
this.$message({
type: "warning",
message: "附件格式错误,请重新上传!",
});
}
} else {
this.$message({
type: "warning",
message: "请上传附件!",
});
}
},
importfile(obj) {
const reader = new FileReader();
const that = this;
reader.readAsArrayBuffer(obj);
reader.onload = function () {
const buffer = reader.result;
const bytes = new Uint8Array(buffer);
const length = bytes.byteLength;
let binary = "";
for (let i = 0; i < length; i++) {
binary += String.fromCharCode(bytes[i]);
}
const XLSX = require("xlsx");
const wb = XLSX.read(binary, {
type: "binary",
});
const outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
this.excelData = [...outdata];
const arr = [],
arr1 = [];
if (this.excelData.length > 0) {
[this.excelData[0]].map((v) => {
for (let key in v) {
let obj = {};
obj["column_name"] = key;
obj["column_comment"] = key;
arr.push(obj);
}
});
this.excelData.map((v, i) => {
let obj1 = {};
for (let key in v) {
obj["column_name"] = key;
obj["column_comment"] = key;
obj1[key] = v[key];
}
arr1.push(obj1);
});
that.tableDataFromExcelHead = arr;
that.tableDataFromExcel = that.tableDataFromExcel.concat(arr1);
}
};
},
//导入数据确定事件
defineImport() {
let importData = [];
this.$refs.mychild.parentHandleclick("嘿嘿嘿");
return;
let obj = {
content: this.tableDataFromExcel,
title: this.tableDataFromExcelHead.reduce((pre, item) => {
pre[item.column_name] = item.column_comment;
return pre;
}, {}),
createId: "string",
id: "string",
name: this.pickNew.label,
treeId: this.pickNew.id,
};
let length = this.tableDataFromExcel.length;
post("api/rest/resource/addResourceItem", obj)
.then((res) => {
if (res == length) {
this.$message.success("上传成功!");
this.dialogVisibleImport = false;
}
})
.catch((err) => {
console.log(err);
});
},
},
watch: {
filterText(val) {
......
......@@ -575,6 +575,7 @@ import {
import { uuid } from "../../util/data_util";
import VanillaTilt from "vanilla-tilt";
import "animate.css";
import { queryDoc, searchFiles } from '../../api/zfclk/wxgl';
export default {
data() {
return {
......@@ -624,13 +625,13 @@ export default {
current_page_qw: 1,
format_files: "",
get_files: [],
type_folder: "fzjc", //文件夹名称
type_folder: "DocumentPDF", //文件夹名称
wjfx_qh: true,
gjc_input: "",
tab_jsfx: true,
znjsfx_name: "",
clientDetails_type: "4", //默认查询id为21的方案预案
module_name: "辅助决策文档",
clientDetails_type: "2", //默认查询id为21的方案预案
module_name: "信息制品文档",
tab_actives: "-1", //表格切换
};
},
......@@ -689,14 +690,7 @@ export default {
// startLoading();
_this.tableData = [];
_this.total = 0;
post(
"api/rest/document/queryDoc?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageSize,
_this.paramData
)
.then((data) => {
queryDoc(pageNum, _this.pageSize, _this.paramData).then((data) => {
setTimeout(() => {
if (data.list.length != 0) {
_this.tableData = data.list;
......@@ -737,14 +731,7 @@ export default {
startLoading();
_this.get_files = [];
_this.totals_qw = 0;
post(
"api/rest/fulltext/searchFiles?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageSize_qw,
paramDatas
)
.then((data) => {
searchFiles(pageNum, _this.pageSize_qw, paramDatas).then((data) => {
if (data.list.length != 0) {
data.list.forEach((item, index) => {
data.list[index].create_time = new Date(
......@@ -784,8 +771,8 @@ export default {
_this.title = "正在播放视频---" + row.name;
_this.centerDialogVisible_video = true;
setTimeout(function () {
let path_srt = "api/rest/document/download/";
path_srt = path_srt + _this.type_folder + "/" + row.file.uuid;
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
_this.video_src = path_srt;
if (document.getElementById("video").currentTime != 0)
document.getElementById("video").currentTime = 0;
......@@ -794,39 +781,39 @@ export default {
_this.title_sound = "正在播放音频---" + row.name;
_this.centerDialogVisible_sound = true;
setTimeout(function () {
let path_srt = "api/rest/document/download/";
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + _this.type_folder + "/" + row.file.uuid;
_this.sound_src = path_srt;
if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0;
}, 500);
} else {
let path_srt =
"api/rest/document/pdf/" + _this.type_folder + "/" + row.file.uuid;
window.open(path_srt);
// let path_srt =
// "api/rest/document/pdf/" + _this.type_folder + "/" + row.file.uuid;
// window.open(path_srt);
window.open(`api/rest/file/pdf/DocumentPDF?objectName=${row.file.uuid}`);
}
},
//table_全文搜索预览
handleView_qwss(item) {
let path_srt =
"api/rest/document/pdf/" +
this.type_folder +
"/" +
item.fileInfo.file.uuid;
window.open(path_srt);
// let path_srt =
// "api/rest/document/pdf/" +
// this.type_folder +
// "/" +
// item.fileInfo.file.uuid;
// window.open(path_srt);
window.open(`api/rest/file/pdf/DocumentPDF?objectName=${item.fileInfo.file.uuid}`);
},
//table数据下载
handleDownload(index, row) {
let path_srt =
"api/rest/document/download/" + this.type_folder + "/" + row.file.uuid;
"api/rest/file/download/Document/DocumentPDF/" + row.file.uuid;
download(path_srt, row.file.name);
},
//table_全文搜索下载
handleDownload_qwss(item) {
let path_srt =
"api/rest/document/download/" +
this.type_folder +
"/" +
"api/rest/file/download/Document/DocumentPDF/" +
item.fileInfo.file.uuid;
download(path_srt, item.fileInfo.file.name);
},
......
......@@ -231,7 +231,6 @@ export default {
})
}
});
debugger
this.manager_module = this.$store.state.navList[0].children.filter(
(e) => e.meta.type == "1"
);
......
......@@ -58,7 +58,7 @@ export default {
modules: {
leftModule: [
{ id: 1, title: '目标对象库', eg: 'Target Object Library' },
{ id: 2, title: '法策略库', eg: 'Method Strategy Library' },
{ id: 2, title: '法策略库', eg: 'Method Strategy Library' },
{ id: 3, title: '信息制品库', eg: 'Infomation product Library' },
],
rightModule: [
......
......@@ -66,7 +66,7 @@
/>
</div>
</el-tab-pane>
<el-tab-pane>
<!-- <el-tab-pane>
<span slot="label"
><i class="el-icon-document-copy"></i>文献库管理</span
>
......@@ -77,7 +77,7 @@
ref="mychild_wx_data"
/>
</div>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<el-dialog
title="新增模板名称"
......
......@@ -3,13 +3,17 @@
<el-tabs type="border-card" @tab-click="cli_a" v-model="editableTabsValue">
<el-tab-pane>
<span slot="label"><i class="el-icon-document-copy"></i>法规数据</span>
<div style="width:100%;height:100%;">
<component :is="currentRole_wx_data" :clientDetails="clientDetails_wx_data" ref="mychild_wx_data" />
<div style="width: 100%; height: 100%">
<component
:is="currentRole_wx_data"
:clientDetails="clientDetails_wx_data"
ref="mychild_wx_data"
/>
</div>
</el-tab-pane>
<el-tab-pane>
<span slot="label"><i class="el-icon-phone-outline"></i>文献数据</span>
<div style="width:100%;height:100%;">
<div style="width: 100%; height: 100%">
<component :is="flfg_wx" :clientDetails="jczc_data" ref="jczc" />
</div>
</el-tab-pane>
......@@ -21,36 +25,33 @@ import flfg_flfg from "./flfg_flfg.vue";
import navs_wx from "./wx_data_public.vue";
let id = 1000;
export default {
components: { flfg_flfg,navs_wx},
components: { flfg_flfg, navs_wx },
data() {
return {
currentRole_wx_data: "flfg_flfg",
clientDetails_wx_data: {},
editableTabsValue: "0",
jczc_data:{},
flfg_wx:'navs_wx'
jczc_data: {},
flfg_wx: "navs_wx",
};
},
methods: {
cli_a() {
let _this = this;
if (_this.editableTabsValue == 1) {
(_this.currentRole_wx_data = "navs_wx"),
setTimeout(() =>{
_this.clientDetails_wx_data = {
module_name: "辅助决策文档",
fl_type: 4,
type_folder: "fzjc",
};
},100);
}else{
(_this.currentRole_wx_data = "flfg_flfg")
if (this.editableTabsValue == 1) {
(this.flfg_wx = "navs_wx"),
(this.jczc_data = {
module_name: "战法策略文档",
fl_type: 1,
type_folder: "DocumentPDF",
});
} else if (this.editableTabsValue == 0) {
(this.currentRole_wx_data = "flfg_flfg")
}
},
},
activated() {
this.cli_a();
}
},
};
</script>
......@@ -61,14 +62,14 @@ export default {
padding: 30px;
box-sizing: border-box;
overflow-y: auto;
>.el-tabs--border-card {
> .el-tabs--border-card {
width: calc(100% - 4px);
height: calc(100% - 4px);
border: 2px solid #125473;
border-radius: 5px;
box-sizing: border-box;
background: #ffffff00;
>.el-tabs__content{
> .el-tabs__content {
width: 100%;
height: calc(100% - 40px);
box-sizing: border-box;
......@@ -165,10 +166,7 @@ export default {
background-repeat: no-repeat;
background-size: 100% 100%;
}
.el-tree
> .el-tree-node
> .el-tree-node__content
> .el-tree-node__label {
.el-tree > .el-tree-node > .el-tree-node__content > .el-tree-node__label {
font-size: 16px !important;
}
.el-tree > .el-tree-node > .el-tree-node__children {
......@@ -255,7 +253,7 @@ export default {
background-repeat: no-repeat;
background-size: 100% 100%;
}
.el-upload-list__item-name [class^='el-icon'] {
.el-upload-list__item-name [class^="el-icon"] {
color: #2870ff;
height: unset !important;
}
......
......@@ -7,12 +7,12 @@
<component :is="currentRole_wx_data" :clientDetails="clientDetails_wx_data" ref="mychild_wx_data" />
</div>
</el-tab-pane>
<el-tab-pane>
<!-- <el-tab-pane>
<span slot="label"><i class="el-icon-phone-outline"></i>决策支持管理</span>
<div style="width:100%;height:100%;">
<component :is="fzjcgl_jczc" :clientDetails="jczc_data" ref="jczc" />
</div>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
</div>
</template>
......@@ -28,7 +28,7 @@ export default {
clientDetails_wx_data: {},
editableTabsValue: "0",
jczc_data:{},
fzjcgl_jczc:'fzjcgl_jczc'
fzjcgl_jczc:'navs_wx'
};
},
methods: {
......@@ -38,9 +38,9 @@ export default {
(_this.currentRole_wx_data = "navs_wx"),
setTimeout(() =>{
_this.clientDetails_wx_data = {
module_name: "辅助决策文档",
fl_type: 4,
type_folder: "fzjc",
module_name: "信息制品文档",
fl_type: 2,
type_folder: "DocumentPDF",
};
},100);
}
......
......@@ -282,7 +282,6 @@ export default {
if(item.uuid=='null'||item.uuid==''||item.uuid==undefined){
arr_entity[index].uuid = Math.round(Math.random()*10000)+'';
}
console.log(arr_entity[index].uuid)
});
arr_nodes = this.arr_push(
arr_entity,
......
......@@ -889,7 +889,8 @@ export default {
query_grxx() {
this.form = JSON.parse(JSON.stringify(this.organization));
// this.imageUrl = imgUrl + this.form.avatar;
this.form.avatar==null?(this.imageUrl=''):this.query_avatar(this.form.avatar);
// this.form.avatar==null?(this.imageUrl=''):this.query_avatar(this.form.avatar);
this.form.avatar==null?(this.imageUrl=''):(this.imageUrl = 'api/rest/file/viewPicture/AVATAR?objectName='+this.form.avatar);
if (
this.wzmk_data.length > 0 &&
JSON.stringify(this.form.tableProperty) != "{}"
......
......@@ -514,11 +514,11 @@ export default {
this.tree_data.push(a);
})
.then((res) => {
this.query_tree_jg1();
})
.catch((err) => {
this.$message.warning(err.message);
});
this.query_tree_jg1();
},
query_tree_jg1() {
get("api/rest/mongo/organization/queryTree?module=" + "DFWW")
......
......@@ -928,7 +928,8 @@ export default {
if (data.records.length > 0) {
this.form = JSON.parse(JSON.stringify(data.records[0]));
// this.imageUrl = this.form.avatarUrl==null?'':this.form.avatarUrl;
this.form.avatar==null?(this.imageUrl=''):this.query_avatar(this.form.avatar);
// this.form.avatar==null?(this.imageUrl=''):this.query_avatar(this.form.avatar);
this.form.avatar==null?(this.imageUrl=''):(this.imageUrl = 'api/rest/file/viewPicture/AVATAR?objectName='+this.form.avatar);
if (
this.wzmk_data.length > 0 &&
JSON.stringify(this.form.tableProperty) != "{}"
......@@ -959,11 +960,14 @@ export default {
if (this.wzmk_data.length > 0) {
this.wzmk_data.forEach((item) => {
if (item.type == 3) {
(this.clientDetails_rw = {
this.currentRole_rw = "navs_rwk";
setTimeout(() => {
this.clientDetails_rw = {
module_id: this.form.rwbh.value,
types: "1",
peopleOrOrganization:'character',
});
peopleOrOrganization: "character",
};
}, 500);
}
});
}
......
......@@ -132,7 +132,7 @@ export default {
id:this.this_data.id,
label: this.name_edit.trim(),
};
post("api/rest/document/updateDocumentTreeItem", paramDatas)
post("api/rest/3z/document/updateDocumentTreeItem", paramDatas)
.then((data) => {
if (data == 1) {
this.$message({
......@@ -171,7 +171,7 @@ export default {
parentCode: this.this_node.data.code,
createId:this.$store.state.userInfo.account,
};
post("api/rest/document/addDocumentTreeItem", paramDatas)
post("api/rest/3z/document/addDocumentTreeItem", paramDatas)
.then((data) => {
if (data == 1) {
this.$message({
......@@ -199,7 +199,7 @@ export default {
)
.then(() => {
delete_util(
"api/rest/document/removeDocumentTreeItem/" + node.data.id
"api/rest/3z/document/removeDocumentTreeItem/" + node.data.id
)
.then((data) => {
if (data == 1) {
......@@ -229,7 +229,7 @@ export default {
//查询tree数据
query_tree() {
this.tree_data = [];
get("api/rest/document/queryDocumentTree?module="+this.module_name)
get("api/rest/3z/document/queryDocumentTree?module="+this.module_name)
.then((res) => {
console.log(1122);
this.tree_data = [{
......
......@@ -15,14 +15,14 @@
</el-switch>
</div>
<div class="button-discuss" @click="searchs">搜索</div>
<el-tooltip class="item" effect="light" content="文件分析" placement="top-start">
<!-- <el-tooltip class="item" effect="light" content="文件分析" placement="top-start">
<el-button type="info" icon="el-icon-data-line" size="small"
style="margin-left:50px;pointer-events: none;" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="light" content="智能检索分析" placement="top-start">
<el-button type="primary" icon="el-icon-data-board" size="small" @click="znjsfx_cli()"
circle></el-button>
</el-tooltip>
</el-tooltip> -->
<div class="button-discuss1" @click="handleAdd()">新增</div>
</div>
<div class="bottom-div">
......@@ -279,7 +279,7 @@ import {
lastIndexOf,
get,
post,
fileUpload,
fileUpload_PUT,
delete_util,
startLoading,
endLoading,
......@@ -412,7 +412,7 @@ export default {
_this.tableData = [];
_this.total = 0;
post(
"api/rest/document/queryDoc?pageNum=" +
"api/rest/3z/document/queryDoc?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageSize,
......@@ -457,7 +457,7 @@ export default {
_this.get_files = [];
_this.totals_qw = 0;
post(
"api/rest/fulltext/searchFiles?pageNum=" +
"api/rest/elastic/searchFiles?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageSize_qw,
......@@ -504,8 +504,8 @@ export default {
_this.title = "正在播放视频---" + row.name;
_this.centerDialogVisible_video = true;
setTimeout(function () {
let path_srt = "api/rest/document/download/";
path_srt = path_srt + _this.type_folder + '/' + row.file.uuid;
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
_this.video_src = path_srt;
if (document.getElementById("video").currentTime != 0)
document.getElementById("video").currentTime = 0;
......@@ -514,40 +514,42 @@ export default {
_this.title_sound = "正在播放音频---" + row.name;
_this.centerDialogVisible_sound = true;
setTimeout(function () {
let path_srt = "api/rest/document/download/";
path_srt = path_srt + _this.type_folder + '/' + row.file.uuid;
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
_this.sound_src = path_srt;
if (document.getElementById("sound_id").currentTime != 0)
document.getElementById("sound_id").currentTime = 0;
}, 500);
} else {
let path_srt =
"api/rest/document/pdf/" +
_this.type_folder +
"/" +
row.file.uuid;
window.open(path_srt);
// let path_srt =
// "api/rest/3z/document/pdf/" +
// _this.type_folder +
// "/" +
// row.file.uuid;
// window.open(path_srt);
window.open(`api/rest/file/pdf/DocumentPDF?objectName=${row.file.uuid}`);
}
},
//table_全文搜索预览
handleView_qwss(item) {
let path_srt =
"api/rest/document/pdf/" +
this.type_folder +
"/" +
item.fileInfo.file.uuid;
window.open(path_srt);
// let path_srt =
// "api/rest/3z/document/pdf/" +
// this.type_folder +
// "/" +
// item.fileInfo.file.uuid;
// window.open(path_srt);
window.open(`api/rest/file/pdf/DocumentPDF?objectName=${item.fileInfo.file.uuid}`);
},
//table数据下载
handleDownload(index, row) {
let path_srt =
"api/rest/document/download/" + this.type_folder + "/" + row.file.uuid;
"api/rest/3z/document/download/" + this.type_folder + "/" + row.file.uuid;
download(path_srt, row.file.name);
},
//table_全文搜索下载
handleDownload_qwss(item) {
let path_srt =
"api/rest/document/download/" +
"api/rest/3z/document/download/" +
this.type_folder +
"/" +
item.fileInfo.file.uuid;
......@@ -564,9 +566,9 @@ export default {
};
_this.edit_ids = row.id;
_this.centerDialogVisible_edit = true;
setTimeout(function () {
_this.$refs.forms1.resetFields();
}, 200)
// setTimeout(function () {
// _this.$refs.forms1.resetFields();
// }, 200)
},
//table数据删除
handleDelete(index, row) {
......@@ -579,7 +581,7 @@ export default {
})
.then(() => {
delete_util(
"api/rest/document/delDoc/" +
"api/rest/3z/document/delDoc/" +
ids +
"?folder=" +
_this.type_folder +
......@@ -636,7 +638,7 @@ export default {
};
this.$refs['forms1'].validate((valid) => {
if (valid) {
post("api/rest/document/updDoc", params).then((data) => {
post("api/rest/3z/document/updDoc", params).then((data) => {
if (data == 1) {
this.$message({
type: "success",
......@@ -704,7 +706,7 @@ export default {
fd.append("info", JSON.stringify(fileInfo));
fd.append("folder", this.type_folder);
fd.append("file", this.form_add.fileList[0].raw);
fileUpload("api/rest/document/upload", fd).then((data) => {
fileUpload_PUT("api/rest/3z/document/upload", fd).then((data) => {
this.$message({
type: "success",
message: "文件上传成功!",
......@@ -770,7 +772,7 @@ export default {
_this.tableData_znjsfx = [];
_this.total_znjsfx = 0;
post(
"api/rest/document/queryDoc?pageNum=" +
"api/rest/3z/document/queryDoc?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageSize,
......
......@@ -86,7 +86,7 @@ module.exports = {
//后台代理
proxy: {
'/api/': {
target: 'http://192.168.168.110:8081',
target: 'http://192.168.168.106:8081',
ws: true,
secure: false,
changeOrigin: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment