Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_backstage
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_backstage
Commits
490896a1
提交
490896a1
authored
7月 13, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:新增树形字典
上级
0c6c1210
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
61 行增加
和
23 行删除
+61
-23
dict.js
src/api/dict.js
+5
-1
dict.js
src/store/modules/dict.js
+40
-8
InfoEditDialog.vue
src/views/culturalRelic/components/InfoEditDialog.vue
+13
-8
InfoEditDialog.vue
src/views/display/components/InfoEditDialog.vue
+1
-4
vue.config.js
vue.config.js
+2
-2
没有找到文件。
src/api/dict.js
浏览文件 @
490896a1
...
...
@@ -12,7 +12,11 @@ export function getDictCode(data) {
})
}
// 获取树结构的字典 culturalRelicYears culturalRelicTexture
/**
* 获取树结构的字典
* @param {*} data 查询参数 data ['culturalRelicYears','culturalRelicTexture']
*
*/
export
function
getDictTree
(
data
)
{
return
request
({
url
:
'/sysDictTree/listByType'
,
...
...
src/store/modules/dict.js
浏览文件 @
490896a1
const
state
=
{
dicts
:
{},
};
};
const
mutations
=
{
const
mutations
=
{
SET_DICTS
(
state
,
obj
)
{
state
.
dicts
[
obj
.
label
]
=
obj
.
value
;
},
};
};
export
default
{
const
actions
=
{
// user login
getDictTree
({
commit
},
data
)
{
let
dicts
=
[]
data
.
forEach
(
i
=>
{
if
(
state
.
dicts
[
i
])
{
dicts
.
push
(
dicts
)
}
});
if
(
dicts
.
length
>
0
)
{
return
dicts
}
else
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getDictTree
(
data
).
then
(
response
=>
{
const
{
data
}
=
response
commit
(
'SET_TOKEN'
,
data
.
accessToken
)
commit
(
'SET_NAME'
,
data
.
username
)
commit
(
'SET_USERINFO'
,
data
)
setToken
(
data
.
accessToken
)
setUserInfo
(
data
)
resolve
()
}).
catch
(
error
=>
{
reject
(
error
)
})
})
}
}
}
export
default
{
namespaced
:
true
,
state
,
actions
,
mutations
,
};
\ No newline at end of file
};
src/views/culturalRelic/components/InfoEditDialog.vue
浏览文件 @
490896a1
...
...
@@ -464,7 +464,6 @@ export default {
successFilesObj
[
key
].
map
((
sf
)
=>
{
filesObj
[
key
].
push
(
sf
.
fileId
);
});
// filesObj[key].push(successFilesObj[key].fileId);
}
else
{
let
ids
=
[];
successFilesObj
[
key
].
map
((
sf
)
=>
{
...
...
@@ -473,8 +472,6 @@ export default {
filesObj
[
key
]
=
ids
;
}
}
console
.
log
(
"successFilesObj"
,
successFilesObj
);
console
.
log
(
"filesObj"
,
filesObj
);
// return;
// 2、回填布展自带的媒体文件
mediaArr
.
forEach
((
media
)
=>
{
...
...
@@ -494,10 +491,8 @@ export default {
if
(
res
.
code
==
0
)
{
this
.
$message
.
success
(
"提交成功!"
);
this
.
loading
=
false
;
this
.
literatureValues
=
[];
this
.
$emit
(
"handleClose"
);
this
.
$emit
(
"refresh"
);
this
.
dialogForm
=
{};
}
}
else
{
const
params
=
{
...
this
.
dialogForm
};
...
...
@@ -507,10 +502,8 @@ export default {
if
(
res
.
code
==
0
)
{
this
.
$message
.
success
(
"修改成功!"
);
this
.
loading
=
false
;
this
.
literatureValues
=
[];
this
.
$emit
(
"handleClose"
);
this
.
$emit
(
"refresh"
);
this
.
dialogForm
=
{};
}
// const {
// exhibitionId,
...
...
@@ -545,7 +538,7 @@ export default {
// this.$message.success("提交成功!");
// this.loading = false;
// this.$emit("refresh");
// this.re
load
();
// this.re
set
();
// }
}
...
...
@@ -557,9 +550,21 @@ export default {
.
then
((
_
)
=>
{
done
();
this
.
$emit
(
"handleClose"
);
this
.
reset
()
})
.
catch
((
_
)
=>
{});
},
// 清空编辑组件中的所有值
reset
()
{
//父组件将清空form绑定的值
// 清空文献
this
.
literatureValues
=
[];
this
.
images
=
[];
this
.
videos
=
[];
this
.
audios
=
[];
this
.
faceImage
=
[];
},
refresh
()
{
this
.
$emit
(
"refresh"
);
...
...
src/views/display/components/InfoEditDialog.vue
浏览文件 @
490896a1
...
...
@@ -397,9 +397,7 @@ export default {
cancelForm
()
{
this
.
reload
();
},
// handleShowUnit() {
// this.showUnit = true;
// },
async
handleSubmit
()
{
var
that
=
this
;
let
formData
=
new
FormData
();
...
...
@@ -425,7 +423,6 @@ export default {
// 只有待上传的才需要添加至formdata
});
});
// console.log('successFilesObj',successFilesObj);
let
unitIds
=
[];
let
unitData
=
[...
this
.
$refs
[
"exhibitionUnits"
].
getUnitData
()];
...
...
vue.config.js
浏览文件 @
490896a1
...
...
@@ -39,8 +39,8 @@ module.exports = {
},
proxy
:
{
'/api'
:
{
target
:
'http://172.24.100.189:8080'
,
//
target:'http://222.85.214.245:9066/api',
//
target: 'http://172.24.100.189:8080',
target
:
'http://222.85.214.245:9066/api'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api'
:
''
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论