|
@@ -233,18 +233,27 @@ export const filterMoveData = async () => {
|
|
|
// }
|
|
|
extStyleConfigJson[moveData.partIndex] = list;
|
|
|
console.log("🚀 ~ extStyleConfigJson", extStyleConfigJson)
|
|
|
+ const dataParams = state.musicRenderType === 'staff' ? {
|
|
|
+ id: examSongId,
|
|
|
+ extStyleConfigJson: JSON.stringify(extStyleConfigJson),
|
|
|
+ } : {
|
|
|
+ id: examSongId,
|
|
|
+ extJianStyleConfigJson: JSON.stringify(extStyleConfigJson),
|
|
|
+ }
|
|
|
const res = await request.post("/musicSheet/img", {
|
|
|
requestType: "json",
|
|
|
- data: {
|
|
|
- id: examSongId,
|
|
|
- extStyleConfigJson: JSON.stringify(extStyleConfigJson),
|
|
|
- }
|
|
|
+ data: dataParams
|
|
|
});
|
|
|
if (res && res.code == 200) {
|
|
|
showToast("保存成功");
|
|
|
undoData.undoList = [];
|
|
|
undoData.activeItem = null;
|
|
|
- state.extStyleConfigJson = JSON.stringify(extStyleConfigJson)
|
|
|
+ if (state.musicRenderType === 'staff') {
|
|
|
+ state.extStyleConfigJson = JSON.stringify(extStyleConfigJson)
|
|
|
+ } else {
|
|
|
+ state.extJianStyleConfigJson = JSON.stringify(extStyleConfigJson)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
clearActiveModel();
|
|
|
}
|
|
@@ -491,10 +500,11 @@ const handleUndo = () => {
|
|
|
|
|
|
/** 根据移动数据渲染 */
|
|
|
export const renderForMoveData = () => {
|
|
|
- if (state.isSingleLine || state.musicRenderType !== 'staff') return;
|
|
|
- if (state.extStyleConfigJson) {
|
|
|
+ // 一行谱模式暂时不支持谱面编辑和回显
|
|
|
+ if (state.isSingleLine) return;
|
|
|
+ if (state.extStyleConfigJson || state.extJianStyleConfigJson) {
|
|
|
try {
|
|
|
- extStyleConfigJson = JSON.parse(state.extStyleConfigJson);
|
|
|
+ extStyleConfigJson = state.musicRenderType === 'staff' ? JSON.parse(state.extStyleConfigJson) : JSON.parse(state.extJianStyleConfigJson);
|
|
|
} catch (error) {
|
|
|
extStyleConfigJson = {};
|
|
|
}
|
|
@@ -628,7 +638,7 @@ export default defineComponent({
|
|
|
} */}
|
|
|
<div class={[styles.editToolBox, !moveData.open && styles.itemDisabled]}>
|
|
|
{
|
|
|
- state.musicRenderType === 'staff' && !state.isSingleLine &&
|
|
|
+ !state.isSingleLine &&
|
|
|
<>
|
|
|
<div class={[styles.editItem, styles.canEdit]} onClick={switchMoveState}>
|
|
|
<img src={moveData.open ? editCloseIcon : editIcon} />
|