Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
study-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
study-platform
Commits
3bf889bc
Commit
3bf889bc
authored
2 years ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改人员学习
parent
a42bcdbf
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
706 additions
and
505 deletions
+706
-505
study-manager-ui/admin/.env
study-manager-ui/admin/.env
+1
-1
study-manager-ui/admin/.env.test
study-manager-ui/admin/.env.test
+1
-1
study-manager-ui/admin/src/assets/mixins/formdialog.js
study-manager-ui/admin/src/assets/mixins/formdialog.js
+4
-2
study-manager-ui/admin/src/assets/mixins/table.js
study-manager-ui/admin/src/assets/mixins/table.js
+1
-1
study-manager-ui/admin/src/components/FileUpload.vue
study-manager-ui/admin/src/components/FileUpload.vue
+59
-22
study-manager-ui/admin/src/views/notice/dialogshow.vue
study-manager-ui/admin/src/views/notice/dialogshow.vue
+423
-382
study-manager-ui/admin/src/views/notice/study/view.vue
study-manager-ui/admin/src/views/notice/study/view.vue
+111
-91
study-manager-ui/admin/src/views/project/dialogshow.vue
study-manager-ui/admin/src/views/project/dialogshow.vue
+42
-1
study-manager-ui/admin/src/views/project/study/view.vue
study-manager-ui/admin/src/views/project/study/view.vue
+48
-2
study-manager/pom.xml
study-manager/pom.xml
+1
-1
study-manager/src/main/java/com/mortals/xhx/base/system/upload/service/impl/UploadServiceImpl.java
...hx/base/system/upload/service/impl/UploadServiceImpl.java
+1
-1
study-manager/src/main/java/com/mortals/xhx/base/system/upload/web/UploadController.java
.../mortals/xhx/base/system/upload/web/UploadController.java
+14
-0
No files found.
study-manager-ui/admin/.env
View file @
3bf889bc
...
...
@@ -10,5 +10,5 @@ VUE_APP_WEBSOCKET_API =127.0.0.1:18222/m
# 门户登录地址
VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_PORT = 1
1089
VUE_APP_PORTAL_PORT = 1
7300
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/.env.test
View file @
3bf889bc
...
...
@@ -5,4 +5,4 @@ VUE_APP_API_BASE_URL=/basics_api
#图片地址拼接
VUE_APP_PORTAL_URL
=
/
portal_home
VUE_APP_PORTAL_PORT
=
1
1089
VUE_APP_PORTAL_PORT
=
1
7300
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/assets/mixins/formdialog.js
View file @
3bf889bc
...
...
@@ -31,7 +31,7 @@ export default {
this
.
pageInfo
.
edit
=
path
+
"
/edit
"
;
this
.
pageInfo
.
view
=
path
+
"
/view
"
;
},
// 默认拉取数据
getData
()
{
this
.
loading
=
true
;
...
...
@@ -46,7 +46,9 @@ export default {
res
.
entity
=
this
.
util_toDateStr
(
res
.
entity
,
this
.
toDate
);
this
.
form
=
Object
.
assign
({},
this
.
form
,
res
.
entity
);
this
.
dict
=
Object
.
assign
({},
this
.
dict
,
res
.
dict
);
console
.
log
(
this
.
form
)
this
.
afterRender
(
res
);
})
.
catch
(
error
=>
{
...
...
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/assets/mixins/table.js
View file @
3bf889bc
...
...
@@ -264,7 +264,7 @@ export default {
// 自定义索引号
handleIndexMethod
(
index
)
{
//prePageResult 每页条数
console
.
log
(
"
index:
"
+
index
)
//
console.log("index:"+index)
let
size
=
this
.
tableData
.
pageInfo
.
prePageResult
;
let
page
=
this
.
tableData
.
pageInfo
.
currPage
;
let
count
=
parseInt
(
size
)
*
(
parseInt
(
page
)
-
1
)
...
...
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/components/FileUpload.vue
View file @
3bf889bc
...
...
@@ -50,7 +50,7 @@
<el-link
:underline=
"false"
style=
"font-size: 12px"
@
click=
"handleDelete(index)"
@
click=
"handleDelete(
file.url,
index)"
type=
"danger"
>
删除
</el-link
>
...
...
@@ -71,7 +71,7 @@ export default {
type
:
Number
,
default
:
200
,
},
fileNumber
:
{
fileNumber
:
{
type
:
Number
,
default
:
1
,
},
...
...
@@ -99,34 +99,55 @@ export default {
},
data
()
{
return
{
number
:
0
,
uploadFileUrl
:
"
/study/file/commonupload
"
,
// 上传的地址
uploadList
:
[],
headers
:{},
fileList
:
[],
};
},
/* watch: {
value: {
handler(val) {
console.log("value",this.value);
if (val) {
let temp = 1;
// 首先将值转为数组
const list = Array.isArray(val) ? val : this.value.split(',');
// 然后将数组转为对象数组
this.fileList = list.map(item => {
item = { name: item.name, url: item.url};
item.uid = item.uid || new Date().getTime() + temp++;
return item;
});
} else {
this.fileList = [];
return [];
}
},
}
},*/
computed
:
{
// 是否显示提示
showTip
()
{
return
this
.
isShowTip
&&
(
this
.
fileType
||
this
.
fileSize
);
},
// 列表
list
()
{
list
()
{
let
temp
=
1
;
if
(
this
.
value
)
{
console
.
log
(
"
value
"
,
this
.
value
)
// 首先将值转为数组
const
list
=
Array
.
isArray
(
this
.
value
)
?
this
.
value
:
[
this
.
value
];
// 然后将数组转为对象数组
return
list
.
map
((
item
)
=>
{
if
(
typeof
item
===
"
string
"
)
{
if
(
this
.
fileName
!=
''
){
item
=
{
name
:
this
.
fileName
,
url
:
item
};
}
else
{
item
=
{
name
:
item
,
url
:
item
};
}
}
this
.
fileList
=
list
.
map
(
item
=>
{
item
=
{
name
:
item
.
name
,
url
:
item
.
url
};
item
.
uid
=
item
.
uid
||
new
Date
().
getTime
()
+
temp
++
;
return
item
;
return
item
;
});
return
this
.
fileList
;
}
else
{
this
.
fileList
=
[];
return
[];
...
...
@@ -160,11 +181,12 @@ export default {
return
false
;
}
}
this
.
number
++
;
return
true
;
},
// 文件个数超出
handleExceed
()
{
this
.
$message
.
error
(
`
只允许上传单个文件
`
);
this
.
$message
.
error
(
`
上传文件数量不能超过
${
this
.
limit
}
个!
`
);
},
// 上传失败
handleUploadError
(
err
)
{
...
...
@@ -172,19 +194,34 @@ export default {
},
// 上传成功回调
handleUploadSuccess
(
res
,
file
)
{
this
.
$message
.
success
(
"
上传成功
"
);
this
.
$emit
(
"
input
"
,
res
.
url
);
this
.
fileName
=
res
.
fileName
this
.
$emit
(
"
getFileName
"
,
res
.
fileName
);
if
(
res
.
code
===
1
)
{
this
.
uploadList
.
push
({
name
:
res
.
fileName
,
url
:
res
.
url
});
console
.
log
(
"
uploadList:
"
,
this
.
uploadList
)
if
(
this
.
uploadList
.
length
===
this
.
number
)
{
this
.
fileList
=
this
.
fileList
.
concat
(
this
.
uploadList
);
this
.
uploadList
=
[];
this
.
number
=
0
;
this
.
$emit
(
"
input
"
,
this
.
fileList
);
}
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
// this.$message.success("上传成功");
// this.$emit("input", res.url);
// this.fileName=res.fileName
// this.$emit("getFileName", res.fileName);
},
// 删除文件
handleDelete
(
index
)
{
this
.
fileList
.
splice
(
index
,
1
);
this
.
$emit
(
"
input
"
,
''
);
handleDelete
(
url
,
index
)
{
//todo 接口请求删除
this
.
value
=
this
.
value
.
filter
(
item
=>
item
.
url
!=
url
)
// this.fileList.splice(index, 1);
this
.
$emit
(
"
input
"
,
this
.
value
);
},
// 获取文件名称
getFileName
(
name
)
{
if
(
name
.
lastIndexOf
(
"
/
"
)
>
-
1
)
{
//console.log("name",name)
if
(
name
&&
name
.
lastIndexOf
(
"
/
"
)
>
-
1
)
{
return
name
.
slice
(
name
.
lastIndexOf
(
"
/
"
)
+
1
).
toLowerCase
();
}
else
{
return
name
;
...
...
@@ -192,7 +229,7 @@ export default {
}
},
created
()
{
this
.
fileList
=
this
.
list
;
//
this.fileList = this.list;
},
};
</
script
>
...
...
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/views/notice/dialogshow.vue
View file @
3bf889bc
<
template
>
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-dialog
width=
"30%"
title=
"选择部门"
:visible.sync=
"innerDeptVisible"
append-to-body
>
<div
class=
"mytree"
>
<el-tree
ref=
"deptTree"
:data=
"data"
id=
"el-tree"
indent=
"0"
node-key=
"id"
:props=
"treeProps"
:load=
"loadNode"
highlight-current
lazy
show-checkbox
default-expand-all
:default-checked-keys=
"deptChecked"
@
node-click=
"handleNodeClick"
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-dialog
width=
"30%"
title=
"选择部门"
:visible.sync=
"innerDeptVisible"
append-to-body
>
<div
class=
"mytree"
>
<el-tree
ref=
"deptTree"
:data=
"data"
id=
"el-tree"
indent=
"0"
node-key=
"id"
:props=
"treeProps"
:load=
"loadNode"
highlight-current
lazy
show-checkbox
default-expand-all
:default-checked-keys=
"deptChecked"
@
node-click=
"handleNodeClick"
>
</el-tree>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"deptConfirm"
>
确 定
</el-button>
<el-button
@
click=
"innerDeptVisible= false"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
width=
"70%"
title=
"选择人员"
:visible.sync=
"innerPersonVisible"
append-to-body
>
<el-row>
<el-col>
</el-col>
<el-col>
<!--搜索-->
<div>
<el-form
:inline=
"true"
size=
"mini"
>
<el-form-item
style=
"float: right"
>
<el-button
plain
@
click=
"searchConfirm"
>
查询
</el-button>
</el-form-item>
<el-form-item
label=
"学员名称"
style=
"float: right"
>
<el-input
v-model=
"searchform.realName"
placeholder=
"学员名称"
></el-input>
</el-form-item>
</el-form>
</div>
<!--学员列表-->
<el-table
size=
"mini"
ref=
"multipleTable"
:data=
"personPageInfoData"
tooltip-effect=
"dark"
border
v-loading=
"loading"
highlight-current-row
:default-selection=
"personIds"
@
selection-change=
"handleSelectionChange"
>
</el-tree>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"deptConfirm"
>
确 定
</el-button>
<el-button
@
click=
"innerDeptVisible= false"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
width=
"70%"
title=
"选择人员"
:visible.sync=
"innerPersonVisible"
append-to-body
>
<el-row>
<el-col>
</el-col>
<el-col>
<!--搜索-->
<div>
<el-form
:inline=
"true"
size=
"mini"
>
<el-form-item
style=
"float: right"
>
<el-button
plain
@
click=
"searchConfirm"
>
查询
</el-button>
</el-form-item>
<el-form-item
label=
"学员名称"
style=
"float: right"
>
<el-input
v-model=
"searchform.realName"
placeholder=
"学员名称"
></el-input>
</el-form-item>
</el-form>
</div>
<!--学员列表-->
<el-table
size=
"mini"
ref=
"multipleTable"
:data=
"personPageInfoData"
tooltip-effect=
"dark"
border
v-loading=
"loading"
highlight-current-row
:default-selection=
"personIds"
@
selection-change=
"handleSelectionChange"
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
type=
"index"
label=
"序号"
/>
<el-table-column
prop=
"realName"
label=
"学员姓名"
/>
<el-table-column
prop=
"deptName"
label=
"所属部门"
/>
</el-table>
<!-- 分页器 -->
<el-row
type=
"flex"
justify=
"end"
>
<el-pagination
@
current-change=
"handleCurrentChange"
@
size-change=
"handleSizeChange"
:current-page=
"personPageInfo.currPage"
:page-size=
"personPageInfo.prePageResult"
:page-sizes=
"[10, 20, 50, 100, 200]"
layout=
"sizes, total, prev, pager, next, jumper"
:total=
"personPageInfo.totalResult"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
type=
"index"
label=
"序号"
/>
<el-table-column
prop=
"realName"
label=
"学员姓名"
/>
<el-table-column
prop=
"deptName"
label=
"所属部门"
/>
</el-table>
<!-- 分页器 -->
<el-row
type=
"flex"
justify=
"end"
>
<el-pagination
@
current-change=
"handleCurrentChange"
@
size-change=
"handleSizeChange"
:current-page=
"personPageInfo.currPage"
:page-size=
"personPageInfo.prePageResult"
:page-sizes=
"[10, 20, 50, 100, 200]"
layout=
"sizes, total, prev, pager, next, jumper"
:total=
"personPageInfo.totalResult"
>
</el-pagination>
</el-row>
<el-row
style=
"float: right;margin-top: 10px"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"selectPersonConfirm"
>
确 定
</el-button>
<el-button
@
click=
"innerPersonVisible = false"
>
取 消
</el-button>
</el-row>
</el-col>
</el-row>
</el-dialog>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<Field
:span=
"22"
label=
"标题"
prop=
"title"
v-model=
"form.title"
placeholder=
"请输入标题"
/>
<Field
:span=
"22"
label=
"公告类型"
prop=
"noticeType"
v-model=
"form.noticeType"
type=
"radio"
:enumData=
"dict.noticeType"
placeholder=
"请选择公告类型"
/>
<Field
:span=
"22"
label=
"发布部门"
prop=
"pubDeptId"
v-model=
"form.pubDeptId"
type=
"select"
:enumData=
"dict.pubDeptId"
placeholder=
"请选择发布部门"
/>
<Field
:span=
"22"
label=
"查看人员"
prop=
"viewPersion"
v-model=
"form.viewPersion"
type=
"radio"
:enumData=
"
{0:'全部人员',1:'部分人员'}" placeholder="请选择查看人员"/>
<Field
:span=
"22"
label=
"指定部门"
v-if=
"form.viewPersion==1"
>
<el-button
type=
"primary"
@
click=
"selectDept"
>
选择部门
</el-button>
</Field>
<Field
:span=
"22"
label=
"指定学员"
v-if=
"form.viewPersion==1"
>
<el-button
type=
"primary"
@
click=
"selectPerson"
>
选择学员
</el-button>
</Field>
<Field
:span=
"22"
label=
"是否置顶"
prop=
"top"
v-model=
"form.top"
type=
"radio"
:enumData=
"dict.top"
placeholder=
"请选择是否置顶"
/>
<Field
:span=
"22"
label=
"已读要求"
prop=
"readRequest"
v-model=
"form.readRequest"
type=
"radio"
:enumData=
"dict.readRequest"
placeholder=
"请选择已读要求"
/>
<Field
:span=
"22"
label=
"公告内容"
><editor
v-model=
"form.noticeContent"
:min-height=
"512"
/></Field>
<Field
:span=
"22"
label=
"公告文件路径"
><fileUpload
v-model=
"form.filePath"
@
getFileName=
"getNoticeFileName"
prePath=
"/file/fileupload"
/></Field>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-pagination>
</el-row>
<el-row
style=
"float: right;margin-top: 10px"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"selectPersonConfirm"
>
确 定
</el-button>
<el-button
@
click=
"innerPersonVisible = false"
>
取 消
</el-button>
</el-row>
</el-col>
</el-row>
</el-dialog>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<Field
:span=
"22"
label=
"标题"
prop=
"title"
v-model=
"form.title"
placeholder=
"请输入标题"
/>
<Field
:span=
"22"
label=
"公告类型"
prop=
"noticeType"
v-model=
"form.noticeType"
type=
"radio"
:enumData=
"dict.noticeType"
placeholder=
"请选择公告类型"
/>
<Field
:span=
"22"
label=
"发布部门"
prop=
"pubDeptId"
v-model=
"form.pubDeptId"
type=
"select"
:enumData=
"dict.pubDeptId"
placeholder=
"请选择发布部门"
/>
<Field
:span=
"22"
label=
"查看人员"
prop=
"viewPersion"
v-model=
"form.viewPersion"
type=
"radio"
:enumData=
"
{0:'全部人员',1:'部分人员'}" placeholder="请选择查看人员"/>
<Field
:span=
"22"
label=
"指定部门"
v-if=
"form.viewPersion==1"
>
<el-button
type=
"primary"
@
click=
"selectDept"
>
选择部门
</el-button>
</Field>
<Field
:span=
"22"
label=
"指定学员"
v-if=
"form.viewPersion==1"
>
<el-button
type=
"primary"
@
click=
"selectPerson"
>
选择学员
</el-button>
</Field>
<Field
:span=
"22"
label=
"是否置顶"
prop=
"top"
v-model=
"form.top"
type=
"radio"
:enumData=
"dict.top"
placeholder=
"请选择是否置顶"
/>
<Field
:span=
"22"
label=
"已读要求"
prop=
"readRequest"
v-model=
"form.readRequest"
type=
"radio"
:enumData=
"dict.readRequest"
placeholder=
"请选择已读要求"
/>
<Field
:span=
"22"
label=
"公告内容"
>
<editor
v-model=
"form.noticeContent"
:min-height=
"512"
/>
</Field>
<Field
:span=
"22"
label=
"公告文件路径"
>
<fileUpload
v-model=
"form.filePath"
fileNumber=
"5"
prePath=
"/file/fileupload"
/>
</Field>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
import
FileUpload
from
'
@/components/FileUpload
'
;
import
Editor
from
'
@/components/Editor
'
;
export
default
{
mixins
:
[
form
],
components
:
{
dialogShow
,
FileUpload
,
Editor
,
},
data
()
{
return
{
node
:
{},
data
:
[],
deptIds
:[],
personIds
:[],
personPageInfoData
:
[],
deptChecked
:
[],
tree
:
[],
treeProps
:
{
children
:
"
children
"
,
label
:
"
label
"
,
id
:
"
id
"
,
},
toDate
:
[
'
projectStartTime
'
,
'
projectEndTime
'
],
searchform
:
{
realName
:
""
},
personPageInfo
:
{
totalResult
:
0
,
prePageResult
:
10
,
currPage
:
1
,
},
innerDeptVisible
:
false
,
innerPersonVisible
:
false
,
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
学习公告
"
,
// 是否显示弹出层
open
:
false
,
toString
:[
"
noticeType
"
,
"
pubDeptId
"
,
"
viewPersion
"
,
"
top
"
,
"
readRequest
"
,
],
// 表单校验
rules
:
{
title
:
[
{
required
:
true
,
message
:
"
请输入标题
"
,
trigger
:
"
blur
"
},
{
max
:
256
,
message
:
"
最多只能录入256个字符
"
,
trigger
:
"
blur
"
,},
],
viewPersion
:
[
{
required
:
true
,
message
:
"
请输入查看人员
"
,
trigger
:
"
blur
"
},
],
top
:
[
{
required
:
true
,
message
:
"
请输入是否置顶
"
,
trigger
:
"
blur
"
},
],
}
};
},
methods
:
{
getNoticeFileName
(
fileName
)
{
this
.
form
.
fileName
=
fileName
;
},
searchConfirm
()
{
this
.
getPersonList
({
'
userType
'
:
2
});
},
//弹窗事项列表搜索事件-清空
personSearchClear
()
{
this
.
searchform
=
{
'
userType
'
:
2
};
},
handleSelectionChange
(
val
)
{
//判断是否选中
console
.
log
(
"
selected
"
,
val
);
this
.
form
.
personIds
=
val
.
map
(
i
=>
i
.
id
);
//获取当前列表未选中行,与tags比较 如果有 则删除tags中的行
// this.multipleSelection = val;
},
handleSizeChange
(
currSize
)
{
console
.
log
(
"
currSize=
"
+
currSize
);
this
.
personPageInfo
.
prePageResult
=
currSize
;
this
.
getPersonList
(
this
.
searchform
);
},
handleCurrentChange
(
currPage
)
{
console
.
log
(
"
currPage=
"
+
currPage
);
this
.
personPageInfo
.
currPage
=
currPage
;
this
.
getPersonList
(
this
.
searchform
);
},
initPersonPage
()
{
this
.
personPageInfo
=
{
totalResult
:
0
,
prePageResult
:
10
,
currPage
:
1
,
};
},
getPersonList
(
query
)
{
query
[
"
page
"
]
=
this
.
personPageInfo
.
currPage
;
query
[
"
size
"
]
=
this
.
personPageInfo
.
prePageResult
;
//弹窗材料列表搜索条件name
if
(
this
.
searchform
.
realName
)
{
query
[
"
realName
"
]
=
"
%
"
+
this
.
searchform
.
realName
+
"
%
"
;
}
this
.
loading
=
true
;
this
.
$post
(
"
/user/list
"
,
query
).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
loading
=
false
;
this
.
personPageInfoData
=
res
.
data
.
data
;
this
.
personPageInfo
.
currPage
=
res
.
data
.
pageInfo
.
currPage
;
this
.
personPageInfo
.
prePageResult
=
res
.
data
.
pageInfo
.
prePageResult
;
this
.
personPageInfo
.
totalResult
=
res
.
data
.
pageInfo
.
totalResult
;
}
});
},
deptConfirm
()
{
console
.
log
(
this
.
$refs
.
deptTree
.
getCheckedKeys
());
this
.
deptChecked
=
this
.
$refs
.
deptTree
.
getCheckedKeys
()
this
.
innerDeptVisible
=
false
;
},
changePerson
(
val
)
{
console
.
log
(
val
)
},
async
loadNode
(
node
,
resolve
)
{
if
(
node
.
level
===
0
)
{
return
;
}
this
.
$get
(
"
/dept/getListByParentId
"
,
{
parentId
:
node
.
data
.
id
,
}).
then
(({
data
})
=>
{
resolve
(
data
.
result
);
});
},
selectDept
(
val
)
{
console
.
log
(
"
选择部门
"
);
try
{
// this.userDeptDialog.data = row;
this
.
$nextTick
(()
=>
{
this
.
$get
(
"
/dept/getListByParentId
"
,
{
parentId
:
0
,
}).
then
(({
data
})
=>
{
this
.
data
=
data
.
result
;
this
.
node
=
{}
});
});
}
catch
(
error
)
{
this
.
$message
.
error
(
error
.
message
);
}
this
.
innerDeptVisible
=
true
;
},
selectPerson
(
val
)
{
console
.
log
(
val
)
this
.
personSearchClear
();
this
.
initPersonPage
();
this
.
searchConfirm
();
this
.
innerPersonVisible
=
true
;
},
selectPersonConfirm
()
{
//选择人员
this
.
innerPersonVisible
=
false
;
console
.
log
(
this
.
form
.
personIds
)
},
/** 编辑 */
edit
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
notice/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改学习公告
"
;
},
/** 新增 */
add
(
row
)
{
this
.
reset
()
this
.
urls
.
currUrl
=
"
notice/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
this
.
title
=
"
新增学习公告
"
;
},
/** 查看*/
view
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
notice/view
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
学习公告详细
"
;
},
/**取消按钮 */
cancel
()
{
this
.
open
=
false
;
},
/**获取数据后弹框 */
afterRender
(
data
)
{
this
.
open
=
true
;
},
afterSubmit
(
data
)
{
this
.
open
=
false
;
this
.
$emit
(
"
ok
"
);
},
// 表单重置
reset
()
{
this
.
form
=
{
title
:
""
,
noticeType
:
0
,
pubDeptId
:
null
,
pubDeptName
:
""
,
viewPersion
:
0
,
top
:
0
,
readRequest
:
0
,
noticeContent
:
""
,
filePath
:
""
,
fileName
:
""
,
remark
:
""
,
};
this
.
resetForm
(
"
form
"
);
},
resetForm
(
refName
)
{
if
(
this
.
$refs
[
refName
])
{
this
.
$refs
[
refName
].
resetFields
();
}
},
},
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
import
FileUpload
from
'
@/components/FileUpload
'
;
import
Editor
from
'
@/components/Editor
'
;
export
default
{
mixins
:
[
form
],
components
:
{
dialogShow
,
FileUpload
,
Editor
,
},
data
()
{
return
{
node
:
{},
data
:
[],
deptIds
:
[],
personIds
:
[],
personPageInfoData
:
[],
deptChecked
:
[],
tree
:
[],
treeProps
:
{
children
:
"
children
"
,
label
:
"
label
"
,
id
:
"
id
"
,
},
toDate
:
[
'
projectStartTime
'
,
'
projectEndTime
'
],
searchform
:
{
realName
:
""
},
personPageInfo
:
{
totalResult
:
0
,
prePageResult
:
10
,
currPage
:
1
,
},
innerDeptVisible
:
false
,
innerPersonVisible
:
false
,
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
学习公告
"
,
// 是否显示弹出层
open
:
false
,
toString
:
[
"
noticeType
"
,
"
pubDeptId
"
,
"
viewPersion
"
,
"
top
"
,
"
readRequest
"
,
],
// 表单校验
rules
:
{
title
:
[
{
required
:
true
,
message
:
"
请输入标题
"
,
trigger
:
"
blur
"
},
{
max
:
256
,
message
:
"
最多只能录入256个字符
"
,
trigger
:
"
blur
"
,},
],
viewPersion
:
[
{
required
:
true
,
message
:
"
请输入查看人员
"
,
trigger
:
"
blur
"
},
],
top
:
[
{
required
:
true
,
message
:
"
请输入是否置顶
"
,
trigger
:
"
blur
"
},
],
}
};
},
methods
:
{
searchConfirm
()
{
this
.
getPersonList
({
'
userType
'
:
2
});
},
//弹窗事项列表搜索事件-清空
personSearchClear
()
{
this
.
searchform
=
{
'
userType
'
:
2
};
},
handleSelectionChange
(
val
)
{
//判断是否选中
console
.
log
(
"
selected
"
,
val
);
this
.
form
.
personIds
=
val
.
map
(
i
=>
i
.
id
);
//获取当前列表未选中行,与tags比较 如果有 则删除tags中的行
// this.multipleSelection = val;
},
handleSizeChange
(
currSize
)
{
console
.
log
(
"
currSize=
"
+
currSize
);
this
.
personPageInfo
.
prePageResult
=
currSize
;
this
.
getPersonList
(
this
.
searchform
);
},
handleCurrentChange
(
currPage
)
{
console
.
log
(
"
currPage=
"
+
currPage
);
this
.
personPageInfo
.
currPage
=
currPage
;
this
.
getPersonList
(
this
.
searchform
);
},
initPersonPage
()
{
this
.
personPageInfo
=
{
totalResult
:
0
,
prePageResult
:
10
,
currPage
:
1
,
};
},
getPersonList
(
query
)
{
query
[
"
page
"
]
=
this
.
personPageInfo
.
currPage
;
query
[
"
size
"
]
=
this
.
personPageInfo
.
prePageResult
;
//弹窗材料列表搜索条件name
if
(
this
.
searchform
.
realName
)
{
query
[
"
realName
"
]
=
"
%
"
+
this
.
searchform
.
realName
+
"
%
"
;
}
this
.
loading
=
true
;
this
.
$post
(
"
/user/list
"
,
query
).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
loading
=
false
;
this
.
personPageInfoData
=
res
.
data
.
data
;
this
.
personPageInfo
.
currPage
=
res
.
data
.
pageInfo
.
currPage
;
this
.
personPageInfo
.
prePageResult
=
res
.
data
.
pageInfo
.
prePageResult
;
this
.
personPageInfo
.
totalResult
=
res
.
data
.
pageInfo
.
totalResult
;
}
});
},
deptConfirm
()
{
console
.
log
(
this
.
$refs
.
deptTree
.
getCheckedKeys
());
this
.
deptChecked
=
this
.
$refs
.
deptTree
.
getCheckedKeys
()
this
.
innerDeptVisible
=
false
;
},
changePerson
(
val
)
{
console
.
log
(
val
)
},
async
loadNode
(
node
,
resolve
)
{
if
(
node
.
level
===
0
)
{
return
;
}
this
.
$get
(
"
/dept/getListByParentId
"
,
{
parentId
:
node
.
data
.
id
,
}).
then
(({
data
})
=>
{
resolve
(
data
.
result
);
});
},
selectDept
(
val
)
{
console
.
log
(
"
选择部门
"
);
try
{
// this.userDeptDialog.data = row;
this
.
$nextTick
(()
=>
{
this
.
$get
(
"
/dept/getListByParentId
"
,
{
parentId
:
0
,
}).
then
(({
data
})
=>
{
this
.
data
=
data
.
result
;
this
.
node
=
{}
});
});
}
catch
(
error
)
{
this
.
$message
.
error
(
error
.
message
);
}
this
.
innerDeptVisible
=
true
;
},
selectPerson
(
val
)
{
console
.
log
(
val
)
this
.
personSearchClear
();
this
.
initPersonPage
();
this
.
searchConfirm
();
this
.
innerPersonVisible
=
true
;
},
selectPersonConfirm
()
{
//选择人员
this
.
innerPersonVisible
=
false
;
console
.
log
(
this
.
form
.
personIds
)
},
/** 编辑 */
edit
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
notice/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改学习公告
"
;
},
/** 新增 */
add
(
row
)
{
this
.
reset
()
this
.
urls
.
currUrl
=
"
notice/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
this
.
title
=
"
新增学习公告
"
;
},
/** 查看*/
view
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
notice/view
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
学习公告详细
"
;
},
/**取消按钮 */
cancel
()
{
this
.
open
=
false
;
},
/**获取数据后弹框 */
beforeRender
(
data
)
{
//降filepath转换成数组
if
(
data
.
entity
.
fileName
===
null
||
data
.
entity
.
fileName
===
undefined
||
data
.
entity
.
fileName
===
''
){
data
.
entity
.
filePath
=
[]
return
data
}
const
nameArrays
=
data
.
entity
.
fileName
.
split
(
'
;
'
);
const
pathArrays
=
data
.
entity
.
filePath
.
split
(
'
;
'
);
let
arrs
=
[]
for
(
let
i
=
0
;
i
<
nameArrays
.
length
;
i
++
)
{
let
obj
=
{
name
:
nameArrays
[
i
],
url
:
pathArrays
[
i
]}
arrs
.
push
(
obj
)
}
data
.
entity
.
filePath
=
arrs
return
data
;
},
/**获取数据后弹框 */
afterRender
(
data
)
{
this
.
open
=
true
;
},
beforeSubmit
(
data
)
{
if
(
Array
.
isArray
(
data
.
filePath
))
{
const
fileNameArray
=
data
.
filePath
.
map
((
element
,
index
)
=>
{
if
(
index
===
data
.
filePath
.
length
-
1
)
{
return
element
.
name
;
}
else
{
return
element
.
name
+
"
;
"
;
}
});
const
fileName
=
fileNameArray
.
join
(
""
)
const
filePathArray
=
data
.
filePath
.
map
((
element
,
index
)
=>
{
if
(
index
===
data
.
filePath
.
length
-
1
)
{
return
element
.
url
;
}
else
{
return
element
.
url
+
"
;
"
;
}
});
const
filePath
=
filePathArray
.
join
(
""
)
data
.
filePath
=
filePath
;
data
.
fileName
=
fileName
;
}
return
data
;
},
afterSubmit
(
data
)
{
this
.
open
=
false
;
this
.
$emit
(
"
ok
"
);
},
// 表单重置
reset
()
{
this
.
form
=
{
title
:
""
,
noticeType
:
0
,
pubDeptId
:
null
,
pubDeptName
:
""
,
viewPersion
:
0
,
top
:
0
,
readRequest
:
0
,
noticeContent
:
""
,
filePath
:
[],
fileName
:
""
,
remark
:
""
,
};
this
.
resetForm
(
"
form
"
);
},
resetForm
(
refName
)
{
if
(
this
.
$refs
[
refName
])
{
this
.
$refs
[
refName
].
resetFields
();
}
},
},
};
</
script
>
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/views/notice/study/view.vue
View file @
3bf889bc
<
template
>
<layout-view>
<el-row
justify=
"center"
align=
"middle"
::span=
"24"
>
<el-col
:span=
"24"
style=
"display:flex;justify-content:center;"
>
<el-card
class=
"box-card"
>
<el-row>
<span
class=
"my-custom-text"
>
{{
form
.
title
}}
</span>
<el-button
type=
"primary"
style=
"float: right"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</el-row>
<!--
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
-->
<el-divider
style=
"width: 100%"
></el-divider>
<el-descriptions
style=
"text-align: center;width:50%; margin: auto"
:column=
"3"
>
<el-descriptions-item
label-width=
"0"
label=
"公告类型"
>
{{
util_formatters
(
"
noticetType
"
,
form
.
noticetType
)
}}
</el-descriptions-item>
<el-descriptions-item
label=
"发布时间"
label-width=
"0"
>
{{
util_formatterDate
(
form
.
createTime
)
}}
</el-descriptions-item>
<el-descriptions-item
label-width=
"0"
label=
"发布部门"
>
{{
form
.
deptName
}}
</el-descriptions-item>
</el-descriptions>
<el-divider
style=
"width: 100%"
></el-divider>
<div
class=
"ql-editor"
style=
""
v-html=
"form.noticeContent"
></div>
<el-divider
style=
"width: 100%"
></el-divider>
<div
v-if=
"isImage"
>
<img
:src=
"form.filePath"
alt=
"图片描述"
>
</div>
<div
v-else-if=
"isVideo"
>
<video
id=
"myVideo"
controls
>
<source
:src=
"form.filePath"
type=
"video/mp4"
>
</video>
</div>
<div
v-else
>
<el-link
type=
"primary"
:href=
"form.filePath"
>
{{
form
.
fileName
}}
</el-link>
</div>
</el-card>
</el-col>
</el-row>
</layout-view>
<layout-view>
<el-row
justify=
"center"
align=
"middle"
::span=
"24"
>
<el-col
:span=
"24"
style=
"display:flex;justify-content:center;"
>
<el-card
class=
"box-card"
>
<el-row>
<span
class=
"my-custom-text"
>
{{
form
.
title
}}
</span>
<el-button
type=
"primary"
style=
"float: right"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</el-row>
<!--
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
-->
<el-divider
style=
"width: 100%"
></el-divider>
<el-descriptions
style=
"text-align: center;width:50%; margin: auto"
:column=
"3"
>
<el-descriptions-item
label-width=
"0"
label=
"公告类型"
>
{{
util_formatters
(
"
noticetType
"
,
form
.
noticetType
)
}}
</el-descriptions-item>
<el-descriptions-item
label=
"发布时间"
label-width=
"0"
>
{{
util_formatterDate
(
form
.
createTime
)
}}
</el-descriptions-item>
<el-descriptions-item
label-width=
"0"
label=
"发布部门"
>
{{
form
.
deptName
}}
</el-descriptions-item>
</el-descriptions>
<el-divider
style=
"width: 100%"
></el-divider>
<div
class=
"ql-editor"
style=
""
v-html=
"form.noticeContent"
></div>
<el-divider
style=
"width: 100%"
></el-divider>
<ul
class=
"attachment-list"
>
<li
v-for=
"(file, index) in attachmentList"
:key=
"index"
>
<div
class=
"file-preview"
>
<template
v-if=
"checkImage(file)"
>
<img
:src=
"file.url"
alt=
""
/>
</
template
>
<
template
v-else-if=
"checkVideo(file)"
>
<video
:src=
"file.url"
controls
preload=
"metadata"
width=
"200"
></video>
</
template
>
<
template
v-else
>
<el-link
type=
"primary"
:href=
"file.url"
>
{{
file
.
fileName
}}
</el-link>
</
template
>
</div>
<div
class=
"file-info"
>
<span
class=
"file-name"
>
{{ file.fileName }}
</span>
</div>
<el-divider
style=
"width: 100%"
></el-divider>
</li>
</ul>
</el-card>
</el-col>
</el-row>
</layout-view>
</template>
<
script
>
import
view
from
"
@/assets/mixins/view
"
;
export
default
{
mixins
:
[
view
],
components
:
{
},
methods
:
{
afterRender
(
data
)
{
this
.
checkFileType
()
},
checkFileType
()
{
const
extension
=
this
.
form
.
fileName
.
split
(
'
.
'
).
pop
().
toLowerCase
();
if
([
'
jpg
'
,
'
jpeg
'
,
'
png
'
,
'
gif
'
].
indexOf
(
extension
)
!==
-
1
)
{
this
.
isImage
=
true
;
}
else
if
([
'
mp4
'
].
indexOf
(
extension
)
!==
-
1
)
{
this
.
isVideo
=
true
}
else
{
this
.
isImage
=
false
;
}
},
},
data
()
{
return
{
isImage
:
false
,
isVideo
:
false
,
size
:
"
small
"
,
column
:
2
,
toString
:[
"
noticetType
"
,
"
noticeStatus
"
,
"
top
"
,
],
toArrays
:
[
],
toDate
:
[
]
}
}
import
view
from
"
@/assets/mixins/view
"
;
export
default
{
mixins
:
[
view
],
components
:
{},
methods
:
{
beforeRender
(
data
)
{
const
nameArrays
=
data
.
entity
.
fileName
.
split
(
'
;
'
);
const
pathArrays
=
data
.
entity
.
filePath
.
split
(
'
;
'
);
for
(
let
i
=
0
;
i
<
nameArrays
.
length
;
i
++
)
{
let
obj
=
{
fileName
:
nameArrays
[
i
],
url
:
pathArrays
[
i
]}
this
.
attachmentList
.
push
(
obj
)
}
return
data
},
checkImage
(
file
)
{
const
extension
=
file
.
fileName
.
split
(
'
.
'
).
pop
().
toLowerCase
();
if
([
'
jpg
'
,
'
jpeg
'
,
'
png
'
,
'
gif
'
].
indexOf
(
extension
)
!==
-
1
)
{
return
true
;
}
else
{
return
false
;
}
},
checkVideo
(
file
)
{
const
extension
=
file
.
fileName
.
split
(
'
.
'
).
pop
().
toLowerCase
();
if
([
'
mp4
'
,
'
MP4
'
].
indexOf
(
extension
)
!==
-
1
)
{
return
true
}
else
{
return
false
;
}
},
},
data
()
{
return
{
attachmentList
:
[],
isImage
:
false
,
isVideo
:
false
,
size
:
"
small
"
,
column
:
2
,
toString
:
[
"
noticetType
"
,
"
noticeStatus
"
,
"
top
"
,
],
toArrays
:
[],
toDate
:
[]
}
}
}
</
script
>
<
style
lang=
"less"
>
.labelClass{
.labelClass
{
width: 200px;
}
.el-descriptions__body{
.el-descriptions__body {
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
.contentClass {
}
...
...
@@ -119,7 +139,7 @@
font-weight: bold;
}
.el-divider{
.el-divider
{
margin: 18px 0;
background: 0 0;
border-top: 1px solid #E6EBF5;
...
...
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/views/project/dialogshow.vue
View file @
3bf889bc
...
...
@@ -133,7 +133,7 @@
<editor
v-model=
"form.studyContent"
:min-height=
"256"
/>
</Field>
<Field
:span=
"22"
label=
"项目附件"
>
<fileUpload
v-model=
"form.filePath"
@
getFileName=
"getProjectFileName"
prePath=
"/file/fileupload"
/>
<fileUpload
v-model=
"form.filePath"
fileNumber=
"5"
prePath=
"/file/fileupload"
/>
</Field>
</el-row>
...
...
@@ -361,10 +361,51 @@ export default {
this
.
open
=
false
;
},
/**获取数据后弹框 */
beforeRender
(
data
)
{
//降filepath转换成数组
if
(
data
.
entity
.
fileName
===
null
||
data
.
entity
.
fileName
===
undefined
||
data
.
entity
.
fileName
===
''
){
data
.
entity
.
filePath
=
[]
return
data
}
const
nameArrays
=
data
.
entity
.
fileName
.
split
(
'
;
'
);
const
pathArrays
=
data
.
entity
.
filePath
.
split
(
'
;
'
);
let
arrs
=
[]
for
(
let
i
=
0
;
i
<
nameArrays
.
length
;
i
++
)
{
let
obj
=
{
name
:
nameArrays
[
i
],
url
:
pathArrays
[
i
]}
arrs
.
push
(
obj
)
}
data
.
entity
.
filePath
=
arrs
return
data
;
},
/**获取数据后弹框 */
afterRender
(
data
)
{
this
.
open
=
true
;
},
beforeSubmit
(
data
)
{
if
(
Array
.
isArray
(
data
.
filePath
))
{
const
fileNameArray
=
data
.
filePath
.
map
((
element
,
index
)
=>
{
if
(
index
===
data
.
filePath
.
length
-
1
)
{
return
element
.
name
;
}
else
{
return
element
.
name
+
"
;
"
;
}
});
const
fileName
=
fileNameArray
.
join
(
""
)
const
filePathArray
=
data
.
filePath
.
map
((
element
,
index
)
=>
{
if
(
index
===
data
.
filePath
.
length
-
1
)
{
return
element
.
url
;
}
else
{
return
element
.
url
+
"
;
"
;
}
});
const
filePath
=
filePathArray
.
join
(
""
)
data
.
filePath
=
filePath
;
data
.
fileName
=
fileName
;
}
return
data
;
},
afterSubmit
(
data
)
{
this
.
open
=
false
;
this
.
$emit
(
"
ok
"
);
...
...
This diff is collapsed.
Click to expand it.
study-manager-ui/admin/src/views/project/study/view.vue
View file @
3bf889bc
...
...
@@ -36,8 +36,26 @@
<div
class=
"ql-editor"
v-html=
"form.studyContent"
></div>
<el-divider
style=
"width: 100%"
></el-divider>
<el-link
type=
"primary"
:href=
"form.filePath"
>
{{
form
.
fileName
}}
</el-link>
<ul
class=
"attachment-list"
>
<li
v-for=
"(file, index) in attachmentList"
:key=
"index"
>
<div
class=
"file-preview"
>
<template
v-if=
"checkImage(file)"
>
<img
:src=
"file.url"
alt=
""
/>
</
template
>
<
template
v-else-if=
"checkVideo(file)"
>
<video
:src=
"file.url"
controls
preload=
"metadata"
width=
"200"
></video>
</
template
>
<
template
v-else
>
<el-link
type=
"primary"
:href=
"file.url"
>
{{
file
.
fileName
}}
</el-link>
</
template
>
</div>
<div
class=
"file-info"
>
<span
class=
"file-name"
>
{{ file.fileName }}
</span>
</div>
<el-divider
style=
"width: 100%"
></el-divider>
</li>
</ul>
</el-card>
</el-col>
</el-row>
...
...
@@ -52,10 +70,38 @@
components
:
{
},
methods
:
{
beforeRender
(
data
)
{
const
nameArrays
=
data
.
entity
.
fileName
.
split
(
'
;
'
);
const
pathArrays
=
data
.
entity
.
filePath
.
split
(
'
;
'
);
for
(
let
i
=
0
;
i
<
nameArrays
.
length
;
i
++
)
{
let
obj
=
{
fileName
:
nameArrays
[
i
],
url
:
pathArrays
[
i
]}
this
.
attachmentList
.
push
(
obj
)
}
return
data
},
checkImage
(
file
)
{
const
extension
=
file
.
fileName
.
split
(
'
.
'
).
pop
().
toLowerCase
();
if
([
'
jpg
'
,
'
jpeg
'
,
'
png
'
,
'
gif
'
].
indexOf
(
extension
)
!==
-
1
)
{
return
true
;
}
else
{
return
false
;
}
},
checkVideo
(
file
)
{
const
extension
=
file
.
fileName
.
split
(
'
.
'
).
pop
().
toLowerCase
();
if
([
'
mp4
'
,
'
MP4
'
].
indexOf
(
extension
)
!==
-
1
)
{
return
true
}
else
{
return
false
;
}
},
},
data
()
{
return
{
attachmentList
:
[],
isImage
:
false
,
isVideo
:
false
,
size
:
"
small
"
,
column
:
2
,
toString
:[
...
...
This diff is collapsed.
Click to expand it.
study-manager/pom.xml
View file @
3bf889bc
...
...
@@ -25,7 +25,7 @@
<profiles.server.port>
17300
</profiles.server.port>
<profiles.server.gatewayport>
11078
</profiles.server.gatewayport>
<profiles.server.path>
/study
</profiles.server.path>
<profiles.nacos.server-addr>
192.168.
0.5
4:8848
</profiles.nacos.server-addr>
<profiles.nacos.server-addr>
192.168.
1.10
4:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov-cs
</profiles.nacos.namespace>
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
...
...
This diff is collapsed.
Click to expand it.
study-manager/src/main/java/com/mortals/xhx/base/system/upload/service/impl/UploadServiceImpl.java
View file @
3bf889bc
...
...
@@ -55,7 +55,7 @@ public class UploadServiceImpl implements UploadService {
log
.
error
(
"文件上传大小超过限制,当前文件---"
+
tempFile
.
getSize
()
+
",允许大小----------"
+
type
.
getMaxSize
());
throw
new
AppException
(
"文件上传大小超过限制!"
);
}
if
(
null
!=
fileName
&&
fileName
.
length
()
>
50
)
{
if
(
null
!=
fileName
&&
fileName
.
length
()
>
255
)
{
throw
new
AppException
(
"文件名称过长,无法上传!"
);
}
...
...
This diff is collapsed.
Click to expand it.
study-manager/src/main/java/com/mortals/xhx/base/system/upload/web/UploadController.java
View file @
3bf889bc
...
...
@@ -122,5 +122,19 @@ public class UploadController extends BaseController {
}
}
/**
* 通用文件删除
*
* @param fileName 文件名称
*/
@GetMapping
(
"fileupload/{fileName}"
)
public
void
fileDel
(
@PathVariable
(
value
=
"fileName"
)
String
fileName
,
HttpServletResponse
response
)
{
try
{
//uploadService.uploadDownload(fileName, response);
}
catch
(
Exception
e
)
{
log
.
error
(
"下载文件失败:"
,
e
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment