diff --git a/.env.development b/.env.development index cbebb18..2b091ca 100644 --- a/.env.development +++ b/.env.development @@ -5,11 +5,11 @@ VITE_APP_TITLE = 新能源项目管理平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.119:8899' +VITE_APP_BASE_API = 'http://192.168.110.148:8899' # 无人机接口地址 -VITE_APP_BASE_DRONE_API = 'http://192.168.110.119:9136' +VITE_APP_BASE_DRONE_API = 'http://192.168.110.8:9136' # 应用访问路径 例如使用前缀 /admin/ VITE_APP_CONTEXT_PATH = '/' diff --git a/src/api/cory/contactformtemplate/index.ts b/src/api/cory/contactformtemplate/index.ts new file mode 100644 index 0000000..fcc2f70 --- /dev/null +++ b/src/api/cory/contactformtemplate/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ContactformtemplateVO, ContactformtemplateForm, ContactformtemplateQuery } from '@/api/cory/contactformtemplate/types'; + +/** + * 查询联系单模板列表 + * @param query + * @returns {*} + */ + +export const listContactformtemplate = (query?: ContactformtemplateQuery): AxiosPromise => { + return request({ + url: '/cory/contactformtemplate/list', + method: 'get', + params: query + }); +}; + +/** + * 查询联系单模板详细 + * @param id + */ +export const getContactformtemplate = (id: string | number): AxiosPromise => { + return request({ + url: '/cory/contactformtemplate/' + id, + method: 'get' + }); +}; + +/** + * 新增联系单模板 + * @param data + */ +export const addContactformtemplate = (data: ContactformtemplateForm) => { + return request({ + url: '/cory/contactformtemplate', + method: 'post', + data: data + }); +}; + +/** + * 修改联系单模板 + * @param data + */ +export const updateContactformtemplate = (data: ContactformtemplateForm) => { + return request({ + url: '/cory/contactformtemplate', + method: 'put', + data: data + }); +}; + +/** + * 删除联系单模板 + * @param id + */ +export const delContactformtemplate = (id: string | number | Array) => { + return request({ + url: '/cory/contactformtemplate/' + id, + method: 'delete' + }); +}; diff --git a/src/api/cory/contactformtemplate/types.ts b/src/api/cory/contactformtemplate/types.ts new file mode 100644 index 0000000..1f49ee7 --- /dev/null +++ b/src/api/cory/contactformtemplate/types.ts @@ -0,0 +1,79 @@ +export interface ContactformtemplateVO { + /** + * 自增ID + */ + id: string | number; + + /** + * 模板名称 + */ + name: string; + + /** + * 模板路径 + */ + path: string; + + /** + * 缩略图 + */ + thumbnail: string; + + /** + * 缩略图Url + */ + thumbnailUrl: string; + /** + * 备注 + */ + remark: string; +} + +export interface ContactformtemplateForm extends BaseEntity { + /** + * 自增ID + */ + id?: string | number; + + /** + * 模板名称 + */ + name?: string; + + /** + * 模板路径 + */ + file?: string; + + /** + * 缩略图 + */ + thumbnail?: string; + + /** + * 备注 + */ + remark?: string; +} + +export interface ContactformtemplateQuery extends PageQuery { + /** + * 模板名称 + */ + name?: string; + + /** + * 模板路径 + */ + path?: string; + + /** + * 缩略图 + */ + thumbnail?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index e8af99e..7ace708 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -17,6 +17,7 @@ :accept="accept" :drag="isDarg" :data="data" + :auto-upload="autoUpload" >
@@ -80,7 +81,6 @@ import { propTypes } from '@/utils/propTypes'; import { delOss, listByIds } from '@/api/system/oss'; import { globalHeaders } from '@/utils/request'; - const props = defineProps({ modelValue: { type: [String, Object, Array], @@ -102,6 +102,8 @@ const props = defineProps({ uploadUrl: propTypes.string.def('/resource/oss/upload'), //可拖拽上传 isDarg: propTypes.bool.def(false), + // 是否自动上传 + autoUpload: propTypes.bool.def(true), // 其他参数 data: propTypes.object.def({}), onUploadSuccess: { @@ -118,7 +120,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const emit = defineEmits(['update:modelValue']); const number = ref(0); const uploadList = ref([]); - const baseUrl = import.meta.env.VITE_APP_BASE_API; const uploadFileUrl = ref(baseUrl + props.uploadUrl); // 上传文件服务器地址 const headers = ref(globalHeaders()); @@ -216,6 +217,8 @@ interface UploadFileWithOssId extends UploadFile { } const handleUploadSuccess = (res: any, file: UploadFileWithOssId) => { + console.log(props.data); + if (res.code === 200) { if (res.data) { uploadList.value.push({ @@ -239,8 +242,6 @@ const handleUploadSuccess = (res: any, file: UploadFileWithOssId) => { // 删除文件 const handleDelete = async (index: string | number, type?: string) => { - console.log('🚀 ~ handleDelete ~ index:', index); - await proxy?.$modal.confirm('是否确认删除此文件?').finally(); if (type === 'ossId') { delOss(index); @@ -263,7 +264,6 @@ const uploadedSuccessfully = () => { proxy?.$modal.msgSuccess('导入成功'); return; } - console.log(number.value, uploadList.value); if (number.value > 0 && uploadList.value.length === number.value) { fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value); @@ -297,6 +297,14 @@ const listToString = (list: any[], separator?: string) => { }); return strs != '' ? strs.substring(0, strs.length - 1) : ''; }; + +const submitUpload = () => { + fileUploadRef.value!.submit(); +}; + +defineExpose({ + submitUpload +}); diff --git a/src/views/template/index.vue b/src/views/template/index.vue index 0f594bb..7297dbf 100644 --- a/src/views/template/index.vue +++ b/src/views/template/index.vue @@ -53,150 +53,190 @@ v-if="queryParams.projectType == '1'" @selection-change="handleSelectionChange" > + - +
+ +
+ + + + + + + + + + + + + + + + + + + 施工项目部 + + + + + + + 项目监理机构 -
- - - - - - - - - - - - - - - - - - - 施工项目部 - - - - - - - 项目监理机构 + + + + + + + 建设单位 + + + + + + +
+
+ + + - - - - - - - 建设单位 - - - - - - -
+ + + - -
- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - 施工承包单位 - - - - - - - 总承包单位 - - - - - - - 设计单位 - - - - - - - 项目监理单位 - - - - - - - - - - 建设单位 - - - - - - + + + + 施工承包单位 + + + + + + + 总承包单位 + + + + + + + 设计单位 + + + + + + + 项目监理单位 + + + + + + + + + + 建设单位 + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +