Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
fcaeffdb
提交
fcaeffdb
authored
10月 27, 2023
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对接智能抠图接口;修复table搜索的问题
上级
d759cf82
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
443 行增加
和
281 行删除
+443
-281
matting.js
src/api/matting.js
+77
-0
index.vue
src/components/UploadDialog/index.vue
+61
-43
zip.svg
src/icons/svg/zip.svg
+2
-0
staticRouter.js
src/router/staticRouter.js
+1
-1
addRouter.js
src/utils/addRouter.js
+2
-2
InfoEditDialog.vue
src/views/culturalRelic/components/InfoEditDialog.vue
+0
-0
index.vue
src/views/culturalRelic/index.vue
+34
-12
ImportRecordDialog.vue
src/views/display/components/ImportRecordDialog.vue
+0
-5
InfoEditDialog.vue
src/views/display/components/InfoEditDialog.vue
+5
-0
submit.js
src/views/display/components/submit.js
+4
-1
index.vue
src/views/display/index.vue
+33
-24
index.vue
src/views/displayApproval/index.vue
+39
-29
index.vue
src/views/literature/index.vue
+62
-48
index.vue
src/views/log/index.vue
+18
-23
index.vue
src/views/matting/index.vue
+31
-26
index.vue
src/views/product/index.vue
+16
-17
index.vue
src/views/role/index.vue
+24
-21
index.vue
src/views/user/index.vue
+17
-12
index.vue
src/views/virtual/index.vue
+17
-17
没有找到文件。
src/api/matting.js
0 → 100644
浏览文件 @
fcaeffdb
import
request
from
'@/utils/request'
// 上传图片抠图
export
function
mattingImage
(
data
)
{
return
request
({
url
:
'/bizMattingRecords/mattingImage'
,
method
:
'post'
,
data
})
}
// 获取抠图记录分页
export
function
getMattingList
(
data
)
{
return
request
({
url
:
'/bizMattingRecords/listByPage'
,
method
:
'post'
,
data
})
}
// 查询抠图记录详情
export
function
getMattingDetail
(
params
)
{
return
request
({
url
:
'/bizMattingRecords/detail'
,
method
:
'get'
,
params
})
}
// 删除抠图记录
export
function
deleteMattingRecord
(
data
)
{
return
request
({
url
:
'/bizMattingRecords/delete'
,
method
:
'delete'
,
data
})
}
// 删除抠图的图片
export
function
deleteMattingImage
(
data
)
{
return
request
({
url
:
'/bizMattingImages/delete'
,
method
:
'delete'
,
data
})
}
// 获取抠图的图片分页
export
function
getMattingImagesPage
(
data
)
{
return
request
({
url
:
'/bizMattingImages/listByPage'
,
method
:
'delete'
,
data
})
}
// 通过上传记录Id集合下载抠图文件列表
export
function
downFileByMattingIds
(
data
)
{
return
request
({
url
:
'/bizMattingRecords/downFileByMattingIds'
,
method
:
'post'
,
data
})
}
// 通过fileIds下载去背景图片
export
function
downFileByFileIds
(
data
)
{
return
request
({
url
:
'/bizMattingImages/downLoad'
,
method
:
'post'
,
data
})
}
src/components/UploadDialog/index.vue
浏览文件 @
fcaeffdb
<
template
>
<el-dialog
:visible=
"visible"
width=
"
6
0%"
width=
"
4
0%"
style=
"height: 98%"
:before-close=
"handleClose"
top=
"5vh"
...
...
@@ -9,7 +9,7 @@
>
<div
class=
"title"
slot=
"title"
>
<div
class=
"divider"
></div>
<span
class=
"label"
>
{{
getDialogTitle
}}
</span>
<span
class=
"label"
>
上传文件
</span>
<span
class=
"tips"
>
<i
class=
"el-icon-info"
></i
>
提示:上传过程中请勿关闭此弹窗或刷新页面等操作
...
...
@@ -29,13 +29,13 @@
:disabled=
"isDisabledTitle"
></el-input>
</el-form-item>
<el-form-item
label=
"
上传
文件"
>
<el-form-item
label=
"文件"
>
<el-upload
ref=
"upload"
class=
"upload-area"
name=
"zipFile"
:accept=
"fileType"
:action=
"
importZip
Url"
:action=
"
upload
Url"
:headers=
"headers"
:on-success=
"handleSuccess"
:on-change=
"handleChange"
...
...
@@ -114,22 +114,18 @@ import { getToken } from "@/utils/auth";
export
default
{
name
:
"UploadDialog"
,
props
:
{
//biz_cultural_relic——文物,biz_exhibition——展览,还需考虑其他的类型
bizType
:
{
type
:
String
,
default
:
"biz_cultural_relic"
,
},
flowId
:
{
type
:
String
,
default
:
""
,
//流程id
},
title
:
{
type
:
String
,
default
:
""
,
//标题,重传时会带过来
},
fileType
:
{
type
:
String
,
default
:
".zip"
,
//‘.zip为压缩文件,.jpg,.png,.jpeg’为图片
// 抠图上传的对象(包含上传的文件类型、标题)
options
:
{
type
:
Object
,
default
:
()
=>
({
recordsTitle
:
""
,
//上传时的记录标题,非必填
bizType
:
""
,
//业务类型,文物、展览等biz_cultural_relic——文物,biz_exhibition——展览,如果是文物和展览批量上传必填,抠图不用填
uploadUrl
:
""
,
//上传的地址,必填
flowId
:
""
,
//流程ID,重传时需要,非必填
compressFlag
:
""
,
//上传方式:0-单个图片文件;1-zip文件。抠图时需要,非必填
uploadFileKey
:
""
,
//formData中文件的key
uploadTitleKey
:
""
,
//formData中标题的key
}),
},
},
computed
:
{
...
...
@@ -138,20 +134,20 @@ export default {
return
(
size
/
1024
/
1024
).
toFixed
(
2
)
+
"M"
;
//1M=1024Kb=1024*1024byte
};
},
importZip
Url
()
{
if
(
!
this
.
bizType
)
{
upload
Url
()
{
if
(
!
this
.
options
)
{
return
;
}
return
process
.
env
.
VUE_APP_BASE_API
+
"/bizImport/importZip"
;
return
this
.
options
.
uploadUrl
;
},
getDialogTitl
e
()
{
switch
(
this
.
bizType
)
{
case
"biz_cultural_relic"
:
return
"批量上传文物"
;
case
"biz_exhibition"
:
return
"批量上传展览
"
;
default
:
return
"上传文件
"
;
fileTyp
e
()
{
if
(
!
this
.
options
)
{
return
;
}
if
(
this
.
options
.
compressFlag
==
0
)
{
return
".jpg,.png,jpeg
"
;
}
else
{
return
".zip
"
;
}
},
},
...
...
@@ -190,9 +186,15 @@ export default {
};
},
watch
:
{
title
(
value
)
{
this
.
form
.
uploadTitle
=
value
;
options
:
{
handler
(
value
)
{
if
(
value
.
recordsTitle
)
{
this
.
form
.
uploadTitle
=
value
.
recordsTitle
;
this
.
isDisabledTitle
=
true
;
}
},
deep
:
true
,
immediate
:
true
,
},
},
...
...
@@ -210,7 +212,6 @@ export default {
}
else
{
this
.
fileList
=
this
.
$refs
.
upload
.
uploadFiles
;
}
console
.
log
(
"this.fileList"
,
this
.
fileList
);
// return
for
(
let
i
=
0
;
i
<
this
.
fileList
.
length
;
i
++
)
{
this
.
uploadSelf
(
this
.
fileList
[
i
].
raw
,
i
);
//弹窗显示的时候,就根据文件队列的数量调用上传接口
...
...
@@ -225,7 +226,31 @@ export default {
fileList
.
splice
(
1
,
1
);
}
},
// 获取上传的表单
getFormData
(
file
)
{
let
formData
=
new
FormData
();
const
{
bizType
,
flowId
,
compressFlag
,
uploadFileKey
,
uploadTitleKey
}
=
this
.
options
;
const
{
uploadTitle
}
=
this
.
form
;
// 业务类型,文物和展览批量上传时需要
if
(
bizType
)
{
formData
.
append
(
"type"
,
bizType
);
}
// 上传方式:0-单个图片文件;1-zip文件,抠图上传时需要
if
(
compressFlag
==
"0"
||
compressFlag
==
"1"
)
{
formData
.
append
(
"compressFlag"
,
compressFlag
);
}
// 流程Id
if
(
flowId
)
{
formData
.
append
(
"flowId"
,
flowId
);
}
//文件上传的key
const
fileKey
=
uploadFileKey
||
"zipFile"
;
const
titleKey
=
uploadTitleKey
||
"flowTitle"
;
formData
.
append
(
fileKey
,
file
);
formData
.
append
(
titleKey
,
uploadTitle
);
return
formData
;
},
// 上传函数实现逻辑
uploadSelf
(
file
,
index
)
{
const
loading
=
this
.
$loading
({
...
...
@@ -234,14 +259,7 @@ export default {
spinner
:
"el-icon-loading"
,
background
:
"rgba(0, 0, 0, 0.7)"
,
});
let
formData
=
new
FormData
();
formData
.
append
(
"type"
,
this
.
bizType
);
formData
.
append
(
"zipFile"
,
file
);
formData
.
append
(
"flowTitle"
,
this
.
form
.
uploadTitle
);
if
(
this
.
flowId
)
{
formData
.
append
(
"flowId"
,
this
.
flowId
);
}
const
formData
=
this
.
getFormData
(
file
);
importZip
(
formData
,
(
progressEvent
)
=>
this
.
uploadUnderWayCallback
(
progressEvent
,
index
),
...
...
src/icons/svg/zip.svg
0 → 100644
浏览文件 @
fcaeffdb
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
t=
"1698388464699"
class=
"icon"
viewBox=
"0 0 1024 1024"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
p-id=
"2313"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"80"
height=
"80"
><path
d=
"M628.207818 934.314264c1.4239 0.063995 2.783804 0.191986 4.215703 0.191987h321.841339c37.685347-0.039997 68.235195-29.413929 68.267193-65.675376V151.185405c-0.031998-36.253447-30.581847-65.627379-68.267193-65.667376H632.423521c-1.431899 0-2.823801 0.127991-4.215703 0.191986V0.036048L0.036048 80.686369v859.187504l628.17177 82.730175v-88.289784z m0-810.838908c1.391902-0.191986 2.783804-0.415971 4.215703-0.41597h321.841339c16.142863 0 29.269939 12.623111 29.269939 28.158017v717.653469c-0.023998 15.534906-13.119076 28.134019-29.269939 28.150018H632.423521c-1.431899 0-2.823801-0.223984-4.215703-0.41597V123.475356zM242.115003 606.049378l-149.757456-3.679741V578.955286l90.393636-133.374609v-1.183917l-82.122218 1.311908v-36.07746l140.022141-3.519752v26.110161L149.593517 566.076192v1.151919l92.521486 1.407901v37.421365z m75.346695 1.84787l-46.580721-1.151919V405.375508l46.580721-1.151919v203.673659z m178.027465-93.049449c-17.342779 15.374917-42.820985 22.078445-72.15492 21.886459-5.615605 0.031998-11.21521-0.319977-16.774819-1.047926v74.41876l-47.972622-1.183916V405.951467c14.814957-2.815802 35.781481-5.175636 65.739371-5.943582 30.701838-0.767946 52.860278 4.311696 67.835224 15.302923 14.454982 10.447264 24.254292 27.998029 24.254292 48.892557s-7.407478 38.661278-20.894529 50.644434h-0.031997zM426.885993 435.605379c-6.847518-0.079994-13.679037 0.663953-20.326569 2.199845v61.451673c4.183705 0.927935 9.335343 1.215914 16.47884 1.215915 26.406141-0.031998 42.876981-12.911091 42.876981-34.509571 0-19.398634-14.175002-30.741835-38.997254-30.325864l-0.031998-0.031998z m318.753556-296.507123h76.506613v30.357863h-76.506613v-30.357863z m-76.538611 45.436801h76.506613v30.39786h-76.506613v-30.39786z m76.538611 49.724499h76.506613v30.38986h-76.506613V234.259556z m0 95.993241h76.506613v30.349863h-76.506613V330.252797z m-76.538611-48.764566h76.506613v30.357862h-76.506613v-30.357862z m75.770665 376.485491c20.094585 0 39.365228-7.679459 53.572228-21.358496 14.207-13.663038 22.182438-32.205732 22.174439-51.532372l-13.983016-122.095403c0-40.261165-19.934596-72.890868-61.795648-72.890868-41.853053 0-61.755652 32.629703-61.755652 72.890868l-14.015013 122.095403c-0.007999 19.334639 7.967439 37.877333 22.182438 51.548371 14.214999 13.679037 33.493642 21.350497 53.596226 21.342497h0.023998z m-25.078234-133.990566h50.156469v101.936823h-50.156469V523.999155z"
p-id=
"2314"
></path></svg>
\ No newline at end of file
src/router/staticRouter.js
浏览文件 @
fcaeffdb
...
...
@@ -142,7 +142,7 @@ export const staticRouter = [
name
:
'Matting'
,
component
:
()
=>
import
(
'@/views/matting/index'
),
meta
:
{
title
:
'
在线
抠图'
,
title
:
'
智能
抠图'
,
icon
:
'scissors'
}
},
...
...
src/utils/addRouter.js
浏览文件 @
fcaeffdb
...
...
@@ -8,8 +8,8 @@ export function addRouter(menus) {
if
(
isProduct
)
{
return
addServerRouter
(
menus
)
//使用后端路由
}
else
{
//
return addServerRouter(menus) //使用后端路由
return
addLocalRouter
()
//使用前端路由
return
addServerRouter
(
menus
)
//使用后端路由
//
return addLocalRouter()//使用前端路由
}
}
...
...
src/views/culturalRelic/components/InfoEditDialog.vue
浏览文件 @
fcaeffdb
src/views/culturalRelic/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -120,7 +120,11 @@
</div>
<InfoEditDialog
ref=
"InfoEditDialog"
:form=
"form"
@
refresh=
"loadData"
/>
<UploadDialog
ref=
"UploadDialog"
@
update=
"loadData"
/>
<UploadDialog
ref=
"UploadDialog"
@
update=
"loadData"
:options=
"multiUploadOptions"
/>
<ImportRecordDialog
:visible=
"importRecordVisible"
...
...
@@ -157,6 +161,7 @@ import {
getRCDetailByIdTemp
,
getRCDetailById
,
deleteCultralRelic
,
deleteCultralRelicTemp
,
editCulturalRelic
,
}
from
"@/api/culturalRelic"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
...
...
@@ -166,6 +171,7 @@ import PreviewDialog from "./components/PreviewDialog";
import
View3dDialog
from
"./components/View3dDialog"
;
import
{
rules
}
from
"./configs/validateRules"
;
import
boutiqueTool
from
"@/utils/boutique"
;
import
{
downloadFile
}
from
"@/utils/file"
;
export
default
{
components
:
{
InfoEditDialog
,
...
...
@@ -203,6 +209,12 @@ export default {
operates
,
tabActive
:
"unPassed"
,
previewInfo
:
{},
searchParams
:
{},
//记录SearchForm中的搜索条件
//批量上传的参数
multiUploadOptions
:
{
bizType
:
"biz_cultural_relic"
,
//业务类型,文物、展览等biz_cultural_relic——文物,biz_exhibition——展览,如果是文物和展览批量上传必填,抠图不用填
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/bizImport/importZip"
,
//上传的地址,必填
},
};
},
watch
:
{
...
...
@@ -243,6 +255,8 @@ export default {
},
methods
:
{
async
search
(
form
)
{
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
...
...
@@ -250,7 +264,9 @@ export default {
resetPage
()
{
this
.
getCurrentList
().
current
=
1
;
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 加载表格数据
...
...
@@ -259,7 +275,6 @@ export default {
var
params
=
{
page
:
current
,
limit
:
size
,
...
form
,
};
if
(
!
params
.
level
)
{
delete
params
.
level
;
...
...
@@ -267,6 +282,10 @@ export default {
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
const
currentRequest
=
this
.
getCurrentRequest
();
const
res
=
await
currentRequest
(
params
);
if
(
res
.
code
==
0
)
{
...
...
@@ -342,7 +361,6 @@ export default {
case
"multiAdd"
:
this
.
multiAdd
();
break
;
case
"downloadTemplate"
:
this
.
handleDownloadTemplate
();
break
;
...
...
@@ -381,6 +399,14 @@ export default {
return
currentRequest
;
},
getCurrentDeleteRequest
()
{
const
currentRequest
=
this
.
tabActive
==
"passed"
?
deleteCultralRelic
:
deleteCultralRelicTemp
;
return
currentRequest
;
},
async
edit
(
row
)
{
const
{
crId
}
=
row
;
let
detailRes
=
await
getRCDetailByIdTemp
({
crId
});
...
...
@@ -390,7 +416,8 @@ export default {
}
},
async
deleteRow
(
row
)
{
let
deleteRes
=
await
deleteCultralRelic
([
row
.
crId
]);
const
request
=
this
.
getCurrentDeleteRequest
();
let
deleteRes
=
await
request
([
row
.
crId
]);
if
(
deleteRes
.
code
==
0
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
loadData
();
...
...
@@ -405,13 +432,9 @@ export default {
//下载批量导入模板
handleDownloadTemplate
()
{
this
.
loading
=
true
;
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
"/files/zip/crImportTemplate.zip"
;
a
.
download
=
"文物导入模板及操作说明.zip"
;
a
.
style
.
display
=
"none"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
a
.
remove
();
const
href
=
"/files/zip/crImportTemplate.zip"
;
const
dowmloadName
=
"文物导入模板及操作说明.zip"
;
downloadFile
(
href
,
dowmloadName
);
this
.
loading
=
false
;
},
...
...
@@ -421,7 +444,6 @@ export default {
},
// 预览图片
handelPreviewImages
(
images
)
{
// debugger
this
.
imgViewerVisible
=
true
;
this
.
imgList
=
[
images
];
},
...
...
src/views/display/components/ImportRecordDialog.vue
浏览文件 @
fcaeffdb
...
...
@@ -123,7 +123,6 @@ export default {
return
(
Number
(
fileSize
)
/
1024
/
1024
).
toFixed
(
2
)
+
"M"
;
};
},
isToday
(
time
)
{
return
(
time
)
=>
{
if
(
time
)
{
...
...
@@ -145,10 +144,6 @@ export default {
current
:
1
,
total
:
0
,
},
searchForm
:
{
name
:
""
,
status
:
""
,
},
searchConfig
:
[
{
prop
:
"createTime"
,
...
...
src/views/display/components/InfoEditDialog.vue
浏览文件 @
fcaeffdb
...
...
@@ -400,6 +400,11 @@ export default {
type
:
Array
,
default
:
()
=>
[],
},
// 流程id,重传时需要
flowId
:
{
type
:
String
,
default
:
""
,
},
},
computed
:
{
...
mapGetters
([
"userInfo"
,
"dicts"
]),
...
...
src/views/display/components/submit.js
浏览文件 @
fcaeffdb
...
...
@@ -270,6 +270,10 @@ const submit = (submitFlag, $el) => {
...
formUploaded
,
exhibitionUnits
:
unitsUploaded
,
};
// 重传时需要加入flowId
if
(
$el
.
flowId
)
{
params
.
flowId
=
$el
.
flowId
;
}
// 删除一些需要删除的字段
needDelete
.
forEach
(
key
=>
{
delete
params
[
key
]
...
...
@@ -286,7 +290,6 @@ const submit = (submitFlag, $el) => {
$el
.
submitLoading
=
false
;
$el
.
$message
.
success
(
"提交成功!"
);
$el
.
visible
=
false
;
// TODO:删除文件
handleDeleteFiles
(
removedIds
)
},
1000
);
}
...
...
src/views/display/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -135,7 +135,7 @@
/>
<UploadDialog
ref=
"UploadDialog"
bizType=
"biz_exhibition
"
:options=
"multiUploadOptions
"
@
update=
"loadData"
/>
...
...
@@ -231,7 +231,6 @@ export default {
displayTypes
:
{},
currentPageIds
:
[],
//当前的id数组,用于给详情页切换用
multiUploadVisible
:
false
,
//控制批量上传弹窗显示
importRecordVisible
:
false
,
//上传记录
filesList
:
[],
//上传当中的文件队列
uploadCount
:
0
,
//处于上传中的文件数量,当等于fileList的时候就关闭弹窗,请求完毕一个就++
cancelUploadArr
:
[],
//保存每个文件上传接口对应的取消请求的函数[fn,fn,fn...]
...
...
@@ -241,6 +240,12 @@ export default {
unPassedTitle
,
operates
,
curPreview
:
{},
//当前预览的对象
searchParams
:
{},
//记录SearchForm中的搜索条件
//批量上传的参数
multiUploadOptions
:
{
bizType
:
"biz_exhibition"
,
//业务类型,文物、展览等biz_cultural_relic——文物,biz_exhibition——展览,如果是文物和展览批量上传必填,抠图不用填
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/bizImport/importZip"
,
//上传的地址,必填
},
};
},
computed
:
{
...
...
@@ -331,12 +336,27 @@ export default {
this
.
tabActive
==
"passed"
?
getListPer
:
getListPerTemp
;
return
currentRequest
;
},
// 获取当前预览请求
getCurrentPreviewRequest
()
{
const
currentRequest
=
this
.
tabActive
==
"passed"
?
getDisplayById
:
getDisplayByIdTemp
;
return
currentRequest
;
},
// 获取当前删除请求
getCurrentDeleteRequest
()
{
const
currentRequest
=
this
.
tabActive
==
"passed"
?
deleteDisplay
:
deleteDisplayTemp
;
return
currentRequest
;
},
async
search
(
form
)
{
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
...
...
@@ -346,19 +366,22 @@ export default {
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
const
currentRequest
=
this
.
getCurrentRequest
();
const
res
=
await
currentRequest
(
params
);
if
(
res
.
code
==
0
)
{
this
.
setList
(
res
.
data
);
}
},
// 操作
handleOperation
(
value
,
row
)
{
switch
(
value
.
type
)
{
case
"add"
:
this
.
openDialog
(
"InfoEditDialog"
);
this
.
$appCommon
.
openDialog
(
this
,
"InfoEditDialog"
);
case
"view"
:
this
.
handleView
(
row
);
break
;
...
...
@@ -369,19 +392,16 @@ export default {
this
.
handleDelete
(
row
);
break
;
case
"multiAdd"
:
this
.
openDialog
(
"UploadDialog"
);
this
.
$appCommon
.
openDialog
(
this
,
"UploadDialog"
);
break
;
case
"downloadTemplate"
:
this
.
handleDownloadTemplate
();
break
;
case
"viewImportRecord"
:
this
.
importRecordVisible
=
true
;
this
.
$appCommon
.
openDialog
(
this
,
"ImportRecordDialog"
)
;
break
;
}
},
openDialog
(
refName
)
{
this
.
$refs
[
refName
].
visible
=
true
;
},
// 预览展览
async
handleView
(
row
)
{
...
...
@@ -396,19 +416,13 @@ export default {
});
if
(
res
.
data
)
{
this
.
curPreview
=
res
.
data
;
this
.
openDialog
(
"PreviewDialog"
);
this
.
$appCommon
.
openDialog
(
this
,
"PreviewDialog"
);
}
else
{
this
.
$message
.
error
(
"暂无数据!"
);
}
}
},
getCurrentPreviewRequest
()
{
const
currentRequest
=
this
.
tabActive
==
"passed"
?
getDisplayById
:
getDisplayByIdTemp
;
return
currentRequest
;
},
// 编辑展览
async
handleEdit
(
row
)
{
let
editRes
=
await
getDisplayByIdTemp
({
...
...
@@ -420,13 +434,8 @@ export default {
// 删除展览
async
handleDelete
(
row
)
{
let
request
;
if
(
this
.
tabActive
==
"unPassed"
)
{
request
=
deleteDisplayTemp
;
}
else
{
request
=
deleteDisplay
;
}
let
deleteRes
=
await
request
([
row
.
exhibitionId
]);
const
request
=
this
.
getCurrentDeleteRequest
();
const
deleteRes
=
await
request
([
row
.
exhibitionId
]);
if
(
deleteRes
.
code
===
0
)
{
this
.
loadData
();
this
.
$message
.
success
(
"删除成功!"
);
...
...
src/views/displayApproval/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -58,12 +58,12 @@
ref=
"displayInfo"
:form=
"resubmitDisplayInfo"
@
refresh=
"loadData"
:flowId=
"currentFlowId"
/>
<UploadDialog
ref=
"UploadDialog"
@
update=
"loadData"
:title=
"currentFlowTitle"
:flowId=
"currentFlowId"
:options=
"resubmitOptions"
/>
</div>
</template>
...
...
@@ -108,7 +108,7 @@ export default {
current
:
1
,
total
:
0
,
},
searchParams
:
""
,
searchParams
:
{},
//记录SearchForm中的搜索条件
searchConfig
:
[
{
prop
:
"title"
,
...
...
@@ -167,7 +167,12 @@ export default {
resubmitDisplayInfo
:
{},
//重传的手动添加的展览信息
resubmitCrMulti
:
{},
//重传的批量导入的文物信息
resubmitDisplayMulti
:
{},
//重传的整量导入的展览信息
currentFlowTitle
:
""
,
//当前重传的流程的title
resubmitOptions
:
{
recordsTitle
:
""
,
//上传时的记录标题,非必填
bizType
:
""
,
//业务类型,文物、展览等biz_cultural_relic——文物,biz_exhibition——展览,如果是文物和展览批量上传必填,抠图不用填
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/bizImport/importZip"
,
//上传的地址,必填
flowId
:
""
,
//流程ID,重传时需要,非必填
},
};
},
computed
:
{
...
...
@@ -189,33 +194,47 @@ export default {
},
},
async
created
()
{
await
this
.
$store
.
dispatch
(
"dict/getDictList"
,
[
"displayType"
]);
this
.
loadData
();
},
methods
:
{
// 搜索
async
search
(
form
)
{
// 记录搜索的参数
this
.
searchParams
=
form
;
// 重置分页到第一页
this
.
resetPage
();
this
.
loadData
(
form
);
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 加载数据
async
loadData
(
form
)
{
this
.
loading
=
true
;
cons
t
params
=
{
le
t
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
let
res
=
await
getFlowListPagePer
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
},
// 表格操作
handleOperation
(
value
,
row
)
{
const
{
type
}
=
value
;
const
{
type
,
id
}
=
value
;
this
.
currentFlowId
=
id
;
if
(
type
==
"view"
||
type
==
"approval"
)
{
this
.
viewOrApproval
(
type
,
row
);
}
else
{
...
...
@@ -239,27 +258,28 @@ export default {
async
resubmit
(
row
)
{
const
{
addWay
,
sourceType
,
id
,
title
}
=
row
;
const
isManual
=
addWay
==
"手动添加"
;
this
.
currentFlowId
=
id
;
this
.
resubmitOptions
.
flowId
=
id
;
switch
(
sourceType
)
{
case
"文物"
:
if
(
isManual
)
{
const
data
=
await
this
.
getSourceDetail
(
this
.
currentFlowI
d
);
const
data
=
await
this
.
getSourceDetail
(
i
d
);
this
.
resubmitCrInfo
=
data
;
this
.
openResubmitDialog
(
"CrInfo"
);
this
.
$appCommon
.
openDialog
(
this
,
"CrInfo"
);
}
else
{
this
.
currentFlowTitle
=
title
;
this
.
openResubmitDialog
(
"UploadDialog"
);
this
.
resubmitOptions
.
recordsTitle
=
title
;
this
.
resubmitOptions
.
bizType
=
"biz_cultural_relic"
;
this
.
$appCommon
.
openDialog
(
this
,
"UploadDialog"
);
}
break
;
case
"展览展示"
:
if
(
isManual
)
{
const
data
=
await
this
.
getSourceDetail
(
this
.
currentFlowI
d
);
const
data
=
await
this
.
getSourceDetail
(
i
d
);
this
.
resubmitDisplayInfo
=
data
;
this
.
openResubmitDialog
(
"DisplayInfo"
);
this
.
resubmitOptions
.
bizType
=
"biz_exhibition"
;
this
.
$appCommon
.
openDialog
(
this
,
"DisplayInfo"
);
}
else
{
this
.
currentFlow
Title
=
title
;
this
.
openResubmitDialog
(
"UploadDialog"
);
this
.
resubmitOptions
.
records
Title
=
title
;
this
.
$appCommon
.
openDialog
(
this
,
"UploadDialog"
);
}
break
;
}
...
...
@@ -283,16 +303,6 @@ export default {
});
},
// 打开文物编辑重传弹窗
openResubmitDialog
(
name
)
{
this
.
$refs
[
name
].
visible
=
true
;
},
// 关闭文物编辑重传弹窗
closeResubmitDialog
(
name
)
{
this
.
$refs
[
name
].
visible
=
false
;
},
// 多选
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
...
...
src/views/literature/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -65,7 +65,7 @@ import { title, operates, operations } from "./config";
import
{
editLiterature
,
deleteLt
}
from
"@/api/literature"
;
import
InfoEditDialog
from
"./components/InfoEditDialog"
;
import
{
downloadFile
,
previewFile
,
downloadBlob
}
from
"@/utils/file"
;
import
{
mapActions
}
from
"vuex"
;
export
default
{
components
:
{
InfoEditDialog
,
...
...
@@ -119,6 +119,7 @@ export default {
remark
:
""
,
//备注
},
loading
:
false
,
searchParams
:
{},
};
},
...
...
@@ -146,89 +147,102 @@ export default {
this
.
loadData
();
},
methods
:
{
...
mapActions
(
"dict"
,
[
"getLtList"
]),
// 搜索
async
search
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
const
res
=
await
this
.
$store
.
dispatch
(
"dict/getLtList"
,
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
// 记录搜索的参数
this
.
searchParams
=
form
;
// 重置分页到第一页
this
.
resetPage
();
this
.
loadData
(
form
);
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
const
res
=
await
this
.
$store
.
dispatch
(
"dict/getLtList"
,
params
);
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
const
res
=
await
this
.
getLtList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
},
async
handleOperation
(
value
,
row
)
{
handleOperation
(
value
,
row
)
{
switch
(
value
.
type
)
{
case
"add"
:
this
.
drawerVisible
=
true
;
break
;
case
"view"
:
if
(
row
.
files
&&
row
.
files
.
length
>
0
&&
row
.
files
[
0
].
url
)
{
previewFile
(
row
.
files
[
0
].
url
,
row
.
name
);
}
else
{
let
m
=
this
.
$message
.
info
(
"暂无文献附件!"
);
setTimeout
(()
=>
{
m
.
close
();
},
1500
);
}
this
.
view
(
row
);
break
;
case
"download"
:
if
(
row
.
files
&&
row
.
files
.
length
>
0
&&
row
.
files
[
0
].
url
)
{
let
start
=
this
.
$message
.
info
(
"正在准备下载..."
);
let
url
=
"/files"
+
row
.
files
[
0
].
url
.
split
(
"files"
)[
1
];
downloadBlob
(
url
,
row
.
name
,
"pdf"
)
this
.
download
(
row
);
break
;
case
"edit"
:
this
.
form
=
row
;
this
.
drawerVisible
=
true
;
break
;
case
"delete"
:
this
.
handleDelete
();
break
;
}
},
// 预览
view
(
row
)
{
const
{
files
}
=
row
;
const
hasFileUrl
=
files
.
length
>
0
&&
files
[
0
].
url
;
if
(
!
hasFileUrl
)
{
this
.
$message
.
info
(
"暂无文献附件!"
);
return
;
}
else
{
previewFile
(
row
.
files
[
0
].
url
,
row
.
name
);
}
},
// 下载
download
(
row
)
{
const
{
files
}
=
row
;
const
hasFileUrl
=
files
.
length
>
0
&&
files
[
0
].
url
;
if
(
!
hasFileUrl
)
{
this
.
$message
.
error
(
"暂无文献!"
);
return
;
}
else
{
let
msg
=
this
.
$message
.
info
(
"正在准备下载..."
);
let
url
=
"/files"
+
files
[
0
].
url
.
split
(
"files"
)[
1
];
const
{
name
}
=
row
;
downloadBlob
(
url
,
name
,
"pdf"
)
.
then
((
res
)
=>
{
start
.
close
();
msg
.
close
();
this
.
$message
.
success
(
"下载成功!"
);
})
.
catch
((
err
)
=>
{
start
.
close
();
msg
.
close
();
this
.
$message
.
error
(
"下载失败:"
+
err
);
});
}
else
{
let
m
=
this
.
$message
.
info
(
"暂无文献!"
);
setTimeout
(()
=>
{
m
.
close
();
},
1500
);
}
break
;
case
"edit"
:
this
.
form
=
row
;
this
.
drawerVisible
=
true
;
break
;
case
"delete"
:
},
// 删除
async
handleDelete
(
row
)
{
let
deleteRes
=
await
deleteLt
([
row
.
literatureId
]);
if
(
deleteRes
.
code
==
0
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
loadData
();
}
break
;
}
},
async
handleChangeStatus
(
row
)
{
const
callback
=
this
.
loadData
;
this
.
$bizCommon
.
changeStatus
(
row
,
editLiterature
,
callback
);
...
...
src/views/log/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -153,6 +153,7 @@ export default {
},
],
loading
:
false
,
searchParams
:
{},
};
},
...
...
@@ -177,41 +178,35 @@ export default {
this
.
loadData
();
},
methods
:
{
// 搜索
async
search
(
form
)
{
this
.
loading
=
true
;
this
.
list
.
current
=
1
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
params
.
createTime
&&
params
.
createTime
.
length
>
0
)
{
params
.
startTime
=
params
.
createTime
[
0
];
params
.
endTime
=
params
.
createTime
[
1
];
}
if
(
params
.
createTime
)
{
delete
params
.
createTime
;
}
let
res
=
await
getLogList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
let
res
=
await
getLogList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
...
...
@@ -246,6 +241,6 @@ export default {
}
::v-deep
.el-form-item
{
margin-bottom
:
20px
;
margin-bottom
:
20px
!
important
;
}
</
style
>
src/views/matting/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -8,14 +8,6 @@
/>
<div
class=
"tools"
>
<div
class=
"tools-item"
>
<!--
<el-button
size=
"mini"
type=
"primary"
@
click
.
native=
"handleOperation(
{ type: 'add' })"
icon="el-icon-upload2"
>
上传
</el-button
>
-->
<el-dropdown
@
command=
"handleCommand"
>
<PermissionButton
button
...
...
@@ -27,10 +19,8 @@
上传
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</PermissionButton>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
".jpg,.jpeg,.png"
>
上传图片
</el-dropdown-item
>
<el-dropdown-item
command=
".zip"
>
上传压缩包
</el-dropdown-item>
<el-dropdown-item
:command=
"TYPE_IMG"
>
上传图片
</el-dropdown-item>
<el-dropdown-item
:command=
"TYPE_ZIP"
>
上传压缩包
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
...
...
@@ -72,9 +62,8 @@
</el-pagination>
<UploadDialog
ref=
"UploadDialog"
bizType=
"biz_matting"
@
update=
"loadData"
:
fileType=
"currentUploadType
"
:
options=
"uploadOptions
"
/>
<PreviewDialog
ref=
"PreviewDialog"
:detail=
"currentPreviewItem"
/>
</div>
...
...
@@ -92,6 +81,7 @@ import { operates, operations, tableTitle, searchConfig } from "./configs/list";
import
{
records
}
from
"./mock"
;
import
UploadDialog
from
"@/components/UploadDialog"
;
import
PreviewDialog
from
"./components/PreviewDialog"
;
import
{
getMattingList
}
from
"@/api/matting"
;
export
default
{
components
:
{
UploadDialog
,
...
...
@@ -100,7 +90,7 @@ export default {
data
()
{
return
{
list
:
{
records
,
records
:
[]
,
size
:
10
,
current
:
1
,
total
:
0
,
...
...
@@ -115,6 +105,16 @@ export default {
tableTitle
,
currentUploadType
:
".zip"
,
//当前上传的文件类型
currentPreviewItem
:
{},
//当前点击的表格项目
TYPE_IMG
:
"0"
,
//单个图片文件
TYPE_ZIP
:
"1"
,
//zip文件
uploadOptions
:
{
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/bizMattingRecords/mattingImage"
,
//上传的地址,必填
compressFlag
:
"0"
,
//上传方式:0-单个图片文件;1-zip文件。抠图时需要,非必填
uploadFileKey
:
"file"
,
uploadTitleKey
:
"title"
,
},
searchParams
:
{},
};
},
async
created
()
{
...
...
@@ -122,6 +122,7 @@ export default {
},
methods
:
{
async
search
(
form
)
{
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
...
...
@@ -130,23 +131,27 @@ export default {
this
.
list
.
current
=
1
;
},
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 加载表格数据
async
loadData
(
form
)
{
// const { current, size } = this.list;
// var params = {
// page: current,
// limit: size,
// ...form,
// };
// const res = await currentRequest(params);
// if (res.code == 0) {
// this.setList(res.data);
// }
const
{
current
,
size
}
=
this
.
list
;
var
params
=
{
page
:
current
,
limit
:
size
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
const
res
=
await
getMattingList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
handleCommand
(
type
)
{
this
.
currentUploadType
=
type
;
this
.
uploadOptions
.
compressFlag
=
type
;
this
.
openDialog
(
"UploadDialog"
);
},
...
...
src/views/product/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -98,10 +98,6 @@ export default {
current
:
1
,
total
:
0
,
},
searchForm
:
{
name
:
""
,
status
:
""
,
},
searchConfig
:
[
{
prop
:
"title"
,
...
...
@@ -137,6 +133,7 @@ export default {
orgTreeData
:
[],
imgViewerVisible
:
false
,
imgList
:
[],
searchParams
:
{},
//记录SearchForm中的搜索条件
};
},
computed
:
{
...
...
@@ -165,31 +162,33 @@ export default {
},
methods
:
{
async
search
(
form
)
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
let
res
=
await
getCcProduct
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
let
res
=
await
getCcProduct
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
...
...
src/views/role/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -122,6 +122,7 @@ export default {
dataScopeForm
:
{},
//编辑数据权限的表单
dataEditDialog
:
false
,
//编辑数据的对话框
loading
:
false
,
searchParams
:
{},
//记录SearchForm中的搜索条件
};
},
...
...
@@ -150,33 +151,32 @@ export default {
this
.
loadData
();
},
methods
:
{
// 搜索
async
search
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
const
res
=
await
getRoleList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
const
res
=
await
getRoleList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
...
...
@@ -192,10 +192,7 @@ export default {
};
break
;
case
"edit"
:
const
{
id
}
=
row
;
let
res
=
await
getRoleById
(
id
);
this
.
form
=
res
.
data
;
this
.
drawerVisible
=
true
;
this
.
edit
();
break
;
case
"delete"
:
let
deleteRes
=
await
deleteRole
(
row
.
id
);
...
...
@@ -211,6 +208,12 @@ export default {
}
},
async
edit
(
row
)
{
const
{
id
}
=
row
;
let
res
=
await
getRoleById
(
id
);
this
.
form
=
res
.
data
;
this
.
drawerVisible
=
true
;
},
async
handleChangeStatus
(
row
)
{
const
callback
=
this
.
loadData
;
this
.
$bizCommon
.
changeStatus
(
row
,
upadateRole
,
callback
);
...
...
src/views/user/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -170,6 +170,7 @@ export default {
currentRoleData
:
{},
currentId
:
null
,
loading
:
false
,
searchParams
:
{},
};
},
mounted
()
{
...
...
@@ -186,33 +187,37 @@ export default {
}
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
deptNo
:
this
.
currentDeptNo
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
const
res
=
await
getUserList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
},
// 搜索
async
search
(
form
)
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
deptNo
:
this
.
currentDeptNo
,
...
form
,
};
const
res
=
await
getUserList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
...
...
src/views/virtual/index.vue
浏览文件 @
fcaeffdb
...
...
@@ -133,6 +133,7 @@ export default {
orgTreeData
:
[],
imgViewerVisible
:
false
,
imgList
:
[],
searchParams
:
{},
};
},
computed
:
{
...
...
@@ -161,34 +162,33 @@ export default {
},
methods
:
{
async
search
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
...
form
,
};
if
(
params
.
status
==
""
)
{
delete
params
.
status
;
}
let
res
=
await
getVirtualListPer
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
this
.
loading
=
false
;
// 记录搜索的参数
this
.
searchParams
=
form
;
this
.
resetPage
();
this
.
loadData
(
form
);
},
// 重置
reset
()
{
this
.
searchParams
=
{};
this
.
loadData
();
},
// 清除分页到初始状态
resetPage
()
{
this
.
list
.
current
=
1
;
},
// 加载表格数据
async
loadData
()
{
async
loadData
(
form
)
{
this
.
loading
=
true
;
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
const
queryParams
=
form
||
this
.
searchParams
;
if
(
Object
.
keys
(
queryParams
))
{
params
=
{
...
params
,
...
queryParams
};
}
let
res
=
await
getVirtualListPer
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论