Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
6b90e618
提交
6b90e618
authored
10月 18, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加列表序号;修改文物来源为字典取值
上级
020edfe8
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
156 行增加
和
126 行删除
+156
-126
TableOperation.vue
src/components/Table/TableOperation.vue
+10
-4
TablePage.vue
src/components/Table/TablePage.vue
+4
-0
index.js
src/utils/index.js
+17
-33
ImportRecordDialog.vue
src/views/culturalRelic/components/ImportRecordDialog.vue
+42
-10
InfoEditDialog.vue
src/views/culturalRelic/components/InfoEditDialog.vue
+70
-71
config.js
src/views/culturalRelic/config.js
+3
-2
index.vue
src/views/culturalRelic/index.vue
+4
-2
InfoEditDialog.vue
src/views/display/components/InfoEditDialog.vue
+2
-1
DataEditDialog.vue
src/views/role/components/DataEditDialog.vue
+2
-1
vue.config.js
vue.config.js
+2
-2
没有找到文件。
src/components/Table/TableOperation.vue
浏览文件 @
6b90e618
...
...
@@ -2,7 +2,10 @@
<span>
<span
v-for=
"(op, index) in operations"
:key=
"index"
>
<span
v-if=
"op.type == 'delete'"
>
<el-popconfirm
title=
"确定删除吗?"
@
onConfirm=
"clickOperation(op)"
>
<el-popconfirm
:title=
"deleteTitle ? deleteTitle : '确定删除吗?'"
@
onConfirm=
"clickOperation(op)"
>
<el-button
type=
"danger"
size=
"mini"
...
...
@@ -37,6 +40,9 @@ export default {
rawData
:
{
type
:
Object
,
},
deleteTitle
:
{
type
:
String
,
},
},
data
()
{
return
{
...
...
@@ -44,9 +50,9 @@ export default {
edit
:
"el-icon-edit"
,
view
:
"el-icon-view"
,
delete
:
"el-icon-delete"
,
download
:
'el-icon-download'
,
dataPermission
:
"el-icon-key"
,
editRole
:
"el-icon-user"
download
:
"el-icon-download"
,
dataPermission
:
"el-icon-key"
,
editRole
:
"el-icon-user"
,
},
};
},
...
...
src/components/Table/TablePage.vue
浏览文件 @
6b90e618
...
...
@@ -11,6 +11,7 @@
@
selection-change=
"handleSelectionChange"
@
current-change=
"handleCurrentChange"
>
<el-table-column
type=
"index"
width=
"50"
label=
"序号"
>
</el-table-column>
<el-table-column
v-if=
"hasMultiSelection"
type=
"selection"
width=
"55"
/>
<el-table-column
v-for=
"(item, index) in tableTitle"
...
...
@@ -62,6 +63,9 @@
<
template
v-else-if=
"item.prop == 'themeType'"
>
<slot
name=
"themeType"
:scope=
"scope.row"
></slot>
</
template
>
<
template
v-else-if=
"item.needTimeTag"
>
<slot
name=
"createTime"
:scope=
"scope.row"
></slot>
</
template
>
<span
v-else
>
{{ scope.row[item.prop] }}
</span>
</template>
</el-table-column>
...
...
src/utils/index.js
浏览文件 @
6b90e618
...
...
@@ -96,6 +96,13 @@ export function formatTime(time, option) {
}
}
// 获取昨天
export
function
getYestoday
()
{
let
d
=
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
return
parseTime
(
new
Date
(
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
),
"{yy}-{mm}-{dd}"
)
}
/**
* @param {string} url
* @returns {Object}
...
...
@@ -185,38 +192,15 @@ export function getFullUrl(url) {
* 增加万单位
* @param num
*/
export
function
formatNum
(
num
)
{
num
=
Number
(
num
);
if
(
num
==
0
)
{
return
num
+
''
;
}
else
if
(
num
>
0
&&
num
<
10000
)
{
return
num
+
''
;
}
else
{
return
(
num
/
10000
).
toFixed
(
1
)
+
'w'
;
}
export
function
formatNum
(
num
)
{
num
=
Number
(
num
);
if
(
num
==
0
)
{
return
num
+
''
;
}
else
if
(
num
>
0
&&
num
<
10000
)
{
return
num
+
''
;
}
else
{
return
(
num
/
10000
).
toFixed
(
1
)
+
'w'
;
}
}
// /**
// * 树 转 列表
// * 广度优先,先进先出
// * @param {Array} tree 树状数据
// * @param {String} childKey children的key
// */
// export function treeToList(tree, childKey = 'children') {
// let stack = tree.concat([])
// let data = []
// while (stack.length !== 0) {
// // 从stack中拿出来分析
// let shift = stack.shift() // stack.pop() 先进后出
// data.push(shift)
// let children = shift[childKey]
// if (children) {
// for (let i = 0; i < children.length; i++) {
// // 把数据放入stack中
// stack.push(children[i])
// }
// }
// }
// return data
// }
src/views/culturalRelic/components/ImportRecordDialog.vue
浏览文件 @
6b90e618
...
...
@@ -23,10 +23,27 @@
<template
v-slot:fileSize=
"scope"
>
{{
getFileSize
(
scope
.
scope
.
fileSize
)
}}
</
template
>
<
template
v-slot:createTime=
"scope"
>
{{
scope
.
scope
.
createTime
}}
<el-tag
size=
"mini"
type=
"success"
v-if=
"isToday(scope.scope.createTime)"
>
今天
</el-tag
>
<el-tag
size=
"mini"
type=
"primary"
v-if=
"getYestoday == scope.scope.createTime.split(' ')[0]"
>
昨天
</el-tag>
</
template
>
<
template
v-slot:operates=
"scope"
>
<TableOperation
:operations=
"tableOperations"
:rawData=
"scope.scope.row"
:deleteTitle=
"'点击确定将会删除该批次导入的所有文物,确定删除?'"
@
handleOperation=
"handleOperation"
></TableOperation>
</
template
>
...
...
@@ -44,7 +61,7 @@
</el-pagination>
</div>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click
.
native=
"handleClose"
>
关闭
</el-button>
<el-button
type=
"primary"
@
click
.
native=
"handleClose"
>
关闭
</el-button>
</div>
</el-dialog>
</template>
...
...
@@ -52,7 +69,12 @@
<
script
>
import
TablePage
from
"@/components/Table/TablePage.vue"
;
import
TableOperation
from
"@/components/Table/TableOperation.vue"
;
import
{
importRecordsTitle
,
importOperates
,
importOperations
}
from
"../config"
;
import
{
importRecordsTitle
,
importOperates
,
importOperations
,
}
from
"../config"
;
import
{
parseTime
,
getYestoday
}
from
"@/utils/index"
;
import
{
getImportListPage
,
deleteByBatchNum
}
from
"@/api/file"
;
import
SearchBar
from
"@/components/SearchBar"
;
export
default
{
...
...
@@ -96,6 +118,22 @@ export default {
return
(
Number
(
fileSize
)
/
1024
/
1024
).
toFixed
(
2
)
+
"M"
;
};
},
isToday
(
time
)
{
return
(
time
)
=>
{
if
(
time
)
{
let
timeDate
=
time
.
split
(
" "
)[
0
];
let
today
=
parseTime
(
new
Date
(),
"{yy}-{mm}-{dd}"
);
return
timeDate
==
today
;
}
else
{
return
false
;
}
};
},
getYestoday
()
{
console
.
log
(
getYestoday
());
return
getYestoday
();
},
},
data
()
{
return
{
...
...
@@ -166,18 +204,13 @@ export default {
}
},
async
handleOperation
(
value
,
row
)
{
console
.
log
(
"handleOperation"
,
value
,
row
);
switch
(
value
.
type
)
{
case
"add"
:
this
.
editVisible
=
true
;
break
;
case
"view"
:
break
;
case
"delete"
:
let
{
batchNum
,
type
,
id
}
=
row
;
let
{
batchNum
,
type
,
id
}
=
row
;
let
deleteRes
=
await
deleteByBatchNum
({
batchNum
,
type
});
if
(
deleteRes
.
code
==
0
)
{
this
.
$message
.
success
(
"删除成功!"
);
this
.
$emit
(
"reload"
);
this
.
loadData
();
}
break
;
...
...
@@ -196,7 +229,6 @@ export default {
this
.
loadData
();
},
handleClose
()
{
this
.
$emit
(
"handleClose"
);
},
...
...
src/views/culturalRelic/components/InfoEditDialog.vue
浏览文件 @
6b90e618
...
...
@@ -35,7 +35,21 @@
placeholder=
"请输入文物名称"
></el-input>
</el-form-item>
<el-form-item
label=
"馆藏单位"
:label-width=
"formLabelWidth"
prop=
"deptId"
>
<el-cascader
style=
"width: 100%"
v-model=
"dialogForm.deptId"
:options=
"orgTreeData"
:props=
"optionProps"
placeholder=
"请选择馆藏单位"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item
label=
"文物类别"
:label-width=
"formLabelWidth"
>
<el-select
v-model=
"dialogForm.type"
...
...
@@ -52,6 +66,28 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"文物质地"
:label-width=
"formLabelWidth"
>
<el-cascader
style=
"width: 100%"
v-model=
"dialogForm.textureType"
:options=
"culturalRelicTextureType"
:props=
"culturalRelicTextureProps"
placeholder=
"请选择文物质地"
filterable
>
</el-cascader>
</el-form-item>
<el-form-item
label=
"文物年代"
:label-width=
"formLabelWidth"
>
<el-cascader
style=
"width: 100%"
v-model=
"dialogForm.years"
:options=
"culturalRelicYears"
:props=
"culturalRelicYearsProps"
placeholder=
"请选择文物年代"
filterable
>
</el-cascader>
</el-form-item>
<el-form-item
label=
"文物级别"
:label-width=
"formLabelWidth"
>
<el-select
v-model=
"dialogForm.level"
...
...
@@ -68,30 +104,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"文物质地"
:label-width=
"formLabelWidth"
>
<el-cascader
style=
"width: 100%"
v-model=
"dialogForm.textureType"
:options=
"culturalRelicTextureType"
:props=
"culturalRelicTextureProps"
placeholder=
"请选择文物质地"
filterable
>
</el-cascader>
<!--
<el-select
v-model=
"dialogForm.textureType"
placeholder=
"请选择文物质地"
style=
"width: 100%"
>
<el-option
v-for=
"(value, key) in culturalRelicTexture"
:key=
"key"
:label=
"value"
:value=
"key"
>
</el-option>
</el-select>
-->
</el-form-item>
<el-form-item
label=
"具体尺寸"
:label-width=
"formLabelWidth"
>
<el-input
v-model=
"dialogForm.detailSize"
...
...
@@ -99,23 +112,8 @@
placeholder=
"请输入具体尺寸"
></el-input>
</el-form-item>
<el-form-item
label=
"文物年代"
:label-width=
"formLabelWidth"
>
<el-cascader
style=
"width: 100%"
v-model=
"dialogForm.years"
:options=
"culturalRelicYears"
:props=
"culturalRelicYearsProps"
placeholder=
"请选择文物年代"
filterable
>
</el-cascader>
</el-form-item>
<el-form-item
label=
"文物数量"
:label-width=
"formLabelWidth"
>
<!--
<el-input
v-model=
"dialogForm.num"
autocomplete=
"off"
placeholder=
"请输入文物数量"
></el-input>
-->
<el-input-number
v-model=
"dialogForm.num"
:min=
"1"
...
...
@@ -123,31 +121,7 @@
label=
"请输入文物数量"
></el-input-number>
</el-form-item>
<el-form-item
label=
"馆藏单位"
:label-width=
"formLabelWidth"
prop=
"deptId"
>
<el-cascader
style=
"width: 100%"
v-model=
"dialogForm.deptId"
:options=
"orgTreeData"
:props=
"optionProps"
placeholder=
"请选择馆藏单位"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item
label=
"馆藏介绍"
:label-width=
"formLabelWidth"
prop=
"intro"
>
<VueQuillEditor
v-model=
"dialogForm.intro"
placeholder=
"请输入馆藏介绍"
/>
</el-form-item>
<el-form-item
label=
"关联文献"
:label-width=
"formLabelWidth"
>
<el-select
v-model=
"literatureValues"
...
...
@@ -171,11 +145,21 @@
</el-form-item>
<el-form-item
label=
"来源方式"
:label-width=
"formLabelWidth"
>
<el-
inpu
t
<el-
selec
t
v-model=
"dialogForm.sourceWay"
autocomplete=
"off"
placeholder=
"请输入来源方式"
></el-input>
placeholder=
"请选择来源方式"
style=
"width: 100%"
filterable
>
<el-option
v-for=
"(value, key) in dicts.culturalRelicSourceWay"
:key=
"key"
:label=
"value"
:value=
"key"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否上架"
:label-width=
"formLabelWidth"
>
...
...
@@ -211,6 +195,16 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"馆藏介绍"
:label-width=
"formLabelWidth"
prop=
"intro"
>
<VueQuillEditor
v-model=
"dialogForm.intro"
placeholder=
"请输入馆藏介绍"
/>
</el-form-item>
<el-form-item
label=
"文物封面"
:label-width=
"formLabelWidth"
>
<ManualUploader
:files=
"faceImage"
...
...
@@ -284,6 +278,7 @@ import { mapGetters } from "vuex";
import
{
uploadV1
}
from
"@/utils/file"
;
import
{
deleteFiles
}
from
"@/api/file"
;
import
VueQuillEditor
from
"@/components/VueQuillEditor"
;
export
default
{
name
:
"InfoEditDialog"
,
components
:
{
...
...
@@ -447,7 +442,9 @@ export default {
await
this
.
$store
.
dispatch
(
"dict/getDictList"
,
[
"culturalRelicLevel"
,
"culturalRelicType"
,
"culturalRelicSourceWay"
]);
console
.
log
(
this
.
dicts
.
culturalRelicSourceWay
);
let
res
=
await
this
.
$store
.
dispatch
(
"dict/getDictTree"
,
[
"culturalRelicTextureType"
,
"culturalRelicYears"
,
...
...
@@ -456,7 +453,8 @@ export default {
this
.
culturalRelicYears
=
res
.
culturalRelicYears
;
this
.
$store
.
dispatch
(
"org/getMuseumTreeData"
,
false
).
then
((
res
)
=>
{
this
.
orgTreeData
=
res
[
0
].
children
;
//去掉根节点的文旅厅
// this.orgTreeData = res[0].children; //去掉根节点的文旅厅
this
.
orgTreeData
=
res
;
});
},
methods
:
{
...
...
@@ -698,6 +696,7 @@ export default {
this
.
videos
=
[];
this
.
audios
=
[];
this
.
faceImage
=
[];
this
.
$refs
.
form
.
resetFields
();
},
refresh
()
{
...
...
src/views/culturalRelic/config.js
浏览文件 @
6b90e618
...
...
@@ -141,7 +141,8 @@ export const operations = [
export
const
importRecordsTitle
=
[{
prop
:
"createTime"
,
label
:
"导入时间"
,
columnAlign
:
"center"
,
columnAlign
:
"left"
,
needTimeTag
:
true
},
{
prop
:
"batchNum"
,
...
...
@@ -152,7 +153,7 @@ export const importRecordsTitle = [{
prop
:
"fileName"
,
label
:
"文件名称"
,
columnAlign
:
"center"
,
width
:
26
0
width
:
30
0
},
{
prop
:
"fileSize"
,
...
...
src/views/culturalRelic/index.vue
浏览文件 @
6b90e618
...
...
@@ -126,6 +126,7 @@
<ImportRecordDialog
:visible=
"importRecordVisible"
@
reload=
"loadData"
@
handleClose=
"handleImportRecordClose"
/>
...
...
@@ -209,7 +210,7 @@ export default {
textureType
:
""
,
//质地(字典值)
detailSize
:
""
,
// 具体尺寸
years
:
""
,
//年代
num
:
""
,
//数量
num
:
1
,
//数量
deptId
:
""
,
//收藏馆id——新增传当前用户的deptId
intro
:
""
,
//馆藏介绍
literature
:
""
,
//关联文献。id1,id2,id3
...
...
@@ -512,7 +513,8 @@ export default {
handleEditClose
()
{
this
.
editVisible
=
false
;
this
.
form
=
{
status
:
0
,
status
:
1
,
num
:
1
,
};
},
...
...
src/views/display/components/InfoEditDialog.vue
浏览文件 @
6b90e618
...
...
@@ -466,7 +466,8 @@ export default {
"displayCharacter"
,
]);
this
.
$store
.
dispatch
(
"org/getMuseumTreeData"
,
false
).
then
((
res
)
=>
{
this
.
orgTreeData
=
res
[
0
].
children
;
//去掉根节点的文旅厅
// this.orgTreeData = res[0].children; //去掉根节点的文旅厅
this
.
orgTreeData
=
res
});
},
...
...
src/views/role/components/DataEditDialog.vue
浏览文件 @
6b90e618
...
...
@@ -112,7 +112,8 @@ export default {
created
()
{
this
.
$store
.
dispatch
(
"org/getMuseumTreeData"
,
false
).
then
((
res
)
=>
{
this
.
orgTreeData
=
res
[
0
].
children
;
//去掉根节点的文旅厅
// this.orgTreeData = res[0].children; //去掉根节点的文旅厅
this
.
orgTreeData
=
res
});
},
methods
:
{
...
...
vue.config.js
浏览文件 @
6b90e618
...
...
@@ -42,7 +42,7 @@ module.exports = {
proxy
:
{
'/api'
:
{
// target: 'http://172.24.100.109:8080/',
target
:
'http://222.85.214.245:9
566
/api'
,
target
:
'http://222.85.214.245:9
603
/api'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api'
:
''
...
...
@@ -50,7 +50,7 @@ module.exports = {
},
'/files'
:
{
// target: 'http://192.168.1.230:9563/files',
target
:
'http://222.85.214.245:9
563
/files'
,
target
:
'http://222.85.214.245:9
604
/files'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/files'
:
''
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论