缺陷bug修改
This commit is contained in:
parent
0d8b64e47e
commit
7c7fd001dd
@ -50,6 +50,7 @@
|
|||||||
"jsencrypt": "^3.3.2",
|
"jsencrypt": "^3.3.2",
|
||||||
"jspdf": "^2.5.1",
|
"jspdf": "^2.5.1",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
|
"mammoth": "^1.9.0",
|
||||||
"marked": "^4.0.17",
|
"marked": "^4.0.17",
|
||||||
"minimatch": "^5.1.0",
|
"minimatch": "^5.1.0",
|
||||||
"monaco-editor": "^0.36.1",
|
"monaco-editor": "^0.36.1",
|
||||||
|
@ -201,5 +201,23 @@ export function batchModify(params:any){
|
|||||||
method:'post',
|
method:'post',
|
||||||
data:params,
|
data:params,
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//试验数据扫描接口通过试验任务ID
|
||||||
|
export function testDataScanById(params:any){
|
||||||
|
return request ({
|
||||||
|
url:'/experimentalData/ts-nodes/testDataScanById',
|
||||||
|
method:'post',
|
||||||
|
params:params,
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取异步信息
|
||||||
|
export function obtaintestData(params:any){
|
||||||
|
return request ({
|
||||||
|
url:'/experimentalData/ts-nodes/obtaintestData',
|
||||||
|
method:'post',
|
||||||
|
params:params,
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
@ -77,4 +77,28 @@ export function deleteFilesByIds(queryParams:any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
params:queryParams
|
params:queryParams
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
//专项文档管理扫描接口通过所属项目ID
|
||||||
|
export function specialScanById(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_nodes/specialScanById',
|
||||||
|
method: 'post',
|
||||||
|
params:queryParams
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//专项文档管理文档上传接口通过所属项目ID
|
||||||
|
export function documentUploadById(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_nodes/documentUploadById',
|
||||||
|
method: 'post',
|
||||||
|
params:queryParams
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//获取异步信息
|
||||||
|
export function obtainInformationAsync(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_nodes/obtainInformationAsync',
|
||||||
|
method: 'post',
|
||||||
|
params:queryParams
|
||||||
|
});
|
||||||
}
|
}
|
@ -444,7 +444,7 @@ export default function useFileUpload() {
|
|||||||
let s3UploadType = common.storageType.s3Type;
|
let s3UploadType = common.storageType.s3Type;
|
||||||
let onedriveUploadType = common.storageType.micrsoftType;
|
let onedriveUploadType = common.storageType.micrsoftType;
|
||||||
let storagea
|
let storagea
|
||||||
if( param.storageKey === 'local'){
|
if( param.storageKey === 'local'||param.storageKey === 'sdlocal' ){
|
||||||
storagea = 'local'
|
storagea = 'local'
|
||||||
}else if( param.storageKey === 'minio'){
|
}else if( param.storageKey === 'minio'){
|
||||||
storagea = 'minio'
|
storagea = 'minio'
|
||||||
|
@ -12,7 +12,7 @@ import { Search } from '@element-plus/icons-vue'
|
|||||||
import Page from '@/components/Pagination/page.vue';
|
import Page from '@/components/Pagination/page.vue';
|
||||||
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
||||||
import { batchDeleteReq } from "@/api/file-operator";
|
import { batchDeleteReq } from "@/api/file-operator";
|
||||||
import { projectList, getNodesTree, addNodes, updateNodes, deleteNodesById, getFilesPage, addFiles, updateFiles, deleteFilesById, deleteFilesByIds } from "@/api/document";
|
import { projectList, documentUploadById,obtainInformationAsync,getNodesTree, addNodes, updateNodes, deleteNodesById, getFilesPage, addFiles, updateFiles, deleteFilesById, deleteFilesByIds, specialScanById } from "@/api/document";
|
||||||
import ZUpload from '@/components/file/ZUpload.vue'
|
import ZUpload from '@/components/file/ZUpload.vue'
|
||||||
import useFileUpload from "@/components/file/file/useFileUpload";
|
import useFileUpload from "@/components/file/file/useFileUpload";
|
||||||
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
||||||
@ -40,6 +40,7 @@ const { currentStorageKey } = useHeaderStorageList();
|
|||||||
const { openRow } = useFileData();
|
const { openRow } = useFileData();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProject()
|
getProject()
|
||||||
|
|
||||||
});
|
});
|
||||||
//拖动条
|
//拖动条
|
||||||
const vMove = {
|
const vMove = {
|
||||||
@ -62,12 +63,15 @@ const vMove = {
|
|||||||
//左侧树的选择框
|
//左侧树的选择框
|
||||||
const projectId = ref()
|
const projectId = ref()
|
||||||
const projectArr = ref([])
|
const projectArr = ref([])
|
||||||
|
const projectName = ref('')
|
||||||
//获取所有项目
|
//获取所有项目
|
||||||
function getProject() {
|
function getProject() {
|
||||||
projectList().then((res: any) => {
|
projectList().then((res: any) => {
|
||||||
projectArr.value = res.data
|
projectArr.value = res.data
|
||||||
projectId.value = projectArr.value[0].id
|
projectId.value = projectArr.value[0].id
|
||||||
gettreedata()
|
projectName.value = projectArr.value[0].projectName
|
||||||
|
// gettreedata()
|
||||||
|
tonstatus()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//左侧树配置
|
//左侧树配置
|
||||||
@ -81,14 +85,26 @@ const treeForm = ref({
|
|||||||
projectId: '',
|
projectId: '',
|
||||||
nodeName: '',
|
nodeName: '',
|
||||||
})
|
})
|
||||||
|
//扫庙
|
||||||
|
const buttonmsg = ref('扫描项目文档')
|
||||||
|
function scan() {
|
||||||
|
console.log('pathid.value')
|
||||||
|
specialScanById({ id: projectId.value }).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
tonstatus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
//获取树数据
|
//获取树数据
|
||||||
const treeRef = ref();
|
const treeRef = ref();
|
||||||
|
const filePath = ref('')
|
||||||
function gettreedata() {
|
function gettreedata() {
|
||||||
treeloading.value = true
|
treeloading.value = true
|
||||||
treeForm.value.projectId = projectId.value
|
treeForm.value.projectId = projectId.value
|
||||||
getNodesTree(treeForm.value).then((res: any) => {
|
getNodesTree(treeForm.value).then((res: any) => {
|
||||||
treedata.value = res.data
|
treedata.value = res.data
|
||||||
treeloading.value = false
|
treeloading.value = false
|
||||||
|
filePath.value = res.data[0].path + res.data[0].nodeName +'/'
|
||||||
if (treedata.value[0]) {
|
if (treedata.value[0]) {
|
||||||
pathid.value = treedata.value[0].id
|
pathid.value = treedata.value[0].id
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@ -104,6 +120,7 @@ function gettreedata() {
|
|||||||
const pathid = ref()
|
const pathid = ref()
|
||||||
function handleNodeClick(data: any, node: any) {
|
function handleNodeClick(data: any, node: any) {
|
||||||
pathid.value = data.id
|
pathid.value = data.id
|
||||||
|
filePath.value = data.path + data.nodeName +'/'
|
||||||
getdata()
|
getdata()
|
||||||
}
|
}
|
||||||
//子项目配置
|
//子项目配置
|
||||||
@ -136,10 +153,13 @@ function addSubItem(row: any) {
|
|||||||
nodeName: "",//节点名称
|
nodeName: "",//节点名称
|
||||||
}
|
}
|
||||||
projectForme.value.projectId = projectId.value
|
projectForme.value.projectId = projectId.value
|
||||||
|
|
||||||
if (row.nodeType == '00') {
|
if (row.nodeType == '00') {
|
||||||
projectForme.value.parentId = '00'
|
projectForme.value.parentId = '00'
|
||||||
|
projectForme.value.path = '/'+projectName.value+'/'
|
||||||
} else {
|
} else {
|
||||||
projectForme.value.parentId = row.id
|
projectForme.value.parentId = row.id
|
||||||
|
projectForme.value.path = filePath.value
|
||||||
}
|
}
|
||||||
if (row.nodeType == '00') {
|
if (row.nodeType == '00') {
|
||||||
title.value = "添加子项目"
|
title.value = "添加子项目"
|
||||||
@ -229,7 +249,7 @@ function delSubItem(row: any) {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
treeloading.value = true
|
treeloading.value = true
|
||||||
loading.value = true
|
loading.value = true
|
||||||
deleteNodesById({ id: row.id }).then((res: any) => {
|
deleteNodesById({ id: row.id,path:row.path }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
gettreedata()
|
gettreedata()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -295,8 +315,8 @@ const fileObj: any = ref({
|
|||||||
const upfile = ref(false)
|
const upfile = ref(false)
|
||||||
function openFile() {
|
function openFile() {
|
||||||
title.value = "上传文件"
|
title.value = "上传文件"
|
||||||
localStorage.setItem('filepath', findPathById(treedata.value, pathid.value));
|
localStorage.setItem('filepath', filePath.value);
|
||||||
localStorage.setItem('storageKey', JSON.stringify(['minio']));
|
localStorage.setItem('storageKey', JSON.stringify(['sdlocal']));
|
||||||
upfile.value = true
|
upfile.value = true
|
||||||
fileObj.value = {
|
fileObj.value = {
|
||||||
projectId: '', //所属项目ID
|
projectId: '', //所属项目ID
|
||||||
@ -309,6 +329,23 @@ function openFile() {
|
|||||||
}
|
}
|
||||||
judge.value = true
|
judge.value = true
|
||||||
}
|
}
|
||||||
|
//上传文件并扫描
|
||||||
|
function upfileZip() {
|
||||||
|
title.value = "上传项目包并扫描"
|
||||||
|
localStorage.setItem('filepath', '/temporary');
|
||||||
|
localStorage.setItem('storageKey', JSON.stringify(['sdlocal']));
|
||||||
|
upfile.value = true
|
||||||
|
fileObj.value = {
|
||||||
|
projectId: '', //所属项目ID
|
||||||
|
nodeId: '', //节点ID
|
||||||
|
fileName: '', //文件名称
|
||||||
|
filePath: '', //文件对象存储路径
|
||||||
|
keywords: '', //关键字
|
||||||
|
description: '', //文件描述
|
||||||
|
fileSize: '', //M
|
||||||
|
}
|
||||||
|
judge.value = false
|
||||||
|
}
|
||||||
//修改文件
|
//修改文件
|
||||||
const judge = ref(false)
|
const judge = ref(false)
|
||||||
function editfile(row: any, item: any) {
|
function editfile(row: any, item: any) {
|
||||||
@ -346,11 +383,11 @@ function delfileOne(row: any) {
|
|||||||
{
|
{
|
||||||
name: row.name,
|
name: row.name,
|
||||||
password: "",
|
password: "",
|
||||||
path: findPathById(treedata.value, pathid.value),
|
path: filePath.value,
|
||||||
type: "FILE"
|
type: "FILE"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
storageKey: "minio"
|
storageKey: "sdlocal"
|
||||||
}
|
}
|
||||||
batchDeleteReq(JSON.stringify(parmas)).then((res) => {
|
batchDeleteReq(JSON.stringify(parmas)).then((res) => {
|
||||||
})
|
})
|
||||||
@ -360,52 +397,62 @@ function bytesToMB(bytes: any) {
|
|||||||
return bytes / Math.pow(1024, 2);
|
return bytes / Math.pow(1024, 2);
|
||||||
}
|
}
|
||||||
//上传确定
|
//上传确定
|
||||||
function submitfile() {
|
|
||||||
// console.log( )
|
|
||||||
|
|
||||||
if (fileObj.value.id) {
|
function submitfile() {
|
||||||
updateFiles(fileObj.value).then((res: any) => {
|
if (localStorage.getItem('filepath') == '/temporary'){
|
||||||
if (res.code == 0) {
|
documentUploadById({fileName:JSON.parse(localStorage.getItem('fileArr'))[0].name,id:projectId.value}).then((res:any)=>{
|
||||||
closeDialog()
|
if(res.code == 0){
|
||||||
ElMessage.success('修改成功')
|
tonstatus()
|
||||||
getdata()
|
|
||||||
upfile.value = false
|
upfile.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
}else {
|
||||||
let fileArr: any
|
if (fileObj.value.id) {
|
||||||
if (localStorage.getItem('fileArr')) {
|
updateFiles(fileObj.value).then((res: any) => {
|
||||||
fileArr = JSON.parse(localStorage.getItem('fileArr'))
|
if (res.code == 0) {
|
||||||
|
closeDialog()
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
getdata()
|
||||||
|
upfile.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.warning('请先选择文件')
|
let fileArr: any
|
||||||
return
|
if (localStorage.getItem('fileArr')) {
|
||||||
}
|
fileArr = JSON.parse(localStorage.getItem('fileArr'))
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('请先选择文件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let fileName = []
|
let fileName = []
|
||||||
let fileSize = []
|
let fileSize = []
|
||||||
if (fileArr.length > 0) {
|
if (fileArr.length > 0) {
|
||||||
fileArr.forEach((item: any) => {
|
fileArr.forEach((item: any) => {
|
||||||
fileName.push(item.name)
|
fileName.push(item.name)
|
||||||
fileSize.push(bytesToMB(item.size))
|
fileSize.push(bytesToMB(item.size))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fileObj.value.projectId = projectId.value
|
||||||
|
fileObj.value.nodeId = pathid.value
|
||||||
|
fileObj.value.filePath = filePath.value
|
||||||
|
fileObj.value.fileName = fileName.join(',')
|
||||||
|
fileObj.value.fileSize = fileSize.join(',')
|
||||||
|
addFiles(fileObj.value).then((res: any) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
closeDialog()
|
||||||
|
ElMessage.success('增加成功')
|
||||||
|
getdata()
|
||||||
|
upfile.value = false
|
||||||
|
localStorage.setItem('fileArr', '');
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
fileObj.value.projectId = projectId.value
|
|
||||||
fileObj.value.nodeId = pathid.value
|
|
||||||
fileObj.value.filePath = findPathById(treedata.value, pathid.value)
|
|
||||||
fileObj.value.fileName = fileName.join(',')
|
|
||||||
fileObj.value.fileSize = fileSize.join(',')
|
|
||||||
addFiles(fileObj.value).then((res: any) => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
closeDialog()
|
|
||||||
ElMessage.success('增加成功')
|
|
||||||
getdata()
|
|
||||||
upfile.value = false
|
|
||||||
localStorage.setItem('fileArr', '');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//单个删除文件
|
//单个删除文件
|
||||||
function delfile(row: any) {
|
function delfile(row: any) {
|
||||||
@ -518,32 +565,7 @@ const downloadFileUseIframeMode = (url: any) => {
|
|||||||
iframe.remove();
|
iframe.remove();
|
||||||
}, 5 * 60 * 1000);
|
}, 5 * 60 * 1000);
|
||||||
}
|
}
|
||||||
function findPathById(array: any, targetId: any) {
|
|
||||||
// 辅助函数,用于递归查找路径
|
|
||||||
function recursiveSearch(items: any, target: any, path: any) {
|
|
||||||
for (let item of items) {
|
|
||||||
// 将当前对象的name添加到路径中
|
|
||||||
let newPath = [...path, item.nodeName];
|
|
||||||
|
|
||||||
// 检查当前对象的id是否匹配目标id
|
|
||||||
if (item.id === target) {
|
|
||||||
return newPath.join('/'); // 找到匹配项,返回路径字符串
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果没有找到匹配项,继续检查children数组
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
let result = recursiveSearch(item.children, target, newPath);
|
|
||||||
if (result) { // 如果在children中找到了匹配项,返回结果
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null; // 如果没有找到匹配项,返回null
|
|
||||||
}
|
|
||||||
// 从顶层数组开始搜索
|
|
||||||
let patharr = recursiveSearch(array, targetId, [])
|
|
||||||
return '/' + patharr; // 注意这里我们传入了一个空数组作为初始路径
|
|
||||||
}
|
|
||||||
// markdown viewer 组件懒加载, 节约首屏打开时间
|
// markdown viewer 组件懒加载, 节约首屏打开时间
|
||||||
const VMdPreview = defineAsyncComponent({
|
const VMdPreview = defineAsyncComponent({
|
||||||
loader: () => {
|
loader: () => {
|
||||||
@ -696,6 +718,34 @@ const fileIcon = (row: any) => {
|
|||||||
// // 通过 keyof 类型保护确保类型安全
|
// // 通过 keyof 类型保护确保类型安全
|
||||||
// return Object.keys(FILE_ICONS).includes(fileExtension);
|
// return Object.keys(FILE_ICONS).includes(fileExtension);
|
||||||
// };
|
// };
|
||||||
|
const tonloading = ref(false)
|
||||||
|
const tonloading1 = ref(false)
|
||||||
|
const buttonmsg1 = ref('上传项目包并扫描')
|
||||||
|
function tonstatus(){
|
||||||
|
//sao
|
||||||
|
obtainInformationAsync({id:projectId.value,type:'0'}).then((res:any)=>{
|
||||||
|
if(res.msg == '1'){
|
||||||
|
tonloading.value = false
|
||||||
|
buttonmsg.value = '扫描项目文档'
|
||||||
|
}else{
|
||||||
|
tonloading.value = true
|
||||||
|
buttonmsg.value = '处理中...'
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
//chuan
|
||||||
|
obtainInformationAsync({id:projectId.value,type:'1'}).then((res:any)=>{
|
||||||
|
tonloading1.value
|
||||||
|
if(res.msg == '1'){
|
||||||
|
tonloading1.value = false
|
||||||
|
buttonmsg1.value = '上传项目包并扫描'
|
||||||
|
}else{
|
||||||
|
tonloading1.value = true
|
||||||
|
buttonmsg1.value = '处理中...'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
gettreedata()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -715,12 +765,12 @@ const fileIcon = (row: any) => {
|
|||||||
<el-tree ref="treeRef" node-key="id" :data="treedata" :highlight-current="true" :props="defaultProps"
|
<el-tree ref="treeRef" node-key="id" :data="treedata" :highlight-current="true" :props="defaultProps"
|
||||||
v-loading="treeloading" @node-click="handleNodeClick"
|
v-loading="treeloading" @node-click="handleNodeClick"
|
||||||
:class="useAppStore().size === 'default' ? 'silderLeft-large' : 'silderLeft-default'"
|
:class="useAppStore().size === 'default' ? 'silderLeft-large' : 'silderLeft-default'"
|
||||||
style="height: calc(100vh - 280px); overflow: auto;margin-top: 10px;">
|
style="height: calc(67vh); overflow: auto;margin-top: 10px;">
|
||||||
<template #default="{ data }">
|
<template #default="{ data }">
|
||||||
<span class="custom-tree-node">
|
<span class="custom-tree-node">
|
||||||
<span class="text">{{ data.nodeName }}</span>
|
<span class="text">{{ data.nodeName }}</span>
|
||||||
<span class="img_tree">
|
<span class="img_tree">
|
||||||
<img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)">
|
<!-- <img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)"> -->
|
||||||
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
||||||
<img v-if="data.nodeType == '01'" src="@/assets/project/jia.png" alt="" title="添加课题"
|
<img v-if="data.nodeType == '01'" src="@/assets/project/jia.png" alt="" title="添加课题"
|
||||||
@click="addSubItem(data)">
|
@click="addSubItem(data)">
|
||||||
@ -732,6 +782,13 @@ const fileIcon = (row: any) => {
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" :loading="tonloading" @click="scan()" style="width: 100%;margin-bottom: 5px;">{{ buttonmsg
|
||||||
|
}}</el-button>
|
||||||
|
<el-button type="primary" :loading="tonloading1" @click="upfileZip()"
|
||||||
|
style="width: 100%;margin-left: 0px;">上传项目包并扫描</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="moveBtn" v-move>
|
<div class="moveBtn" v-move>
|
||||||
<div class="moveBtn-line"></div>
|
<div class="moveBtn-line"></div>
|
||||||
@ -797,12 +854,12 @@ const fileIcon = (row: any) => {
|
|||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable
|
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable :close-on-click-modal="false"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
||||||
label-width="auto" class="demo-ruleForm" status-icon>
|
label-width="auto" class="demo-ruleForm" status-icon>
|
||||||
<el-form-item label="节点名称" prop="nodeName">
|
<el-form-item label="节点名称" prop="nodeName">
|
||||||
<el-input v-model="projectForme.nodeName" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.nodeName" maxlength="40" show-word-limit :disabled="projectForme.id" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div style="width: 100%;display: flex;justify-content: end;">
|
<div style="width: 100%;display: flex;justify-content: end;">
|
||||||
@ -812,9 +869,9 @@ const fileIcon = (row: any) => {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="title" v-model="upfile" width="50%" :before-close="fileClose" top="30px" draggable
|
<el-dialog :title="title" v-model="upfile" width="50%" :before-close="fileClose" top="30px" draggable :close-on-click-modal="false"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-scrollbar :height="!fileObj.id ? '400px' : ''">
|
<el-scrollbar :height="judge ? '400px' : ''">
|
||||||
<el-form ref="ruleFormRef" style="max-width: 100%" :model="fileObj" :rules="moderqqqules"
|
<el-form ref="ruleFormRef" style="max-width: 100%" :model="fileObj" :rules="moderqqqules"
|
||||||
label-width="auto" class="demo-ruleForm" status-icon>
|
label-width="auto" class="demo-ruleForm" status-icon>
|
||||||
<el-form-item v-if="!fileObj.id" label="文件:" prop="taskCode">
|
<el-form-item v-if="!fileObj.id" label="文件:" prop="taskCode">
|
||||||
@ -842,11 +899,11 @@ const fileIcon = (row: any) => {
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 组件预览 -->
|
<!-- 组件预览 -->
|
||||||
<!-- 视频播放器 -->
|
<!-- 视频播放器 -->
|
||||||
<el-dialog draggable class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
||||||
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 文本编辑器 -->
|
<!-- 文本编辑器 -->
|
||||||
<el-dialog draggable class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
||||||
:title="filePreview.fileName" v-model="dialogTextVisible">
|
:title="filePreview.fileName" v-model="dialogTextVisible">
|
||||||
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||||
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
||||||
@ -855,18 +912,18 @@ const fileIcon = (row: any) => {
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- pdf 在线预览 -->
|
<!-- pdf 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
||||||
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- office 在线预览 -->
|
<!-- office 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
||||||
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
||||||
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogOfficeVisible" />
|
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogOfficeVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 3d 在线预览 -->
|
<!-- 3d 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
||||||
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialog3dVisible" />
|
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialog3dVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 音频播放器 -->
|
<!-- 音频播放器 -->
|
||||||
@ -965,7 +1022,7 @@ const fileIcon = (row: any) => {
|
|||||||
|
|
||||||
.img_tree {
|
.img_tree {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 20%;
|
width: 13%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ const queryParams: any = ref({
|
|||||||
size: 20,
|
size: 20,
|
||||||
projectType: '',
|
projectType: '',
|
||||||
projectName: '',
|
projectName: '',
|
||||||
projectCode: ''
|
description: ''
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
// 表格加载
|
// 表格加载
|
||||||
@ -194,15 +194,16 @@ function typeName(arr:any,itemCode:any){
|
|||||||
<div class="record-box">
|
<div class="record-box">
|
||||||
<div class="sou_title">
|
<div class="sou_title">
|
||||||
<div class="sou_title_left">
|
<div class="sou_title_left">
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.projectCode" clearable
|
<el-input style="margin-right: 10px ;" v-model="queryParams.projectName" clearable
|
||||||
@change="getdata()" placeholder="项目编号"></el-input>
|
@change="getdata()" placeholder="项目名称"></el-input>
|
||||||
<el-select v-model="queryParams.projectType" placeholder="项目类型" style="margin-right: 10px ;" clearable @change="getdata()" >
|
<el-select v-model="queryParams.projectType" placeholder="项目类型" style="margin-right: 10px ;" clearable @change="getdata()" >
|
||||||
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname" :value="item.itemcode" />
|
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname" :value="item.itemcode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-input style="margin-right: 10px ;" v-model="queryParams.description" clearable
|
||||||
|
@change="getdata()" placeholder="项目描述"></el-input>
|
||||||
<!-- <el-input style="margin-right: 10px ;" v-model="queryParams.projectType" clearable
|
<!-- <el-input style="margin-right: 10px ;" v-model="queryParams.projectType" clearable
|
||||||
@change="getdata()" placeholder="项目类型"></el-input> -->
|
@change="getdata()" placeholder="项目类型"></el-input> -->
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.projectName" clearable
|
|
||||||
@change="getdata()" placeholder="项目名称"></el-input>
|
|
||||||
<el-button type="primary" @click="getdata()">搜索</el-button>
|
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -224,7 +225,7 @@ function typeName(arr:any,itemCode:any){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="description" label="项目描述"></el-table-column>
|
<el-table-column prop="description" label="项目描述"></el-table-column>
|
||||||
<el-table-column prop="projectProps" label="项目信息"></el-table-column>
|
<!-- <el-table-column prop="projectProps" label="项目信息"></el-table-column> -->
|
||||||
<el-table-column prop="projectTime" label="项目启动时间" width="165" align="center"></el-table-column>
|
<el-table-column prop="projectTime" label="项目启动时间" width="165" align="center"></el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="80" align="center">
|
<el-table-column fixed="right" label="操作" width="80" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -242,29 +243,26 @@ function typeName(arr:any,itemCode:any){
|
|||||||
@pagination="getdata()">
|
@pagination="getdata()">
|
||||||
</Page>
|
</Page>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable
|
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable :close-on-click-modal="false"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
||||||
label-width="auto" class="demo-ruleForm" status-icon>
|
label-width="auto" class="demo-ruleForm" status-icon>
|
||||||
<el-form-item label=" 项目编号" prop="projectCode">
|
<el-form-item label=" 项目编号" >
|
||||||
<el-input v-model="projectForme.projectCode" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.projectCode" maxlength="40" show-word-limit disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label=" 项目名称" prop="projectName">
|
||||||
|
<el-input v-model="projectForme.projectName" maxlength="40" show-word-limit :disabled="projectForme.id" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 项目类型" prop="projectType">
|
<el-form-item label=" 项目类型" prop="projectType">
|
||||||
<el-select v-model="projectForme.projectType" clearable placeholder=" " style="margin-right: 10px ;" @change="getdata()" >
|
<el-select v-model="projectForme.projectType" clearable placeholder=" " @change="getdata()" >
|
||||||
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname" :value="item.itemcode" />
|
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname" :value="item.itemcode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-input v-model="projectForme.projectType" /> -->
|
<!-- <el-input v-model="projectForme.projectType" /> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 项目名称" prop="projectName">
|
|
||||||
<el-input v-model="projectForme.projectName" maxlength="40" show-word-limit />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label=" 项目描述">
|
<el-form-item label=" 项目描述">
|
||||||
<el-input v-model="projectForme.description" :rows="2" type="textarea" maxlength="400" show-word-limit />
|
<el-input v-model="projectForme.description" :rows="2" type="textarea" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 项目信息">
|
<el-form-item label=" 项目启动时间">
|
||||||
<el-input v-model="projectForme.projectProps" :rows="2" type="textarea" maxlength="400" show-word-limit />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label=" 项目启动时间" prop="projectTime">
|
|
||||||
<el-date-picker v-model="projectForme.projectTime" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
<el-date-picker v-model="projectForme.projectTime" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
||||||
style="width:100%;" value-format="YYYY-MM-DD HH:mm:ss" />
|
style="width:100%;" value-format="YYYY-MM-DD HH:mm:ss" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
135
web/src/views/testdata/datamanagement/index.vue
vendored
135
web/src/views/testdata/datamanagement/index.vue
vendored
@ -13,7 +13,7 @@ import { ElMessageBox, ElMessage, ElMain } from "element-plus";
|
|||||||
import Page from '@/components/Pagination/page.vue';
|
import Page from '@/components/Pagination/page.vue';
|
||||||
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
||||||
import { batchDeleteReq } from "@/api/file-operator";
|
import { batchDeleteReq } from "@/api/file-operator";
|
||||||
import { tstaskList, getTsNodesTree, addTsNodes, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement";
|
import { tstaskList, obtaintestData,getTsNodesTree, addTsNodes, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles,testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement";
|
||||||
import ZUpload from '@/components/file/ZUpload.vue'
|
import ZUpload from '@/components/file/ZUpload.vue'
|
||||||
import useFileUpload from "@/components/file/file/useFileUpload";
|
import useFileUpload from "@/components/file/file/useFileUpload";
|
||||||
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
||||||
@ -75,12 +75,36 @@ const vMove = {
|
|||||||
//左侧树的选择框
|
//左侧树的选择框
|
||||||
const projectId = ref()
|
const projectId = ref()
|
||||||
const projectArr = ref([])
|
const projectArr = ref([])
|
||||||
|
const taskName = ref('')
|
||||||
//获取所有项目
|
//获取所有项目
|
||||||
function getProject() {
|
function getProject() {
|
||||||
tstaskList().then((res: any) => {
|
tstaskList().then((res: any) => {
|
||||||
projectArr.value = res.data
|
projectArr.value = res.data
|
||||||
projectId.value = projectArr.value[0].id
|
projectId.value = projectArr.value[0].id
|
||||||
|
taskName.value = projectArr.value[0].taskName
|
||||||
gettreedata()
|
gettreedata()
|
||||||
|
tonstatus()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//扫描
|
||||||
|
function scan() {
|
||||||
|
testDataScanById({id:projectId.value}).then((res:any)=>{
|
||||||
|
tonstatus()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const tonloading = ref(false)
|
||||||
|
const buttonmsg = ref('扫描实验数据')
|
||||||
|
function tonstatus(){
|
||||||
|
//sao
|
||||||
|
obtaintestData({id:projectId.value}).then((res:any)=>{
|
||||||
|
if(res.msg == '1'){
|
||||||
|
tonloading.value = false
|
||||||
|
buttonmsg.value = '扫描实验数据'
|
||||||
|
}else{
|
||||||
|
tonloading.value = true
|
||||||
|
buttonmsg.value = '处理中...'
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//左侧树配置
|
//左侧树配置
|
||||||
@ -96,6 +120,7 @@ const treeForm = ref({
|
|||||||
})
|
})
|
||||||
//获取树数据
|
//获取树数据
|
||||||
const treeRef = ref();
|
const treeRef = ref();
|
||||||
|
const filepath = ref('')
|
||||||
function gettreedata() {
|
function gettreedata() {
|
||||||
treeloading.value = true
|
treeloading.value = true
|
||||||
treeForm.value.taskId = projectId.value
|
treeForm.value.taskId = projectId.value
|
||||||
@ -104,6 +129,7 @@ function gettreedata() {
|
|||||||
treeloading.value = false
|
treeloading.value = false
|
||||||
if (treedata.value[0]) {
|
if (treedata.value[0]) {
|
||||||
pathid.value = treedata.value[0].nodeId
|
pathid.value = treedata.value[0].nodeId
|
||||||
|
filepath.value = res.data[0].path + res.data[0].nodeName +'/'
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value?.setCurrentKey(pathid.value);
|
treeRef.value?.setCurrentKey(pathid.value);
|
||||||
});
|
});
|
||||||
@ -117,6 +143,7 @@ function gettreedata() {
|
|||||||
const pathid = ref()
|
const pathid = ref()
|
||||||
function handleNodeClick(data: any, node: any) {
|
function handleNodeClick(data: any, node: any) {
|
||||||
pathid.value = data.nodeId
|
pathid.value = data.nodeId
|
||||||
|
filepath.value = data.path + data.nodeName +'/'
|
||||||
creatform.value.parentId = ''
|
creatform.value.parentId = ''
|
||||||
patharr.value.length = 0
|
patharr.value.length = 0
|
||||||
getdata()
|
getdata()
|
||||||
@ -148,6 +175,12 @@ function addSubItem(row: any) {
|
|||||||
}
|
}
|
||||||
projectForme.value.taskId = projectId.value
|
projectForme.value.taskId = projectId.value
|
||||||
projectForme.value.parentId = row.nodeId
|
projectForme.value.parentId = row.nodeId
|
||||||
|
if(row.nodeId == '00'){
|
||||||
|
projectForme.value.path = '/'+taskName.value+'/'
|
||||||
|
}else{
|
||||||
|
projectForme.value.path = filepath.value
|
||||||
|
}
|
||||||
|
|
||||||
title.value = "添加子节点"
|
title.value = "添加子节点"
|
||||||
}
|
}
|
||||||
//修改子项目
|
//修改子项目
|
||||||
@ -210,7 +243,7 @@ function delSubItem(row: any) {
|
|||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
deleteTsNodesById({ id: row.nodeId }).then((res: any) => {
|
deleteTsNodesById({ id: row.nodeId,path:row.path }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
gettreedata()
|
gettreedata()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@ -278,7 +311,7 @@ const fileObj: any = ref({
|
|||||||
const upfile = ref(false)
|
const upfile = ref(false)
|
||||||
function openFile() {
|
function openFile() {
|
||||||
title.value = "上传文件"
|
title.value = "上传文件"
|
||||||
localStorage.setItem('filepath', creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/');
|
localStorage.setItem('filepath', creatform.value.workPath ? creatform.value.workPath : filepath.value);
|
||||||
localStorage.setItem('storageKey', JSON.stringify(['local']));
|
localStorage.setItem('storageKey', JSON.stringify(['local']));
|
||||||
upfile.value = true
|
upfile.value = true
|
||||||
fileObj.value = {
|
fileObj.value = {
|
||||||
@ -321,7 +354,7 @@ function delfileOne(row: any) {
|
|||||||
{
|
{
|
||||||
name: row.name,
|
name: row.name,
|
||||||
password: "",
|
password: "",
|
||||||
path: creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/',
|
path: creatform.value.workPath ? creatform.value.workPath : filepath.value,
|
||||||
type: "FILE"
|
type: "FILE"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -336,10 +369,7 @@ function bytesToMB(bytes: any) {
|
|||||||
}
|
}
|
||||||
//上传确定
|
//上传确定
|
||||||
function submitfile() {
|
function submitfile() {
|
||||||
// console.log( )
|
|
||||||
|
|
||||||
if (fileObj.value.id) {
|
if (fileObj.value.id) {
|
||||||
fileObj.value.workPath = '/' + pathid.value + fileObj.value.workPath
|
|
||||||
updateTsFiles(fileObj.value).then((res: any) => {
|
updateTsFiles(fileObj.value).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
closeDialog()
|
closeDialog()
|
||||||
@ -370,7 +400,7 @@ function submitfile() {
|
|||||||
}
|
}
|
||||||
fileObj.value.taskId = projectId.value
|
fileObj.value.taskId = projectId.value
|
||||||
fileObj.value.nodeId = pathid.value
|
fileObj.value.nodeId = pathid.value
|
||||||
fileObj.value.workPath = creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/'
|
fileObj.value.workPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
fileObj.value.fileName = fileName.join(',')
|
fileObj.value.fileName = fileName.join(',')
|
||||||
fileObj.value.fileSize = fileSize.join(',')
|
fileObj.value.fileSize = fileSize.join(',')
|
||||||
fileObj.value.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
fileObj.value.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
@ -488,6 +518,10 @@ function xiafilemony() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
if( tableIdarr.value.some(item => item.type === 'FOLDER')){
|
||||||
|
ElMessage.warning('请勿选择文件夹')
|
||||||
|
return
|
||||||
|
}
|
||||||
tableIdarr.value.forEach((item: any) => {
|
tableIdarr.value.forEach((item: any) => {
|
||||||
if (item.url) {
|
if (item.url) {
|
||||||
downloadFileUseIframeMode(item.url);
|
downloadFileUseIframeMode(item.url);
|
||||||
@ -667,7 +701,7 @@ function getFileSuffix(name: any) {
|
|||||||
function openNode(row: any) {
|
function openNode(row: any) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
creatform.value.parentId = row.id
|
creatform.value.parentId = row.id
|
||||||
creatform.value.workPath = '/' + pathid.value + row.workPath + row.fileName + '/'
|
creatform.value.workPath = row.workPath + row.fileName + '/'
|
||||||
patharr.value.push({ fileName: row.fileName, id: row.id })
|
patharr.value.push({ fileName: row.fileName, id: row.id })
|
||||||
getdata()
|
getdata()
|
||||||
}
|
}
|
||||||
@ -786,7 +820,7 @@ function paste() {
|
|||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/'
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
repeatObj.type = '0'
|
repeatObj.type = '0'
|
||||||
|
|
||||||
@ -804,7 +838,7 @@ function paste() {
|
|||||||
|
|
||||||
//直接走覆盖方法
|
//直接走覆盖方法
|
||||||
copyarr.value.forEach((items: any) => {
|
copyarr.value.forEach((items: any) => {
|
||||||
repeatObj.oldpaths = '/' + pathid.value + items.workPath
|
repeatObj.oldpaths = items.workPath
|
||||||
repeatObj.newFileName.push(items.fileName)
|
repeatObj.newFileName.push(items.fileName)
|
||||||
})
|
})
|
||||||
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
||||||
@ -835,7 +869,7 @@ function paste() {
|
|||||||
const arr2Ids = new Set(copytable.value.map(item => item.id));
|
const arr2Ids = new Set(copytable.value.map(item => item.id));
|
||||||
norepeat = copyarr.value.filter(item => !arr2Ids.has(item.id));
|
norepeat = copyarr.value.filter(item => !arr2Ids.has(item.id));
|
||||||
norepeat.forEach((items: any) => {
|
norepeat.forEach((items: any) => {
|
||||||
repeatObj.oldpaths = '/' + pathid.value + items.workPath
|
repeatObj.oldpaths = items.workPath
|
||||||
repeatObj.newFileName.push(items.fileName)
|
repeatObj.newFileName.push(items.fileName)
|
||||||
})
|
})
|
||||||
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
||||||
@ -899,10 +933,10 @@ function copycover(row: any) {
|
|||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/'
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
repeatObj.type = '0'
|
repeatObj.type = '0'
|
||||||
repeatObj.oldpaths = '/' + pathid.value + row.workPath
|
repeatObj.oldpaths = row.workPath
|
||||||
repeatObj.newFileName.push(row.fileName)
|
repeatObj.newFileName.push(row.fileName)
|
||||||
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
||||||
if (copytype.value == "move") {
|
if (copytype.value == "move") {
|
||||||
@ -974,11 +1008,11 @@ function copysomefile() {
|
|||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/'
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
repeatObj.type = '0'
|
repeatObj.type = '0'
|
||||||
copyhandArr.value.forEach((items: any) => {
|
copyhandArr.value.forEach((items: any) => {
|
||||||
repeatObj.oldpaths = '/' + pathid.value + items.workPath
|
repeatObj.oldpaths = items.workPath
|
||||||
repeatObj.newFileName.push(items.fileName)
|
repeatObj.newFileName.push(items.fileName)
|
||||||
})
|
})
|
||||||
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
||||||
@ -1038,10 +1072,10 @@ async function submitrename(formEl: any) {
|
|||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : '/' + pathid.value + '/'
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
repeatObj.type = '1'
|
repeatObj.type = '1'
|
||||||
repeatObj.oldpaths = '/' + pathid.value + rowarr.value.workPath
|
repeatObj.oldpaths = rowarr.value.workPath
|
||||||
repeatObj.rename = (renameobj.value.fileName)
|
repeatObj.rename = (renameobj.value.fileName)
|
||||||
repeatObj.newFileName.push(rowarr.value.fileName)
|
repeatObj.newFileName.push(rowarr.value.fileName)
|
||||||
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
repeatObj.newFileName = repeatObj.newFileName.join(',')
|
||||||
@ -1114,7 +1148,7 @@ async function submitcreat(formEl: any) {
|
|||||||
if (creatform.value.workPath) {
|
if (creatform.value.workPath) {
|
||||||
creatObj.value.workPath = creatform.value.workPath
|
creatObj.value.workPath = creatform.value.workPath
|
||||||
} else {
|
} else {
|
||||||
creatObj.value.workPath = '/' + pathid.value + '/'
|
creatObj.value.workPath = filepath.value
|
||||||
}
|
}
|
||||||
addTsFile(creatObj.value).then((res: any) => {
|
addTsFile(creatObj.value).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@ -1132,7 +1166,7 @@ function pathclick(row: any, index: any) {
|
|||||||
|
|
||||||
patharr.value.splice(index + 1)
|
patharr.value.splice(index + 1)
|
||||||
creatform.value.parentId = row.id
|
creatform.value.parentId = row.id
|
||||||
creatform.value.workPath = '/' + pathid.value + convertArrayToPath1(patharr.value)
|
creatform.value.workPath = convertArrayToPath1(patharr.value)
|
||||||
getdata()
|
getdata()
|
||||||
}
|
}
|
||||||
// 压缩文件
|
// 压缩文件
|
||||||
@ -1199,7 +1233,7 @@ async function submitzip(formEl: any) {
|
|||||||
zipObj.value.parentId = zipParentid.value
|
zipObj.value.parentId = zipParentid.value
|
||||||
getdata()
|
getdata()
|
||||||
zipfiles.value = false
|
zipfiles.value = false
|
||||||
zipObj.value.compressedPath = '/' + pathid.value + zipObj.value.compressedPath
|
zipObj.value.compressedPath = zipObj.value.compressedPath
|
||||||
compress(zipObj.value).then((res: any) => {
|
compress(zipObj.value).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
zipfiles.value = false
|
zipfiles.value = false
|
||||||
@ -1211,7 +1245,7 @@ async function submitzip(formEl: any) {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: '/' + pathid.value + zipObj.value.compressedPath }).then((res: any) => {
|
Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success('解压成功')
|
ElMessage.success('解压成功')
|
||||||
getdata()
|
getdata()
|
||||||
@ -1242,23 +1276,24 @@ const jiepatharr: any = ref([])
|
|||||||
function gettsfiles() {
|
function gettsfiles() {
|
||||||
filetsobj.value.nodeId = pathid.value
|
filetsobj.value.nodeId = pathid.value
|
||||||
filetsobj.value.taskId = projectId.value
|
filetsobj.value.taskId = projectId.value
|
||||||
filetsobj.value.path = '/' + pathid.value + filetsobj.value.path
|
filetsobj.value.path = filetsobj.value.path
|
||||||
listTsFiles(filetsobj.value).then((res: any) => {
|
listTsFiles(filetsobj.value).then((res: any) => {
|
||||||
listFilesarr.value = res.data
|
listFilesarr.value = res.data
|
||||||
if (res.data[0]) {
|
if (res.data[0]) {
|
||||||
jieFilearr.value = res.data[0]
|
jieFilearr.value = res.data[0]
|
||||||
jiepatharr.value = convertPathToArray(jieFilearr.value.workPath)
|
jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(jieFilearr.value.workPath)))
|
||||||
creatform.value.parentId = res.data[0].parentId
|
creatform.value.parentId = res.data[0].parentId
|
||||||
creatform.value.workPath = '/' + pathid.value + jieFilearr.value.workPath
|
creatform.value.workPath = jieFilearr.value.workPath
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function openfiles(row: any) {
|
function openfiles(row: any) {
|
||||||
|
debugger
|
||||||
filetsobj.value.path = row.workPath + row.fileName + '/'
|
filetsobj.value.path = row.workPath + row.fileName + '/'
|
||||||
jieFilearr.value.workPath = filetsobj.value.path
|
jieFilearr.value.workPath = filetsobj.value.path
|
||||||
jiepatharr.value = convertPathToArray(jieFilearr.value.workPath)
|
jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(jieFilearr.value.workPath)))
|
||||||
creatform.value.workPath = '/' + pathid.value + jieFilearr.value.workPath
|
creatform.value.workPath = jieFilearr.value.workPath
|
||||||
zipParentid.value = row.id
|
zipParentid.value = row.id
|
||||||
creatform.value.parentId = row.id
|
creatform.value.parentId = row.id
|
||||||
filetsobj.value.id = ''
|
filetsobj.value.id = ''
|
||||||
@ -1281,7 +1316,6 @@ function fileSelection(row: any) {
|
|||||||
jieFilearr.value = row[0]
|
jieFilearr.value = row[0]
|
||||||
}
|
}
|
||||||
function pathFile(index: any) {
|
function pathFile(index: any) {
|
||||||
|
|
||||||
jiepatharr.value.splice(index + 1)
|
jiepatharr.value.splice(index + 1)
|
||||||
filetsobj.value.path = convertArrayToPath(jiepatharr.value)
|
filetsobj.value.path = convertArrayToPath(jiepatharr.value)
|
||||||
gettsfiles()
|
gettsfiles()
|
||||||
@ -1326,6 +1360,7 @@ function generateRandomName() {
|
|||||||
}
|
}
|
||||||
// 路径转换方法(支持多级路径和容错处理)
|
// 路径转换方法(支持多级路径和容错处理)
|
||||||
function convertPathToArray(fullPath: string): string[] {
|
function convertPathToArray(fullPath: string): string[] {
|
||||||
|
// debugger
|
||||||
// 1. 去除首尾斜杠
|
// 1. 去除首尾斜杠
|
||||||
const trimmedPath = fullPath.replace(/^\/+|\/+$/g, '')
|
const trimmedPath = fullPath.replace(/^\/+|\/+$/g, '')
|
||||||
|
|
||||||
@ -1334,17 +1369,16 @@ function convertPathToArray(fullPath: string): string[] {
|
|||||||
}
|
}
|
||||||
// 路径转换方法(数组转路径)
|
// 路径转换方法(数组转路径)
|
||||||
function convertArrayToPath(segments: string[]): string {
|
function convertArrayToPath(segments: string[]): string {
|
||||||
|
// debugger
|
||||||
// 处理空数组返回根路径
|
// 处理空数组返回根路径
|
||||||
if (segments.length === 0) return '/'
|
if (segments.length === 0) return filepath.value
|
||||||
|
|
||||||
// 过滤空值并拼接路径
|
// 过滤空值并拼接路径
|
||||||
return '/' + segments.filter(Boolean).join('/') + '/'
|
return '/' + segments.filter(Boolean).join('/') + '/'
|
||||||
}
|
}
|
||||||
function convertArrayToPath1(segments: string[]): string {
|
function convertArrayToPath1(segments: string[]): string {
|
||||||
|
|
||||||
// 处理空数组返回根路径
|
// 处理空数组返回根路径
|
||||||
if (segments.length === 0) return '/'
|
if (segments.length === 0) return filepath.value
|
||||||
|
|
||||||
// 过滤空值并拼接路径
|
// 过滤空值并拼接路径
|
||||||
|
|
||||||
@ -1559,7 +1593,7 @@ function texexceltClose() {
|
|||||||
<span class="custom-tree-node">
|
<span class="custom-tree-node">
|
||||||
<span class="text">{{ data.nodeName }}</span>
|
<span class="text">{{ data.nodeName }}</span>
|
||||||
<span class="img_tree">
|
<span class="img_tree">
|
||||||
<img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)">
|
<!-- <img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)"> -->
|
||||||
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
||||||
<!-- <img src="@/assets/images/chayi.png" alt="" title="差异性对比" @click="opendifference(data)"> -->
|
<!-- <img src="@/assets/images/chayi.png" alt="" title="差异性对比" @click="opendifference(data)"> -->
|
||||||
<img src="@/assets/project/jia.png" alt="" title="添加子项目" @click="addSubItem(data)">
|
<img src="@/assets/project/jia.png" alt="" title="添加子项目" @click="addSubItem(data)">
|
||||||
@ -1567,6 +1601,7 @@ function texexceltClose() {
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
<el-button type="primary" @click="scan()" style="width: 100%;" :loading="tonloading" >{{ buttonmsg }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="moveBtn" v-move>
|
<div class="moveBtn" v-move>
|
||||||
<div class="moveBtn-line"></div>
|
<div class="moveBtn-line"></div>
|
||||||
@ -1646,7 +1681,7 @@ function texexceltClose() {
|
|||||||
title="修改" style="cursor: pointer;">
|
title="修改" style="cursor: pointer;">
|
||||||
<img v-if="scope.row.type == 'ZIP'" src="@/assets/images/jieyasuo.png" alt=""
|
<img v-if="scope.row.type == 'ZIP'" src="@/assets/images/jieyasuo.png" alt=""
|
||||||
@click="decompression(scope.row)" title="解压" style="cursor: pointer;">
|
@click="decompression(scope.row)" title="解压" style="cursor: pointer;">
|
||||||
<img src="@/assets/MenuIcon/xia1.png" alt="" @click="xiafile(scope.row)" title="下载"
|
<img src="@/assets/MenuIcon/xia1.png" alt="" @click="xiafile(scope.row)" v-if="scope.row.type != 'FOLDER'" title="下载"
|
||||||
style="cursor: pointer;">
|
style="cursor: pointer;">
|
||||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" @click="delfile(scope.row)" title="删除"
|
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" @click="delfile(scope.row)" title="删除"
|
||||||
style="cursor: pointer;">
|
style="cursor: pointer;">
|
||||||
@ -1659,7 +1694,7 @@ function texexceltClose() {
|
|||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable
|
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable :close-on-click-modal="false"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
||||||
label-width="auto" class="demo-ruleForm" status-icon>
|
label-width="auto" class="demo-ruleForm" status-icon>
|
||||||
@ -1674,7 +1709,7 @@ function texexceltClose() {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="title" v-model="upfile" width="50%" :before-close="fileClose" top="30px" draggable
|
<el-dialog :title="title" :close-on-click-modal="false" v-model="upfile" width="50%" :before-close="fileClose" top="30px" draggable
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-scrollbar :height="!fileObj.id ? '400px' : ''">
|
<el-scrollbar :height="!fileObj.id ? '400px' : ''">
|
||||||
<el-form ref="ruleFormRef" style="max-width: 100%" :model="fileObj" :rules="modelarules"
|
<el-form ref="ruleFormRef" style="max-width: 100%" :model="fileObj" :rules="modelarules"
|
||||||
@ -1702,7 +1737,7 @@ function texexceltClose() {
|
|||||||
<el-button @click="fileClose">取消</el-button>
|
<el-button @click="fileClose">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="创建文件/文件夹" v-model="creat" width="30%" :before-close="creatClose" top="30px" draggable
|
<el-dialog :close-on-click-modal="false" title="创建文件/文件夹" v-model="creat" width="30%" :before-close="creatClose" top="30px" draggable
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="creatFormRef" style="max-width: 100%" :model="creatObj" :rules="creatrules" label-width="auto"
|
<el-form ref="creatFormRef" style="max-width: 100%" :model="creatObj" :rules="creatrules" label-width="auto"
|
||||||
class="demo-ruleForm" status-icon>
|
class="demo-ruleForm" status-icon>
|
||||||
@ -1725,7 +1760,7 @@ function texexceltClose() {
|
|||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 复制粘贴弹框 -->
|
<!-- 复制粘贴弹框 -->
|
||||||
<el-dialog title="重命名或覆盖" v-model="copyjudge" width="60%" :before-close="copyClose" top="30px" draggable
|
<el-dialog :close-on-click-modal="false" title="重命名或覆盖" v-model="copyjudge" width="60%" :before-close="copyClose" top="30px" draggable
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<div style="display: flex;justify-content: end;"><el-button :disabled="copyhandArr.length == 0"
|
<div style="display: flex;justify-content: end;"><el-button :disabled="copyhandArr.length == 0"
|
||||||
type="primary" style="margin-bottom: 20px;" @click="copysomefile">覆盖({{ copyhandArr.length
|
type="primary" style="margin-bottom: 20px;" @click="copysomefile">覆盖({{ copyhandArr.length
|
||||||
@ -1751,7 +1786,7 @@ function texexceltClose() {
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="重命名" v-model="rename" width="30%" :before-close="RenameClose" top="30px" draggable
|
<el-dialog :close-on-click-modal="false" title="重命名" v-model="rename" width="30%" :before-close="RenameClose" top="30px" draggable
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="renameFormRef" style="max-width: 100%" :model="renameobj" :rules="renameRules"
|
<el-form ref="renameFormRef" style="max-width: 100%" :model="renameobj" :rules="renameRules"
|
||||||
label-width="auto" class="demo-ruleForm" status-icon>
|
label-width="auto" class="demo-ruleForm" status-icon>
|
||||||
@ -1766,7 +1801,7 @@ function texexceltClose() {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="title" v-model="zipfiles" width="30%" :before-close="zipClose" top="30px" draggable
|
<el-dialog :close-on-click-modal="false" :title="title" v-model="zipfiles" width="30%" :before-close="zipClose" top="30px" draggable
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="zipFormRef" style="max-width: 100%" :model="zipObj" :rules="ziprules" label-width="auto"
|
<el-form ref="zipFormRef" style="max-width: 100%" :model="zipObj" :rules="ziprules" label-width="auto"
|
||||||
class="demo-ruleForm" status-icon>
|
class="demo-ruleForm" status-icon>
|
||||||
@ -1787,7 +1822,7 @@ function texexceltClose() {
|
|||||||
<template #prepend>
|
<template #prepend>
|
||||||
<el-popover :visible="visible" placement="right" :width="400" trigger="click">
|
<el-popover :visible="visible" placement="right" :width="400" trigger="click">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-icon style="cursor: pointer;" @click="visible = !visible, pathFile(-1)">
|
<el-icon style="cursor: pointer;" @click="visible = !visible">
|
||||||
<Folder />
|
<Folder />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
@ -1840,7 +1875,7 @@ function texexceltClose() {
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 差异性对比 -->
|
<!-- 差异性对比 -->
|
||||||
<el-dialog title="差异性对比" v-model="difference" width="60%" :before-close="differenceClose" top="30px" draggable
|
<el-dialog :close-on-click-modal="false" title="差异性对比" v-model="difference" width="60%" :before-close="differenceClose" top="30px" draggable
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<div class="chabox" v-loading="diffloding">
|
<div class="chabox" v-loading="diffloding">
|
||||||
<div class="chabox_border">
|
<div class="chabox_border">
|
||||||
@ -1932,11 +1967,11 @@ function texexceltClose() {
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 组件预览 -->
|
<!-- 组件预览 -->
|
||||||
<!-- 视频播放器 -->
|
<!-- 视频播放器 -->
|
||||||
<el-dialog draggable class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
<el-dialog :close-on-click-modal="false" draggable class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
||||||
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 文本编辑器 -->
|
<!-- 文本编辑器 -->
|
||||||
<el-dialog draggable class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
<el-dialog :close-on-click-modal="false" draggable class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
||||||
:title="filePreview.fileName" v-model="dialogTextVisible">
|
:title="filePreview.fileName" v-model="dialogTextVisible">
|
||||||
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||||
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
||||||
@ -1945,31 +1980,31 @@ function texexceltClose() {
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- pdf 在线预览 -->
|
<!-- pdf 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
<el-dialog :close-on-click-modal="false" draggable class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
||||||
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- office 在线预览 -->
|
<!-- office 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
<el-dialog :close-on-click-modal="false" draggable class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
||||||
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
||||||
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogOfficeVisible" />
|
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogOfficeVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 3d 在线预览 -->
|
<!-- 3d 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
<el-dialog :close-on-click-modal="false" draggable class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
||||||
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialog3dVisible" />
|
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialog3dVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 音频播放器 -->
|
<!-- 音频播放器 -->
|
||||||
<AudioPlayer></AudioPlayer>
|
<AudioPlayer></AudioPlayer>
|
||||||
<Viewfile v-if="isViewfile" :showTime="true" :title="title1" :url="ViewfileUrl" :type="fileType"
|
<Viewfile v-if="isViewfile" :showTime="true" :title="title1" :url="ViewfileUrl" :type="fileType"
|
||||||
@update="CloseView" />
|
@update="CloseView" />
|
||||||
<el-dialog :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable width="60%"
|
<el-dialog :close-on-click-modal="false" :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable width="60%"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<textEdit :rowId="rowId" :fileUrl="fileUrl1" />
|
<textEdit :rowId="rowId" :fileUrl="fileUrl1" />
|
||||||
|
|
||||||
<!-- <txtexl :file-url="fileUrl" /> -->
|
<!-- <txtexl :file-url="fileUrl" /> -->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable width="60%"
|
<el-dialog :close-on-click-modal="false" :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable width="60%"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<txtexl :file-url="fileUrl" :rowId="rowId" />
|
<txtexl :file-url="fileUrl" :rowId="rowId" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -2065,7 +2100,7 @@ function texexceltClose() {
|
|||||||
|
|
||||||
.img_tree {
|
.img_tree {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 28%;
|
width: 13%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
|
@ -1130,7 +1130,7 @@ const tabs = ref(1)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 文件差异性对比 -->
|
<!-- 文件差异性对比 -->
|
||||||
<el-dialog title="差异批量处理" v-model="differential" width="50%" :before-close="diffClose" top="30px"
|
<el-dialog title="差异批量处理" v-model="differential" width="50%" :before-close="diffClose" top="30px" :close-on-click-modal="false"
|
||||||
draggable destroy-on-close>
|
draggable destroy-on-close>
|
||||||
<div class="tabbs_all">
|
<div class="tabbs_all">
|
||||||
<div @click="tabs = 1" :class="tabs == 1 ? 'tabbs_box1' : 'tabbs_box'">新增文件</div>
|
<div @click="tabs = 1" :class="tabs == 1 ? 'tabbs_box1' : 'tabbs_box'">新增文件</div>
|
||||||
@ -1268,11 +1268,11 @@ const tabs = ref(1)
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 组件预览 -->
|
<!-- 组件预览 -->
|
||||||
<!-- 视频播放器 -->
|
<!-- 视频播放器 -->
|
||||||
<el-dialog draggable class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
|
||||||
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 文本编辑器 -->
|
<!-- 文本编辑器 -->
|
||||||
<el-dialog draggable class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
|
||||||
:title="filePreview.fileName" v-model="dialogTextVisible">
|
:title="filePreview.fileName" v-model="dialogTextVisible">
|
||||||
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||||
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
|
||||||
@ -1281,19 +1281,19 @@ const tabs = ref(1)
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- pdf 在线预览 -->
|
<!-- pdf 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
|
||||||
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- office 在线预览 -->
|
<!-- office 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
|
||||||
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
:title="filePreview.fileName" v-model="dialogOfficeVisible">
|
||||||
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||||
v-if="dialogOfficeVisible" />
|
v-if="dialogOfficeVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 3d 在线预览 -->
|
<!-- 3d 在线预览 -->
|
||||||
<el-dialog draggable class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
<el-dialog draggable :close-on-click-modal="false" class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
|
||||||
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url"
|
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url"
|
||||||
v-if="dialog3dVisible" />
|
v-if="dialog3dVisible" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -1301,12 +1301,12 @@ const tabs = ref(1)
|
|||||||
<AudioPlayer></AudioPlayer>
|
<AudioPlayer></AudioPlayer>
|
||||||
<Viewfile v-if="isViewfile" :showTime="true" :title="title1" :url="ViewfileUrl" :type="fileType"
|
<Viewfile v-if="isViewfile" :showTime="true" :title="title1" :url="ViewfileUrl" :type="fileType"
|
||||||
@update="CloseView" />
|
@update="CloseView" />
|
||||||
<el-dialog :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable width="60%"
|
<el-dialog :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable :close-on-click-modal="false" width="60%"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<textEdit :rowId="rowId" :fileUrl="fileUrl1" />
|
<textEdit :rowId="rowId" :fileUrl="fileUrl1" />
|
||||||
<!-- </el-scrollbar> -->
|
<!-- </el-scrollbar> -->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable
|
<el-dialog :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable :close-on-click-modal="false"
|
||||||
width="60%" destroy-on-close>
|
width="60%" destroy-on-close>
|
||||||
<txtexl :file-url="fileUrl" :rowId="rowId" />
|
<txtexl :file-url="fileUrl" :rowId="rowId" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
155
web/src/views/testdata/testtask/index.vue
vendored
155
web/src/views/testdata/testtask/index.vue
vendored
@ -9,7 +9,7 @@ import { onMounted, ref } from "vue";
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Page from '@/components/Pagination/page.vue'
|
import Page from '@/components/Pagination/page.vue'
|
||||||
import { tstaskPage, addtsTask, updatetsTask, deleteTsTaskById, deleteTsTaskByIds } from "@/api/testtask";
|
import { tstaskPage, addtsTask, updatetsTask, deleteTsTaskById, deleteTsTaskByIds } from "@/api/testtask";
|
||||||
|
import { getDict } from '@/api/dict'
|
||||||
//定义表格数据
|
//定义表格数据
|
||||||
const tableData: any = ref([]);
|
const tableData: any = ref([]);
|
||||||
// 查询数据
|
// 查询数据
|
||||||
@ -42,14 +42,14 @@ const loading = ref(false)
|
|||||||
//获取表格数据
|
//获取表格数据
|
||||||
function getdata() {
|
function getdata() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
if (dataduan.value && dataduan.value.length > 0 ) {
|
if (dataduan.value && dataduan.value.length > 0) {
|
||||||
const dataArr = []
|
const dataArr = []
|
||||||
dataduan.value.forEach((item: any) => {
|
dataduan.value.forEach((item: any) => {
|
||||||
dataArr.push(zhuandata(item))
|
dataArr.push(zhuandata(item))
|
||||||
})
|
})
|
||||||
queryParams.value.startDate = dataArr[0]
|
queryParams.value.startDate = dataArr[0]
|
||||||
queryParams.value.endDate = dataArr[1]
|
queryParams.value.endDate = dataArr[1]
|
||||||
}else{
|
} else {
|
||||||
queryParams.value.startDate = ''
|
queryParams.value.startDate = ''
|
||||||
queryParams.value.endDate = ''
|
queryParams.value.endDate = ''
|
||||||
}
|
}
|
||||||
@ -79,12 +79,16 @@ function addproject() {
|
|||||||
carrierName: "",//载体名称
|
carrierName: "",//载体名称
|
||||||
deviceName: "",//设备名称
|
deviceName: "",//设备名称
|
||||||
taskCode: "",//任务编号
|
taskCode: "",//任务编号
|
||||||
deviceCode: ""//设备编号
|
deviceCode: "",//设备编号
|
||||||
|
taskType: "",
|
||||||
|
testDescribe: "",// 实验描述
|
||||||
|
sensorDescribe: "",// 传感器描述
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//修改项目弹框
|
//修改项目弹框
|
||||||
function editproject(row: any) {
|
function editproject(row: any) {
|
||||||
projectForme.value = JSON.parse(JSON.stringify(row))
|
projectForme.value = JSON.parse(JSON.stringify(row))
|
||||||
|
projectForme.value.taskDate = [projectForme.value.taskStartdate, projectForme.value.taskEnddate]
|
||||||
title.value = "修改试验任务"
|
title.value = "修改试验任务"
|
||||||
frame.value = true
|
frame.value = true
|
||||||
}
|
}
|
||||||
@ -124,7 +128,7 @@ function delprojectArr() {
|
|||||||
ids.push(item.id)
|
ids.push(item.id)
|
||||||
})
|
})
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'您确定要删除这些项目及其中的节点和文件吗?',
|
'您确定要删除这些项目及其中的节点和文件吗?',
|
||||||
'警告',
|
'警告',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@ -164,12 +168,22 @@ const projectForme: any = ref({
|
|||||||
deviceName: "",//设备名称
|
deviceName: "",//设备名称
|
||||||
taskCode: "",//任务编号
|
taskCode: "",//任务编号
|
||||||
deviceCode: ""//设备编号
|
deviceCode: ""//设备编号
|
||||||
|
, taskType: "",
|
||||||
|
testDescribe: "",// 实验描述
|
||||||
|
sensorDescribe: "",// 传感器描述
|
||||||
})
|
})
|
||||||
//表单确定
|
//表单确定
|
||||||
async function submitForm(formEl: any) {
|
async function submitForm(formEl: any) {
|
||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
await formEl.validate((valid: any, fields: any) => {
|
await formEl.validate((valid: any, fields: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if (projectForme.value.taskDate.length > 0) {
|
||||||
|
projectForme.value.taskStartdate = projectForme.value.taskDate[0]
|
||||||
|
projectForme.value.taskEnddate = projectForme.value.taskDate[1]
|
||||||
|
} else {
|
||||||
|
projectForme.value.taskStartdate = ''
|
||||||
|
projectForme.value.taskEnddate = ''
|
||||||
|
}
|
||||||
if (projectForme.value.id) {
|
if (projectForme.value.id) {
|
||||||
updatetsTask(projectForme.value).then((res: any) => {
|
updatetsTask(projectForme.value).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@ -193,13 +207,31 @@ async function submitForm(formEl: any) {
|
|||||||
}
|
}
|
||||||
//用户弹窗规则定义
|
//用户弹窗规则定义
|
||||||
const moderules = ref({
|
const moderules = ref({
|
||||||
taskName: [{ required: true, message: "请输入任务名称", trigger: "blur" }],
|
taskType: [{ required: true, message: "请选择任务类型", trigger: "change" }],
|
||||||
taskCode: [{ required: true, message: "请输入任务编号", trigger: "blur" }]
|
taskDate: [{ required: true, message: "请选择任务时间", trigger: "change" }],
|
||||||
|
taskPlace: [{ required: true, message: "请输入任务地点", trigger: "blur" }],
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getdata()
|
getdata()
|
||||||
|
getDictOne()
|
||||||
});
|
});
|
||||||
|
//获取字典项目类型
|
||||||
|
const dictType = ref([])
|
||||||
|
function getDictOne() {
|
||||||
|
getDict({ dictcode: 'taskType' }).then((res: any) => {
|
||||||
|
dictType.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//项目类型转换
|
||||||
|
function typeName(arr: any, itemCode: any) {
|
||||||
|
let nameone: any
|
||||||
|
arr.forEach((item: any) => {
|
||||||
|
if (item.itemcode == itemCode) {
|
||||||
|
nameone = item.dictname
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return nameone
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -208,18 +240,29 @@ onMounted(() => {
|
|||||||
<div class="record-box">
|
<div class="record-box">
|
||||||
<div class="sou_title">
|
<div class="sou_title">
|
||||||
<div class="sou_title_left">
|
<div class="sou_title_left">
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.taskName" clearable @change="getdata()"
|
<el-input style="margin-right: 10px ;width:80px;margin-bottom: 10px;" v-model="queryParams.taskCode" clearable @change="getdata()"
|
||||||
|
placeholder="任务编号"></el-input>
|
||||||
|
<el-input style="margin-right: 10px ;width:180px;margin-bottom: 10px;" v-model="queryParams.taskName" clearable @change="getdata()"
|
||||||
placeholder="任务名称"></el-input>
|
placeholder="任务名称"></el-input>
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.taskPlace" clearable @change="getdata()"
|
<el-select style="margin-right: 10px ;width:180px;margin-bottom: 10px;" v-model="queryParams.taskType" clearable placeholder="任务类型" @change="getdata()">
|
||||||
|
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
||||||
|
:value="item.itemcode" />
|
||||||
|
</el-select>
|
||||||
|
<el-input style="margin-right: 10px ;width:180px;margin-bottom: 10px;" v-model="queryParams.taskPlace" clearable @change="getdata()"
|
||||||
placeholder="任务地点"></el-input>
|
placeholder="任务地点"></el-input>
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.taskPerson" clearable
|
<el-input style="margin-right: 10px ;width:180px;margin-bottom: 10px;" v-model="queryParams.taskPerson" clearable
|
||||||
@change="getdata()" placeholder="任务人员"></el-input>
|
@change="getdata()" placeholder="任务人员"></el-input>
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.carrierType" clearable
|
|
||||||
@change="getdata()" placeholder="载体类型"></el-input>
|
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.deviceCode" clearable
|
|
||||||
@change="getdata()" placeholder="任务设备"></el-input>
|
|
||||||
<el-date-picker v-model="dataduan" type="daterange" range-separator="至" @change="getdata()"
|
<el-date-picker v-model="dataduan" type="daterange" range-separator="至" @change="getdata()"
|
||||||
style="width: 200%;margin-right: 10px ;" start-placeholder="开始时间" end-placeholder="结束时间" />
|
style="margin-right: 10px ;margin-bottom: 10px;" start-placeholder="开始时间" end-placeholder="结束时间" />
|
||||||
|
<el-input style="margin-right: 10px ;width:180px;" v-model="queryParams.carrierName" clearable
|
||||||
|
@change="getdata()" placeholder="载机名称"></el-input>
|
||||||
|
<el-input style="margin-right: 10px ;width:180px;" v-model="queryParams.deviceCode" clearable
|
||||||
|
@change="getdata()" placeholder="设备代号_编号"></el-input>
|
||||||
|
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.testDescribe" clearable
|
||||||
|
@change="getdata()" placeholder="试验描述"></el-input>
|
||||||
|
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.sensorDescribe" clearable
|
||||||
|
@change="getdata()" placeholder="传感器描述"></el-input>
|
||||||
|
|
||||||
<el-button type="primary" @click="getdata()">搜索</el-button>
|
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -230,17 +273,27 @@ onMounted(() => {
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
|
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
|
||||||
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
|
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
|
||||||
style="width: 100%; height: calc(100vh - 275px);margin-bottom: 20px;" border>
|
style="width: 100%; height: calc(64vh);margin-bottom: 20px;" border>
|
||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" />
|
||||||
<el-table-column prop="taskCode" label="任务编号" width="90"></el-table-column>
|
<el-table-column prop="taskCode" label="任务编号" width="90"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="任务名称" width="120"></el-table-column>
|
<el-table-column prop="taskName" label="任务名称" width="600"></el-table-column>
|
||||||
<el-table-column prop="carrierType" label="载体类型" width="90"></el-table-column>
|
<el-table-column prop="taskType" label="任务类型" width="120">
|
||||||
<el-table-column prop="carrierName" label="载体名称" width="120"></el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column prop="deviceCode" label="设备编号" width="90"></el-table-column>
|
<span>{{ typeName(dictType, scope.row.taskType) }}</span>
|
||||||
<el-table-column prop="deviceName" label="设备名称" width="120"></el-table-column>
|
</template>
|
||||||
<el-table-column prop="taskDate" label="任务开始时间" width="170" align="center"></el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="taskPlace" label="任务地点"></el-table-column>
|
<el-table-column prop="taskDate" label="任务时间" width="320" align="center">
|
||||||
<el-table-column prop="taskPerson" label="任务人员"></el-table-column>
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.taskStartdate && scope.row.taskEnddate ? scope.row.taskStartdate + '-' +
|
||||||
|
scope.row.taskEnddate : '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="taskPlace" label="任务地点" width="180"></el-table-column>
|
||||||
|
<el-table-column prop="taskPerson" label="任务人员" width="280"></el-table-column>
|
||||||
|
<el-table-column prop="carrierName" label="载机名称" width="180"></el-table-column>
|
||||||
|
<el-table-column prop="deviceCode" label="设备代号_编号" width="180"></el-table-column>
|
||||||
|
<el-table-column prop="testDescribe" label="实验描述" width="320"></el-table-column>
|
||||||
|
<el-table-column prop="sensorDescribe" label="传感器描述" width="320"></el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="80" align="center">
|
<el-table-column fixed="right" label="操作" width="80" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
@ -257,39 +310,52 @@ onMounted(() => {
|
|||||||
@pagination="getdata()">
|
@pagination="getdata()">
|
||||||
</Page>
|
</Page>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable
|
<el-dialog :title="title" v-model="frame" width="35%" :before-close="handleClose" top="30px" draggable :close-on-click-modal="false"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
<el-form ref="ruleFormRef" style="max-width:100%" :model="projectForme" :rules="moderules"
|
||||||
label-width="auto" class="demo-ruleForm" status-icon>
|
label-width="auto" class="demo-ruleForm" status-icon>
|
||||||
<el-form-item label="任务编号" prop="taskCode">
|
<el-form-item label="任务编号">
|
||||||
<el-input v-model="projectForme.taskCode" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.taskCode" maxlength="40" show-word-limit disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务名称" prop="taskName">
|
<el-form-item label="任务名称">
|
||||||
<el-input v-model="projectForme.taskName" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.taskName" show-word-limit disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务时间">
|
<el-form-item label="任务类型" prop="taskType">
|
||||||
<!-- <el-input v-model="projectForme.taskDate" /> -->
|
<el-select v-model="projectForme.taskType" clearable placeholder=" " @change="getdata()">
|
||||||
<el-date-picker v-model="projectForme.taskDate" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
||||||
style="width:100%;" value-format="YYYY-MM-DD HH:mm:ss" />
|
:value="item.itemcode" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务地点">
|
<el-form-item label="任务时间" prop="taskDate">
|
||||||
|
<el-date-picker v-model="projectForme.taskDate" type="daterange" range-separator="-"
|
||||||
|
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD" style="width:100%;"
|
||||||
|
value-format="YYYY-MM-DD" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务地点" prop="taskPlace">
|
||||||
<el-input v-model="projectForme.taskPlace" maxlength="500" show-word-limit />
|
<el-input v-model="projectForme.taskPlace" maxlength="500" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务人员">
|
<el-form-item label="任务人员">
|
||||||
<el-input v-model="projectForme.taskPerson" maxlength="500" show-word-limit/>
|
<el-input v-model="projectForme.taskPerson" maxlength="500" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载体类型">
|
|
||||||
|
<!-- <el-form-item label="载体类型">
|
||||||
<el-input v-model="projectForme.carrierType" maxlength="200" show-word-limit />
|
<el-input v-model="projectForme.carrierType" maxlength="200" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="载体名称">
|
<el-form-item label="载机名称">
|
||||||
<el-input v-model="projectForme.carrierName" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.carrierName" maxlength="40" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备编号">
|
<el-form-item label="设备代号_编号">
|
||||||
<el-input v-model="projectForme.deviceCode" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.deviceCode" maxlength="40" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备名称">
|
<el-form-item label="实验描述">
|
||||||
<el-input v-model="projectForme.deviceName" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.testDescribe" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="传感器描述">
|
||||||
|
<el-input v-model="projectForme.sensorDescribe" show-word-limit />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="设备名称">
|
||||||
|
<el-input v-model="projectForme.deviceName" maxlength="40" show-word-limit />
|
||||||
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div style="width: 100%;display: flex;justify-content: end;">
|
<div style="width: 100%;display: flex;justify-content: end;">
|
||||||
<el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
|
<el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
|
||||||
@ -323,7 +389,8 @@ onMounted(() => {
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user