style: 优化代码格式和结构
- 调整了多个组件中的缩进和换行方式 - 优化了部分长代码行的断行逻辑 - 统一了某些属性的格式 - 删除了一些不必要的空格
This commit is contained in:
@ -5,48 +5,39 @@
|
||||
<div class="box_info">
|
||||
<div class="tree_left1" id="tree_left1">
|
||||
<div class="file_upload check_select">
|
||||
<div class="box_btn" v-auth="'/zm/api/v1/system/documentData/add'">
|
||||
<file-upload
|
||||
v-model="state.paramsQuery.file"
|
||||
:limit="100"
|
||||
:uploadUrl="uploadUrl"
|
||||
:params="uploadParams"
|
||||
:on-upload-success="uploadFile"
|
||||
>
|
||||
<div class="box_btn" v-auth="'/zm/api/v1/system/documentData/add'"
|
||||
v-hasPermi="['quality:knowledgeDocument:file']">
|
||||
|
||||
<file-upload v-model="state.paramsQuery.file" :limit="100" :uploadUrl="uploadUrl" :params="uploadParams"
|
||||
:on-upload-success="uploadFile">
|
||||
<el-button type="primary" style="float: left" :disabled="!state.parentPid">
|
||||
<el-icon size="small"><Plus /></el-icon>上传文件
|
||||
<el-icon size="small">
|
||||
<Plus />
|
||||
</el-icon>上传文件
|
||||
</el-button>
|
||||
</file-upload>
|
||||
</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-auth="'/zm/api/v1/system/documentProject/dataCompressedDownload'"
|
||||
:disabled="!state.parentPid"
|
||||
@click="onExport"
|
||||
><el-icon><Download /></el-icon>下载</el-button
|
||||
>
|
||||
<el-button type="primary" @click="onBook" v-auth="'/zm/api/v1/system/documentData/dataFileQuery'"
|
||||
><el-icon><View /></el-icon>查看全项目文件</el-button
|
||||
>
|
||||
<el-button type="primary" v-auth="'/zm/api/v1/system/documentProject/dataCompressedDownload'"
|
||||
v-hasPermi="['quality:knowledgeDocument:fileList']" :disabled="!state.parentPid"
|
||||
@click="onExport"><el-icon>
|
||||
<Download />
|
||||
</el-icon>下载</el-button>
|
||||
<el-button type="primary" @click="onBook"
|
||||
v-auth="'/zm/api/v1/system/documentData/dataFileQuery'"><el-icon>
|
||||
<View />
|
||||
</el-icon>查看全项目文件</el-button>
|
||||
</div>
|
||||
<div class="file_upload check_select">
|
||||
<el-input class="input_left" v-model="filterText" size="small" placeholder="请输入文件名称" />
|
||||
</div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
highlight-current
|
||||
:default-expand-all="state.checked"
|
||||
:filter-node-method="filterFolder"
|
||||
:data="state.treeList"
|
||||
node-key="id"
|
||||
accordion
|
||||
:expand-on-click-node="false"
|
||||
@node-click="handleNodeClick"
|
||||
:current-node-key="state.selectedNodeId"
|
||||
>
|
||||
<el-tree ref="treeRef" highlight-current :default-expand-all="state.checked"
|
||||
:filter-node-method="filterFolder" :data="state.treeList" node-key="id" accordion
|
||||
:expand-on-click-node="false" @node-click="handleNodeClick" :current-node-key="state.selectedNodeId">
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<el-icon color="#f1a81a"><FolderOpened /></el-icon>
|
||||
<el-icon color="#f1a81a">
|
||||
<FolderOpened />
|
||||
</el-icon>
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</template>
|
||||
@ -59,22 +50,18 @@
|
||||
<el-row>
|
||||
<el-col :span="7" class="colBlock">
|
||||
<el-form-item label="文件名称" prop="fileName">
|
||||
<el-input
|
||||
v-model="state.paramsQuery.fileName"
|
||||
placeholder="请输入文件名称"
|
||||
clearable
|
||||
@keyup.enter.native="getdocumentDataList"
|
||||
/>
|
||||
<el-input v-model="state.paramsQuery.fileName" placeholder="请输入文件名称" clearable
|
||||
@keyup.enter.native="getdocumentDataList" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" class="m-l10">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="searchInfo"
|
||||
><el-icon><Search /></el-icon>搜索</el-button
|
||||
>
|
||||
<el-button @click="resetQuery"
|
||||
><el-icon><Refresh /></el-icon>重置</el-button
|
||||
>
|
||||
<el-button type="primary" @click="searchInfo"><el-icon>
|
||||
<Search />
|
||||
</el-icon>搜索</el-button>
|
||||
<el-button @click="resetQuery"><el-icon>
|
||||
<Refresh />
|
||||
</el-icon>重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
@ -97,44 +84,38 @@
|
||||
<el-table-column label="上传时间" align="center" prop="createTime"> </el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
v-auth="'/zm/api/v1/system/documentData/get'"
|
||||
v-if="acceptType.includes(scope.row.fileSuffix)"
|
||||
link
|
||||
@click="handleView(scope.row)"
|
||||
><el-icon><View /></el-icon>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-auth="'/zm/api/v1/system/documentData/complaintBoxAdd'"
|
||||
v-if="state.wordType.includes(scope.row.fileSuffix)"
|
||||
link
|
||||
@click="updataView(scope.row)"
|
||||
><el-icon><EditPen /></el-icon>修改文件</el-button
|
||||
>
|
||||
<el-button type="primary" v-auth="'/zm/api/v1/system/documentData/uniFolderDownload'" link @click="onExportView(scope.row)"
|
||||
><el-icon><Download /></el-icon>下载</el-button
|
||||
>
|
||||
<el-button type="success" v-auth="'/zm/api/v1/system/documentData/edit'" link @click="updateName(scope.row)"
|
||||
><el-icon><EditPen /></el-icon>修改名称</el-button
|
||||
>
|
||||
<el-button type="danger" v-auth="'/zm/api/v1/system/documentData/delete'" link @click="handleDelete(scope.row)"
|
||||
><el-icon><DeleteFilled /></el-icon>删除</el-button
|
||||
>
|
||||
<el-button type="primary" v-auth="'/zm/api/v1/system/documentData/get'"
|
||||
v-if="acceptType.includes(scope.row.fileSuffix)" link @click="handleView(scope.row)"><el-icon>
|
||||
<View />
|
||||
</el-icon>查看</el-button>
|
||||
<el-button type="primary" v-auth="'/zm/api/v1/system/documentData/complaintBoxAdd'"
|
||||
v-hasPermi="['quality:knowledgeDocument:file']" v-if="state.wordType.includes(scope.row.fileSuffix)"
|
||||
link @click="updataView(scope.row)"><el-icon>
|
||||
<EditPen />
|
||||
</el-icon>修改文件</el-button>
|
||||
<el-button type="primary" v-auth="'/zm/api/v1/system/documentData/uniFolderDownload'" link
|
||||
v-hasPermi="['quality:knowledgeDocument:file']" @click="onExportView(scope.row)"><el-icon>
|
||||
<Download />
|
||||
</el-icon>下载</el-button>
|
||||
<el-button type="success" v-auth="'/zm/api/v1/system/documentData/edit'" link
|
||||
@click="updateName(scope.row)" v-hasPermi="['quality:knowledgeDocument:file']"><el-icon>
|
||||
<EditPen />
|
||||
</el-icon>修改名称</el-button>
|
||||
<el-button type="danger" v-auth="'/zm/api/v1/system/documentData/delete'" link
|
||||
@click="handleDelete(scope.row)"><el-icon>
|
||||
<DeleteFilled />
|
||||
</el-icon>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
:total="state.total"
|
||||
v-model:page="state.paramsQuery.pageNum"
|
||||
v-model:limit="state.paramsQuery.pageSize"
|
||||
@pagination="getdocumentDataList"
|
||||
/>
|
||||
<pagination :total="state.total" v-model:page="state.paramsQuery.pageNum"
|
||||
v-model:limit="state.paramsQuery.pageSize" @pagination="getdocumentDataList" />
|
||||
</div>
|
||||
</div>
|
||||
<documentsDeailsVue ref="documentDetailRef" v-if="state.showDocumentDetail" @onClose="onClose"></documentsDeailsVue>
|
||||
<documentsEdit ref="documentDataEditRef" v-if="state.showdocumentDataEdit" @onClose="onCloseEdit"></documentsEdit>
|
||||
<documentsDeailsVue ref="documentDetailRef" v-if="state.showDocumentDetail" @onClose="onClose">
|
||||
</documentsDeailsVue>
|
||||
<documentsEdit ref="documentDataEditRef" v-if="state.showdocumentDataEdit" @onClose="onCloseEdit">
|
||||
</documentsEdit>
|
||||
<!-- <uploadFileder
|
||||
ref="uploadFilederRef"
|
||||
v-if="state.showUploadFileder"
|
||||
@ -154,15 +135,8 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-image-viewer
|
||||
ref="imageRef"
|
||||
style="width: 100%; height: 100%"
|
||||
:url-list="[imgUrl]"
|
||||
v-if="imgUrl"
|
||||
show-progress
|
||||
fit="cover"
|
||||
@close="imgUrl = ''"
|
||||
/>
|
||||
<el-image-viewer ref="imageRef" style="width: 100%; height: 100%" :url-list="[imgUrl]" v-if="imgUrl" show-progress
|
||||
fit="cover" @close="imgUrl = ''" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="回收站" name="second">
|
||||
<RecyclingStation ref="recylingRef"></RecyclingStation>
|
||||
@ -472,7 +446,7 @@ const delFile = (msg, data, cb) => {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
};
|
||||
const editName = (data, title, type) => {
|
||||
ElMessageBox.prompt(title, '温馨提示', {
|
||||
@ -502,7 +476,7 @@ const editName = (data, title, type) => {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
};
|
||||
const onExport = () => {
|
||||
getUniFolderDownloadList(state.paramsQuery.folderId).then((res: any) => {
|
||||
@ -535,30 +509,37 @@ onMounted(() => {
|
||||
<style lang="scss" scoped>
|
||||
.profile_engin {
|
||||
height: 80vh;
|
||||
|
||||
.set-tool {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover,
|
||||
.el-tree-node__content:active {
|
||||
.set-tool {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.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-color: #354e67 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.box_info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
padding: 10px 0 !important;
|
||||
}
|
||||
> div {
|
||||
|
||||
>div {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tree_left1 {
|
||||
width: 30%;
|
||||
background-color: #fff;
|
||||
@ -569,6 +550,7 @@ onMounted(() => {
|
||||
min-width: 26%;
|
||||
border-right: 6px solid;
|
||||
border-right-color: rgba(204, 230, 255, 0);
|
||||
|
||||
.resize-handle-right {
|
||||
top: 0;
|
||||
width: 6px;
|
||||
@ -578,6 +560,7 @@ onMounted(() => {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.check_select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -585,43 +568,52 @@ onMounted(() => {
|
||||
// justify-content: space-between;
|
||||
padding: 4px;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
|
||||
.box_btn {
|
||||
margin: 0 10px 0 20px;
|
||||
position: relative;
|
||||
> span {
|
||||
|
||||
>span {
|
||||
padding: 4px 10px;
|
||||
background: #67c23a;
|
||||
color: #fff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: absolute;
|
||||
left: 20%;
|
||||
display: none;
|
||||
top: -2px;
|
||||
width: 220px;
|
||||
|
||||
.el-button {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box_btn:hover,
|
||||
.box_btn:active {
|
||||
cursor: pointer;
|
||||
|
||||
.btn {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.file_upload {
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.input_left {
|
||||
padding: 6px;
|
||||
box-sizing: border-box;
|
||||
// border-bottom: 1px solid #cbcbcb;
|
||||
}
|
||||
}
|
||||
|
||||
.list_right {
|
||||
width: 69.5%;
|
||||
background: white;
|
||||
@ -629,11 +621,13 @@ onMounted(() => {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.el-tree {
|
||||
height: calc(80vh - 160px);
|
||||
width: 100%;
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
// .el-tree-node__children {
|
||||
// overflow: visible !important;
|
||||
// }
|
||||
|
Reference in New Issue
Block a user