|
@@ -98,7 +98,8 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <!-- TODO: 添加遮盖区域弹窗 -->
|
|
|
+ <!-- 添加遮盖区域弹窗 -->
|
|
|
+ <SelectImgArea ref="imgAreaRef" v-model="selectedAreas" :img-list="imgList" />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
@@ -112,6 +113,9 @@
|
|
|
import useLoading from '@/hooks/loading';
|
|
|
import { objAssign, objModifyAssign } from '@/utils/utils';
|
|
|
|
|
|
+ import SelectImgArea from '@/components/select-img-area/index.vue';
|
|
|
+ import { CoverArea } from '@/api/types/common';
|
|
|
+
|
|
|
defineOptions({
|
|
|
name: 'SubjectSettingDialog',
|
|
|
});
|
|
@@ -176,7 +180,14 @@
|
|
|
};
|
|
|
|
|
|
// 添加遮盖区域
|
|
|
- const addCoverArea = () => {};
|
|
|
+ const imgAreaRef = ref();
|
|
|
+ const selectedAreas = ref<CoverArea[]>([]);
|
|
|
+ // TODO:获取imgList
|
|
|
+ const imgList = ref([]);
|
|
|
+ const addCoverArea = () => {
|
|
|
+ selectedAreas.value = formModel.sheetConfig || [];
|
|
|
+ imgAreaRef.value.open();
|
|
|
+ };
|
|
|
|
|
|
// 提交
|
|
|
const { loading, setLoading } = useLoading();
|
|
@@ -186,6 +197,7 @@
|
|
|
|
|
|
setLoading(true);
|
|
|
const datas = objAssign(formModel, {});
|
|
|
+ datas.sheetConfig = selectedAreas.value;
|
|
|
let res = true;
|
|
|
await saveSubjectSetting(datas).catch(() => {
|
|
|
res = false;
|