Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zys-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
zys-ui
Commits
41138649
提交
41138649
authored
8月 21, 2023
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
联调新建文件接口;新建共享管理
上级
4048fa85
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
488 行增加
和
342 行删除
+488
-342
bookMark.js
src/api/doc/bookMark.js
+1
-1
BreadCrumb.vue
src/components/common/BreadCrumb.vue
+27
-28
FileTable.vue
src/components/common/FileTable.vue
+2
-2
FileList.vue
src/components/file/FileList.vue
+0
-1
Box.vue
src/components/file/box/contextMenu/Box.vue
+1
-1
Box.vue
src/components/file/box/uploadFile/Box.vue
+8
-4
BoxMask.vue
src/components/file/box/videoPreview/BoxMask.vue
+2
-2
VideoPlayer.vue
src/components/file/box/videoPreview/VideoPlayer.vue
+3
-3
FileGrid.vue
src/components/file/components/FileGrid.vue
+8
-0
OperationMenu.vue
src/components/file/components/OperationMenu.vue
+9
-12
SelectColumn.vue
src/components/file/components/SelectColumn.vue
+1
-1
Dialog.vue
src/components/file/dialog/copyFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/moveFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/saveShareFile/Dialog.vue
+1
-1
Dialog.vue
src/components/file/dialog/unzipFile/Dialog.vue
+1
-1
file.js
src/libs/qiwen/globalFunction/file.js
+5
-2
index.vue
src/views/home/index.vue
+22
-70
constant.js
src/views/manage/shareManage/constant.js
+14
-0
index.vue
src/views/manage/shareManage/index.vue
+209
-4
noteByFile.vue
src/views/mine/myNote/components/noteByFile.vue
+24
-13
index.vue
src/views/mine/myShare/index.vue
+16
-140
index.vue
src/views/system/dict/index.vue
+132
-54
没有找到文件。
src/api/doc/bookMark.js
浏览文件 @
41138649
...
...
@@ -5,7 +5,7 @@
import
request
from
'@/utils/request'
const
baseUrl
=
'/v1/api'
export
const
getBookList
=
params
=>
{
export
const
getBook
Mark
List
=
params
=>
{
return
request
({
url
:
baseUrl
+
'/doc/bookmark/mine'
,
method
:
'get'
,
...
...
src/components/common/BreadCrumb.vue
浏览文件 @
41138649
...
...
@@ -73,9 +73,7 @@ export default {
},
watch
:
{
$route
(
value
)
{
// console.log(123, value);
const
{
filePath
}
=
value
.
query
;
// debugger;
let
filePathList
=
filePath
?
filePath
.
split
(
"/"
)
:
[];
let
res
=
[];
// 返回结果数组
let
_path
=
[];
// 存放祖先路径
...
...
@@ -103,7 +101,6 @@ export default {
// });
}
}
console
.
log
(
"res"
,
res
);
this
.
breadCrumbList
=
res
;
},
},
...
...
@@ -153,13 +150,11 @@ export default {
* 点击面包屑导航栏空白处
*/
handleClickBreadCrumbSelf
()
{
if
(
this
.
fileType
===
0
)
{
this
.
inputFilePath
=
this
.
filePath
;
this
.
isShowInput
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
filePathInputRef
.
focus
();
});
}
this
.
inputFilePath
=
this
.
filePath
;
this
.
isShowInput
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
filePathInputRef
.
focus
();
});
},
/**
* 路径输入框失去焦点或用户按下回车时触发
...
...
@@ -177,24 +172,28 @@ export default {
},
// 获取文件参数
getRouteQuery
(
item
)
{
let
routeName
=
this
.
$route
.
name
;
if
(
routeName
===
"Share"
)
{
// 当前是查看他人分享列表的页面
return
{
query
:
{
filePath
:
item
.
path
}
};
}
else
if
(
this
.
fileType
===
8
)
{
// 当前是我的已分享列表页面
return
{
query
:
{
fileType
:
8
,
filePath
:
item
.
path
,
shareBatchNum
:
item
.
path
===
"/"
?
undefined
:
this
.
$route
.
query
.
shareBatchNum
,
// 当查看的是根目录,批次号置空
},
};
}
else
{
// 网盘页面
return
{
query
:
{
filePath
:
item
.
path
,
fileType
:
0
}
};
}
// debugger;
// let routeName = this.$route.name;
// if (routeName === "Share") {
// // 当前是查看他人分享列表的页面
// return { query: { filePath: item.path } };
// } else if (this.fileType === 8) {
// // 当前是我的已分享列表页面
// return {
// query: {
// fileType: 8,
// filePath: item.path,
// shareBatchNum:
// item.path === "/" ? undefined : this.$route.query.shareBatchNum, // 当查看的是根目录,批次号置空
// },
// };
// } else {
// // 网盘页面
// return { query: { filePath: item.path, fileType: item.fileType } };
// }
return
{
query
:
{
filePath
:
item
.
path
,
fileType
:
this
.
$route
.
query
.
fileType
},
};
},
},
};
...
...
src/components/common/FileTable.vue
浏览文件 @
41138649
...
...
@@ -459,7 +459,7 @@ export default {
font-size
:
16px
;
&
:hover
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
@@ -510,7 +510,7 @@ export default {
cursor
:
pointer
;
&
:hover
{
background
:
$PrimaryHover
;
color
:
$
Primary
;
color
:
$
theme-blue
;
}
i
{
margin-right
:
8px
;
...
...
src/components/file/FileList.vue
浏览文件 @
41138649
...
...
@@ -145,7 +145,6 @@ export default {
},
// 监听搜索文件
searchFileName
()
{
console
.
log
(
"searchFileName"
);
this
.
setPageCount
();
this
.
getTableDataByType
();
},
...
...
src/components/file/box/contextMenu/Box.vue
浏览文件 @
41138649
...
...
@@ -618,7 +618,7 @@ export default {
cursor
:
pointer
;
&
:hover
{
background
:
$PrimaryHover
;
color
:
$
Primary
;
color
:
$
theme-blue
;
}
i
{
margin-right
:
8px
;
...
...
src/components/file/box/uploadFile/Box.vue
浏览文件 @
41138649
...
...
@@ -185,6 +185,10 @@ export default {
return
store
.
getters
.
remainderStorageValue
;
},
},
// created() {
// // debugger;
// console.log(123);
// },
methods
:
{
// 隐藏拖拽上传遮罩
hideUploadMask
(
e
)
{
...
...
@@ -200,15 +204,15 @@ export default {
this
.
$qwConfig
.
tokenKeyName
);
switch
(
this
.
uploadWay
)
{
case
1
:
{
case
0
:
{
this
.
$refs
.
uploadBtn
.
$el
.
click
();
break
;
}
case
2
:
{
case
1
:
{
this
.
$refs
.
uploadDirBtn
.
$el
.
click
();
break
;
}
case
3
:
{
case
2
:
{
this
.
pasteImg
.
src
=
""
;
this
.
pasteImg
.
name
=
""
;
this
.
pasteImgObj
=
null
;
...
...
@@ -456,7 +460,7 @@ export default {
cursor
:
pointer
;
&
:hover
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
...
...
src/components/file/box/videoPreview/BoxMask.vue
浏览文件 @
41138649
...
...
@@ -217,7 +217,7 @@ export default {
justify-content
:
space-between
;
&
:hover
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
.name
{
...
...
@@ -235,7 +235,7 @@ export default {
.video-item.active
{
background
:
#000
;
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
src/components/file/box/videoPreview/VideoPlayer.vue
浏览文件 @
41138649
...
...
@@ -73,12 +73,12 @@ export default {
width
:
100%
;
height
:
100%
;
padding
:
0
;
color
:
$
Primary
;
color
:
$
theme-blue
;
// 播放按钮
::v-deep
.vjs-big-play-button
{
border-radius
:
50%
;
border
:
6px
solid
$
Primary
;
border
:
6px
solid
$
theme-blue
;
left
:
calc
(
50%
-
1em
);
top
:
calc
(
50%
-
1em
);
width
:
2
.5em
;
...
...
@@ -97,7 +97,7 @@ export default {
::v-deep
.vjs-volume-level
,
::v-deep
.vjs-play-progress
,
::v-deep
.vjs-slider-bar
{
background
:
$
Primary
;
background
:
$
theme-blue
;
}
// 控制条按钮的大小
...
...
src/components/file/components/FileGrid.vue
浏览文件 @
41138649
...
...
@@ -103,6 +103,7 @@ export default {
watch
:
{
// 文件平铺模式 排序-文件夹在前
fileList
(
newValue
)
{
console
.
log
(
"fileList-newValue"
,
newValue
);
this
.
fileListSorted
=
[...
newValue
]
.
sort
((
pre
,
next
)
=>
{
return
next
.
isDir
-
pre
.
isDir
;
...
...
@@ -119,6 +120,13 @@ export default {
this
.
$store
.
commit
(
"changeSelectedFiles"
,
newValue
);
this
.
$store
.
commit
(
"changeIsBatchOperation"
,
newValue
.
length
!==
0
);
},
fileListSorted
:
{
handler
(
value
)
{
console
.
log
(
"监听fileListSorted"
,
value
);
},
deep
:
true
,
immediate
:
true
,
},
},
methods
:
{
/**
...
...
src/components/file/components/OperationMenu.vue
浏览文件 @
41138649
...
...
@@ -20,14 +20,14 @@
>
上传
<i
class=
"el-icon-arrow-down el-icon--right"
></i
></el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(
1
)"
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(
0
)"
>
上传文件
</el-dropdown-item
>
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(
2
)"
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(
1
)"
>
上传文件夹
</el-dropdown-item
>
<el-dropdown-item
@
click
.
native=
"handleUploadFileBtnClick(
3
)"
@
click
.
native=
"handleUploadFileBtnClick(
2
)"
title=
"截图粘贴或拖拽上传"
:disabled=
"screenWidth
<
=
520
"
>
拖拽上传
</el-dropdown-item
...
...
@@ -488,11 +488,7 @@ export default {
* @param {string} value 搜索内容
*/
handleSearchInputChange
(
value
)
{
if
(
value
===
""
)
{
this
.
$emit
(
"getTableDataByType"
);
}
else
{
this
.
$emit
(
"getSearchFileList"
,
value
);
}
this
.
$emit
(
"getSearchFileList"
,
value
);
},
/**
* 网格模式下,批量操作状态切换
...
...
@@ -505,6 +501,7 @@ export default {
* @param {number} label 0 列表 1 网格 2 时间线
*/
handleFileDisplayModelChange
(
label
)
{
// debugger;
this
.
fileGroupLable
=
label
;
// 关闭右键菜单事件
this
.
$openBox
.
contextMenu
.
close
();
...
...
@@ -571,7 +568,7 @@ export default {
font-size
:
16px
;
&
:hover
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
@@ -585,7 +582,7 @@ export default {
}
.model-icon.active
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
.refresh-icon
,
...
...
@@ -597,12 +594,12 @@ export default {
color
:
$SecondaryText
;
&
:hover
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
.batch-icon.active
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
...
...
src/components/file/components/SelectColumn.vue
浏览文件 @
41138649
...
...
@@ -86,7 +86,7 @@ export default {
padding-top
:
8px
;
cursor
:
pointer
;
&
:hover
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
src/components/file/dialog/copyFile/Dialog.vue
浏览文件 @
41138649
...
...
@@ -237,7 +237,7 @@ export default {
}
.el-tree-node.is-current
>
.el-tree-node__content
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
src/components/file/dialog/moveFile/Dialog.vue
浏览文件 @
41138649
...
...
@@ -267,7 +267,7 @@ export default {
}
.el-tree-node.is-current
>
.el-tree-node__content
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
src/components/file/dialog/saveShareFile/Dialog.vue
浏览文件 @
41138649
...
...
@@ -210,7 +210,7 @@ export default {
}
.el-tree-node.is-current
>
.el-tree-node__content
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
src/components/file/dialog/unzipFile/Dialog.vue
浏览文件 @
41138649
...
...
@@ -228,7 +228,7 @@ export default {
}
.el-tree-node.is-current
>
.el-tree-node__content
{
color
:
$
Primary
;
color
:
$
theme-blue
;
}
}
}
...
...
src/libs/qiwen/globalFunction/file.js
浏览文件 @
41138649
...
...
@@ -20,6 +20,9 @@ const fileFunction = {
* @returns {string} 文件大小(带单位)
*/
calculateFileSize
(
size
,
isInteger
=
false
)
{
if
(
size
==
null
)
return
0
+
'KB'
const
B
=
1024
const
KB
=
Math
.
pow
(
1024
,
2
)
const
MB
=
Math
.
pow
(
1024
,
3
)
...
...
@@ -344,9 +347,9 @@ const fileFunction = {
flag
=
true
}
console
.
log
(
123
,
row
);
const
{
fileId
,
identifier
}
=
row
const
{
fileId
}
=
row
const
params
=
{
fileId
:
identifier
,
fileId
:
fileId
,
flag
}
getViewUrlDbPath
(
params
).
then
(
res
=>
{
...
...
src/views/home/index.vue
浏览文件 @
41138649
...
...
@@ -13,7 +13,7 @@
<svg-icon
icon-class=
"add-border"
></svg-icon>
<div
class=
"right"
>
<div
class=
"text"
>
新建文档
</div>
<div
class=
"subtitle"
>
从空文本起草
</div>
<div
class=
"subtitle"
>
从空文本
或模板
起草
</div>
</div>
</div>
</el-card>
...
...
@@ -22,7 +22,7 @@
<el-card
shadow=
"never"
class=
"cursor-pointer"
@
click
.
native=
"handleUploadFile
(0)
"
@
click
.
native=
"handleUploadFile"
>
<div
class=
"content"
>
<svg-icon
icon-class=
"word-border"
></svg-icon>
...
...
@@ -144,83 +144,32 @@ export default {
let
res
=
await
getNearCreation
(
params
);
this
.
createList
=
res
.
data
;
},
/**
* 上传文件按钮点击事件
* @description 通过Bus通信,开启全局上传文件流程
* @param {boolean} uploadWay 上传方式 0-文件上传 1-文件夹上传 2-粘贴图片或拖拽上传
*/
handleUploadFile
(
uploadWay
)
{
this
.
$openDialog
.
authWeChat
({}).
then
((
res
)
=>
{
switch
(
res
)
{
case
"confirm"
:
{
this
.
$common
.
goAccount
(
"/settings/account"
);
break
;
}
case
"go"
:
{
this
.
$openBox
.
uploadFile
({
params
:
this
.
uploadFileParams
,
uploadWay
,
serviceEl
:
this
,
callType
:
1
,
// callType 调用此服务的方式:1 - 顶部栏,2 - 右键菜单
});
break
;
}
}
// 上传文件
handleUploadFile
()
{
const
uploadFileParams
=
{
filePath
:
"/我的创作"
,
isDir
:
0
};
// 上传文件组件参数
// debugger;
this
.
$openBox
.
uploadFile
({
params
:
uploadFileParams
,
uploadWay
:
0
,
//0-文件上传 1-文件夹上传 2-粘贴图片或拖拽上传
serviceEl
:
this
,
callType
:
2
,
// callType 调用此服务的方式:1 - 顶部栏,2 - 右键菜单
});
},
// 创建文件
handleCreateFile
()
{
// const _this = this;
const
formData
=
new
FormData
();
// 目前仅支持创建文档
formData
.
append
(
"filetype"
,
fileTypes
.
WORD
);
newfile
(
formData
).
then
((
res
)
=>
{
// instance.confirmButtonLoading = false;
// done();
// _this.$parent.$parent.showDialog = false;
const
resolve
=
this
.
$router
.
resolve
({
path
:
"/write"
,
query
:
{
wpsUrl
:
res
.
redirect_url
,
},
this
.
$openDialog
.
addFileByTemplate
({
extendName
:
"docx"
,
})
.
then
((
res
)
=>
{
// if (res === "confirm") {
// this.$emit("getTableDataByType");
// }
});
window
.
open
(
resolve
.
href
);
});
// if (e === undefined) {
// // 目前仅支持创建文档
// formData.append("filetype", fileTypes.WORD);
// newfile(formData).then((res) => {
// // instance.confirmButtonLoading = false;
// // done();
// // _this.$parent.$parent.showDialog = false;
// const resolve = this.$router.resolve({
// path: "/write",
// query: {
// wpsUrl: res.redirect_url,
// },
// });
// window.open(resolve.href);
// });
// } else {
// formData.append("templateId", e);
// newfileTemplate(formData).then((res) => {
// instance.confirmButtonLoading = false;
// done();
// _this.$parent.$parent.showDialog = false;
// let resolve = _this.$router.resolve({
// path: "/write",
// query: {
// wpsUrl: res.redirect_url,
// },
// });
// window.open(resolve.href);
// });
// }
},
// 点击表格某一行
handleClickName
(
row
)
{
console
.
log
(
"row"
,
row
);
openFile
(
row
,
this
,
localStorage
);
},
handleToCreate
()
{
this
.
$router
.
push
(
"/mine/myCreate"
);
...
...
@@ -232,6 +181,9 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.cursor-pointer
{
cursor
:
pointer
;
}
::v-deep
.el-card__body
{
.el-upload
{
width
:
100%
;
...
...
src/views/manage/shareManage/constant.js
0 → 100644
浏览文件 @
41138649
//分享类型
export
const
shareTypeConstant
=
{
PUBLIC_SHARE
:
0
,
//分享给公共社区
DEPT_SHARE
:
1
,
//分享给部门
PERSONAL_SHARE
:
2
//分享给个人
}
// 分享状态
export
const
shareStatusConstant
=
{
SHARED
:
0
,
//已分享
EXPIRED
:
1
,
//已失效
REVOKED
:
2
,
//已撤销
}
\ No newline at end of file
src/views/manage/shareManage/index.vue
浏览文件 @
41138649
<
template
>
<div>
共享管理
</div>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"文件名称"
prop=
"fileName"
>
<el-input
v-model=
"queryParams.fileName"
placeholder=
"请输入文件名称"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
clearable
/>
</el-form-item>
<el-form-item
label=
"分享状态"
prop=
"fileName"
>
<el-select
v-model=
"queryParams.shareStatus"
placeholder=
"请选择分享状态"
clearable
>
<el-option
v-for=
"item in dict.type.share_status"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"shareList"
>
<el-table-column
label=
"文件名称"
align=
"center"
prop=
"fileName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"分享截止时间"
align=
"center"
prop=
"endTime"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"分享类型"
align=
"center"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.share_type"
:value=
"scope.row.shareType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"分享状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"getShareStatusTagType(scope.row.shareStatus)"
><dict-tag
:options=
"dict.type.share_status"
:value=
"scope.row.shareStatus"
/></el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-link
type=
"primary"
style=
"margin-right: 16px"
>
<svg-icon
icon-class=
"revoke"
>
</svg-icon>
撤销分享
</el-link>
<el-link
type=
"primary"
icon=
"el-icon-view"
>
预览
</el-link>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.currentPage"
:limit
.
sync=
"queryParams.pageCount"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
export
default
{}
;
</
script
>
import
{
getAdminShareList
}
from
"@/api/user/share"
;
import
{
shareStatusConstant
}
from
"./constant"
;
<
style
></
style
>
export
default
{
name
:
"myShare"
,
dicts
:
[
"share_type"
,
"share_status"
],
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 表格数据
shareList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 日期范围
dateRange
:
[],
// 查询参数
queryParams
:
{
currentPage
:
1
,
pageCount
:
10
,
fileName
:
""
,
//文件名称
shareStatus
:
""
,
//分享状态
},
// 分享状态常量
shareStatusConstant
,
};
},
computed
:
{
getShareStatusTagType
(
shareStatus
)
{
return
(
shareStatus
)
=>
{
switch
(
shareStatus
)
{
case
shareStatusConstant
.
SHARED
:
//已分享
return
"success"
;
case
shareStatusConstant
.
EXPIRED
:
//已失效
return
"info"
;
case
shareStatusConstant
.
REVOKED
:
//已撤销
return
"warning"
;
}
};
},
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询字典类型列表 */
getList
()
{
this
.
loading
=
true
;
getAdminShareList
(
this
.
queryParams
).
then
((
res
)
=>
{
this
.
total
=
res
.
data
.
total
;
this
.
loading
=
false
;
this
.
shareList
=
res
.
data
.
records
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
resetForm
(
"queryForm"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
currentPage
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRange
=
[];
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 取消分享
handleCancelShare
(
row
)
{
console
.
log
(
row
);
},
},
};
</
script
>
src/views/mine/myNote/components/noteByFile.vue
浏览文件 @
41138649
...
...
@@ -32,11 +32,19 @@
<div
:span=
"19"
class=
"right"
>
<div
class=
"single-article"
>
<el-row
class=
"info"
>
<el-col
:span=
"8"
class=
"center"
>
{{
currentFile
.
name
}}
</el-col>
<el-col
:span=
"8"
class=
"center"
>
{{
currentFile
.
author
}}
</el-col>
<el-col
:span=
"8"
class=
"center"
><el-button
type=
"text"
>
查看原文
</el-button></el-col
>
<el-col
:span=
"16"
>
<el-row>
<el-col
class=
"info-title"
>
{{
currentFile
.
name
}}
</el-col>
<el-col>
<span
class=
"info-author"
>
作者:
{{
currentFile
.
author
}}
</span>
<el-button
type=
"text"
>
查看原文
</el-button>
</el-col>
</el-row>
</el-col>
</el-row>
<div
class=
"card-group"
>
...
...
@@ -71,7 +79,7 @@
</div>
</
template
>
<
script
>
import
{
getBookList
,
getBookMark
}
from
"@/api/doc/bookMark"
;
import
{
getBook
Mark
List
,
getBookMark
}
from
"@/api/doc/bookMark"
;
import
{
mockNote
}
from
"./mockNote"
;
export
default
{
data
()
{
...
...
@@ -107,10 +115,10 @@ export default {
},
methods
:
{
async
loadBookMarkList
()
{
let
res
=
await
getBookList
();
let
res
=
await
getBook
Mark
List
();
console
.
log
(
res
);
if
(
res
.
result
)
{
this
.
markList
=
res
.
result
;
if
(
res
.
data
)
{
this
.
markList
=
res
.
data
;
}
},
// 点击文章
...
...
@@ -178,11 +186,14 @@ export default {
//文章基本信息
.info
{
padding
:
16px
;
border-bottom
:
1px
solid
#e7e7e7
;
margin-bottom
:
8px
;
.center
{
display
:
flex
;
justify-content
:
center
;
.info-title
{
color
:
#333
;
font-size
:
18px
;
font-weight
:
bold
;
}
.info-author
{
margin-right
:
18px
;
}
}
.card-group
{
...
...
src/views/mine/myShare/index.vue
浏览文件 @
41138649
...
...
@@ -48,61 +48,13 @@
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<!--
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:dict:add']"
>
新增
</el-button
>
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:dict:edit']"
>
修改
</el-button
>
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:dict:remove']"
>
删除
</el-button
>
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:dict:export']"
>
导出
</el-button
>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"handleRefreshCache"
v-hasPermi=
"['system:dict:remove']"
>
刷新缓存
</el-button
@
click
.
native=
"handleMultiRevoke"
><svg-icon
icon-class=
"revoke"
class=
"mr5"
>
</svg-icon>
批量撤销分享
</el-button
>
</el-col>
<right-toolbar
...
...
@@ -115,6 +67,7 @@
:data=
"shareList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"文件名称"
align=
"center"
...
...
@@ -180,14 +133,6 @@
</template>
<
script
>
import
{
listType
,
getType
,
delType
,
addType
,
updateType
,
refreshCache
,
}
from
"@/api/system/dict/type"
;
import
{
getMyShareList
}
from
"@/api/user/share"
;
import
{
shareStatusConstant
}
from
"./constant"
;
...
...
@@ -245,6 +190,12 @@ export default {
this
.
getList
();
},
methods
:
{
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
dictId
);
this
.
single
=
selection
.
length
!=
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 查询字典类型列表 */
getList
()
{
this
.
loading
=
true
;
...
...
@@ -261,14 +212,7 @@ export default {
},
// 表单重置
reset
()
{
this
.
form
=
{
dictId
:
undefined
,
dictName
:
undefined
,
dictType
:
undefined
,
status
:
"0"
,
remark
:
undefined
,
};
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"queryForm"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
...
...
@@ -281,83 +225,15 @@ export default {
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加字典类型"
;
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
dictId
);
this
.
single
=
selection
.
length
!=
1
;
this
.
multiple
=
!
selection
.
length
;
},
// 取消分享
handleCancelShare
(
row
)
{
console
.
log
(
row
);
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
dictId
=
row
.
dictId
||
this
.
ids
;
getType
(
dictId
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改字典类型"
;
});
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
dictId
!=
undefined
)
{
updateType
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addType
(
this
.
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
dictIds
=
row
.
dictId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除字典编号为"'
+
dictIds
+
'"的数据项?'
)
.
then
(
function
()
{
return
delType
(
dictIds
);
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
"system/dict/type/export"
,
{
...
this
.
queryParams
,
},
`type_
${
new
Date
().
getTime
()}
.xlsx`
);
},
/** 刷新缓存按钮操作 */
handleRefreshCache
()
{
refreshCache
().
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"刷新成功"
);
this
.
$store
.
dispatch
(
"dict/cleanDict"
);
});
},
// 批量取消分享
handleMultiRevoke
(){
console
.
log
(
this
.
ids
);
}
},
};
</
script
>
src/views/system/dict/index.vue
浏览文件 @
41138649
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"字典名称"
prop=
"dictName"
>
<el-input
v-model=
"queryParams.dictName"
...
...
@@ -46,8 +53,16 @@
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button
>
</el-form-item>
</el-form>
...
...
@@ -60,7 +75,8 @@
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:dict:add']"
>
新增
</el-button>
>
新增
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -71,7 +87,8 @@
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:dict:edit']"
>
修改
</el-button>
>
修改
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -82,7 +99,8 @@
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:dict:remove']"
>
删除
</el-button>
>
删除
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -92,7 +110,8 @@
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:dict:export']"
>
导出
</el-button>
>
导出
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -102,34 +121,71 @@
size=
"mini"
@
click=
"handleRefreshCache"
v-hasPermi=
"['system:dict:remove']"
>
刷新缓存
</el-button>
>
刷新缓存
</el-button
>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"typeList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"typeList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"字典编号"
align=
"center"
prop=
"dictId"
/>
<el-table-column
label=
"字典名称"
align=
"center"
prop=
"dictName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"字典类型"
align=
"center"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"字典名称"
align=
"center"
prop=
"dictName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"字典类型"
align=
"center"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<router-link
:to=
"'/system/dict-data/index/' + scope.row.dictId"
class=
"link-type"
>
<router-link
:to=
"'/system/dict-data/index/' + scope.row.dictId"
class=
"link-type"
>
<span>
{{
scope
.
row
.
dictType
}}
</span>
</router-link>
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_normal_disable"
:value=
"scope.row.status"
/>
<dict-tag
:options=
"dict.type.sys_normal_disable"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
...
...
@@ -137,20 +193,22 @@
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:dict:edit']"
>
修改
</el-button>
>
修改
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:dict:remove']"
>
删除
</el-button>
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
...
...
@@ -172,11 +230,16 @@
v-for=
"dict in dict.type.sys_normal_disable"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
>
{{ dict.label }}
</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
></el-input>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -188,11 +251,18 @@
</template>
<
script
>
import
{
listType
,
getType
,
delType
,
addType
,
updateType
,
refreshCache
}
from
"@/api/system/dict/type"
;
import
{
listType
,
getType
,
delType
,
addType
,
updateType
,
refreshCache
,
}
from
"@/api/system/dict/type"
;
export
default
{
name
:
"Dict"
,
dicts
:
[
'sys_normal_disable'
],
dicts
:
[
"sys_normal_disable"
],
data
()
{
return
{
// 遮罩层
...
...
@@ -221,19 +291,19 @@ export default {
pageSize
:
10
,
dictName
:
undefined
,
dictType
:
undefined
,
status
:
undefined
status
:
undefined
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
dictName
:
[
{
required
:
true
,
message
:
"字典名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"字典名称不能为空"
,
trigger
:
"blur"
}
,
],
dictType
:
[
{
required
:
true
,
message
:
"字典类型不能为空"
,
trigger
:
"blur"
}
]
}
{
required
:
true
,
message
:
"字典类型不能为空"
,
trigger
:
"blur"
}
,
]
,
}
,
};
},
created
()
{
...
...
@@ -243,7 +313,8 @@ export default {
/** 查询字典类型列表 */
getList
()
{
this
.
loading
=
true
;
listType
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
listType
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
(
response
)
=>
{
this
.
typeList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
...
...
@@ -262,7 +333,7 @@ export default {
dictName
:
undefined
,
dictType
:
undefined
,
status
:
"0"
,
remark
:
undefined
remark
:
undefined
,
};
this
.
resetForm
(
"form"
);
},
...
...
@@ -285,32 +356,32 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
dictId
)
this
.
single
=
selection
.
length
!=
1
this
.
multiple
=
!
selection
.
length
this
.
ids
=
selection
.
map
(
(
item
)
=>
item
.
dictId
);
this
.
single
=
selection
.
length
!=
1
;
this
.
multiple
=
!
selection
.
length
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
dictId
=
row
.
dictId
||
this
.
ids
getType
(
dictId
).
then
(
response
=>
{
const
dictId
=
row
.
dictId
||
this
.
ids
;
getType
(
dictId
).
then
(
(
response
)
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改字典类型"
;
});
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
dictId
!=
undefined
)
{
updateType
(
this
.
form
).
then
(
response
=>
{
updateType
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addType
(
this
.
form
).
then
(
response
=>
{
addType
(
this
.
form
).
then
(
(
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
...
...
@@ -322,26 +393,34 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
dictIds
=
row
.
dictId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除字典编号为"'
+
dictIds
+
'"的数据项?'
).
then
(
function
()
{
return
delType
(
dictIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
this
.
$modal
.
confirm
(
'是否确认删除字典编号为"'
+
dictIds
+
'"的数据项?'
)
.
then
(
function
()
{
return
delType
(
dictIds
);
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'system/dict/type/export'
,
{
...
this
.
queryParams
},
`type_
${
new
Date
().
getTime
()}
.xlsx`
)
this
.
download
(
"system/dict/type/export"
,
{
...
this
.
queryParams
,
},
`type_
${
new
Date
().
getTime
()}
.xlsx`
);
},
/** 刷新缓存按钮操作 */
handleRefreshCache
()
{
refreshCache
().
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"刷新成功"
);
this
.
$store
.
dispatch
(
'dict/cleanDict'
);
this
.
$store
.
dispatch
(
"dict/cleanDict"
);
});
}
}
}
,
}
,
};
</
script
>
\ No newline at end of file
</
script
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论