diff --git a/admin-client/src/core/components/huanmeng/hm-image.vue b/admin-client/src/core/components/huanmeng/hm-image.vue index eb5c388..343d49a 100644 --- a/admin-client/src/core/components/huanmeng/hm-image.vue +++ b/admin-client/src/core/components/huanmeng/hm-image.vue @@ -21,11 +21,18 @@ @change="handleChange" > - - + + 上传 - +

@@ -47,6 +54,7 @@ import Tools from "@/core/utils/Tools"; // 使用 withDefaults 添加默认值 const props = defineProps<{ modelValue: number; + tenantId: string | undefined; }>(); console.log(props.modelValue); @@ -70,16 +78,13 @@ function updateValue(event: any) { } function updateValueNumber(event: number) { - - emits("update:modelValue", event); } async function fileupload() { - const response = await Tools.imageFileUpload(0, 0); + const response = await Tools.imageFileUpload(0, 0, "", props.tenantId); console.log(response); updateValueNumber(response.imageId); - } let timeout: any; let currentValue = ""; @@ -119,7 +124,7 @@ const handleSearch = (val: string) => { const handleChange = (val: number) => { console.log(val); updateValueNumber(val); -// emits("update:modelValue", val); + // emits("update:modelValue", val); // props.modelValue = 1; // value.value = ""; // fetch(val, (d: any[]) => (data.value = d)); diff --git a/admin-client/src/core/utils/Tools.ts b/admin-client/src/core/utils/Tools.ts index 536ba6b..f9532c9 100644 --- a/admin-client/src/core/utils/Tools.ts +++ b/admin-client/src/core/utils/Tools.ts @@ -9,6 +9,7 @@ import Cookies from "universal-cookie"; import AppConsts from "../../utils/AppConsts"; import TImageConfigService from "@/services/apps/T_Image_Configs/TImageConfigService"; import COS from "cos-js-sdk-v5"; +import { log } from "@antv/g2plot/lib/utils"; /** * 程序工具类 * @@ -337,12 +338,12 @@ class Tools { * @returns */ static generateGUID() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random() * 16 | 0, - v = c == 'x' ? r : (r & 0x3 | 0x8); - return v.toString(16); + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); }); -} + } /** * 获取 uuid guid @@ -419,7 +420,7 @@ class Tools { Key: _tempFilePaht, Body: file, SliceSize: 1024 * 1024, // 大于1mb才进行分块上传 - onTaskReady: function (tid) {}, + onTaskReady: function (tid) { }, onProgress: function (progressData) { console.log("上传中", JSON.stringify(progressData)); }, @@ -486,14 +487,15 @@ class Tools { static async imageFileUpload( imgaeId: number, imageType: number, - modelName?: string + modelName?: string, + tenantId?: string, ): Promise { //#region 创建文件选择器 const file = await this.selectFile(); if (file == null) { return null; } - return await this.imageUpdate(file, imgaeId, imageType, modelName); + return await this.imageUpdate(file, imgaeId, imageType, modelName, tenantId); //#endregion } /** @@ -508,7 +510,8 @@ class Tools { file: File, imgaeId: number, imageType: number, - modelName?: string + modelName?: string, + tenantId?: string, ): Promise { const key = "updatable"; AntdvMessage.loading({ content: "上传图片中", key }); @@ -535,6 +538,11 @@ class Tools { _data.form.region = fileInfo._cosData.bucket; // _data.form.imageId = imgaeId; _data.form.imageType = imageType; + if (tenantId != null) { + console.log('租户==》', tenantId); + + _data.form.tenantId = tenantId; + } //#endregion const result = await TImageConfigService.saveForm(_data.id, _data.form); AntdvMessage.success({ content: "上传成功", key, duration: 2 }); diff --git a/admin-client/src/services/apps/M_Songss/M_SongsService.ts b/admin-client/src/services/apps/M_Songss/M_SongsService.ts new file mode 100644 index 0000000..2036f5f --- /dev/null +++ b/admin-client/src/services/apps/M_Songss/M_SongsService.ts @@ -0,0 +1,74 @@ +import Http from "@/core/utils/Http"; + +/** + * M_Songs服务 + */ +export default class M_SongsService { + + static urlPrefix = "/api/v1/admin/M_Songs"; + + /** + * 获取数据列表 + * @param current + * @param pageSize + * @param search + * @param searchSort + * @returns + */ + static findList(current: number, pageSize: number, search: any = {}, searchSort: any[] = []) { + return Http.post(`${this.urlPrefix}/findList`, { + page: current, + size: pageSize, + search, + searchSort + }) + } + + /** + * 删除集合数据 + * + * @param ids + * @returns + */ + static deleteList(ids: string[]) { + return Http.post(`${this.urlPrefix}/deleteList`, ids) + } + + /** + * 查询表单 + * + * @param id + * @returns + */ + static findForm(id?: string | undefined) { + return Http.get(`${this.urlPrefix}/findForm${(id ? '/' + id : '')}`) + } + + /** + * 保存表单数据 + * + * @param id + * @param formData + * @returns + */ + static saveForm(id: string | undefined, formData: any) { + return Http.post(`${this.urlPrefix}/${id ? 'update' : 'create'}`, formData) + } + + /** + * 导出 excel + * + * @param search + * @param searchSort + * @returns + */ + static exportExcel(search: any = {}, searchSort: any[] = []) { + return Http.download(`${this.urlPrefix}/exportExcel`, { + page: -1, + size: -1, + search, + searchSort + }); + } + +} \ No newline at end of file diff --git a/admin-client/src/views/apps/M_Songss/Index.vue b/admin-client/src/views/apps/M_Songss/Index.vue new file mode 100644 index 0000000..5789206 --- /dev/null +++ b/admin-client/src/views/apps/M_Songss/Index.vue @@ -0,0 +1,232 @@ + + + \ No newline at end of file diff --git a/admin-client/src/views/apps/M_Songss/Info.vue b/admin-client/src/views/apps/M_Songss/Info.vue new file mode 100644 index 0000000..17e5c35 --- /dev/null +++ b/admin-client/src/views/apps/M_Songss/Info.vue @@ -0,0 +1,147 @@ + + + \ No newline at end of file diff --git a/admin-client/src/views/apps/T_Productss/Info.vue b/admin-client/src/views/apps/T_Productss/Info.vue index 9ff4cf7..0fd0b7a 100644 --- a/admin-client/src/views/apps/T_Productss/Info.vue +++ b/admin-client/src/views/apps/T_Productss/Info.vue @@ -70,7 +70,8 @@ function save() { :title="state.vm.id ? '编辑' : '新建'" centered @ok="state.visible = false" - :width="800" :maskClosable="false" + :width="800" + :maskClosable="false" >