fix: 合并冲突
This commit is contained in:
commit
39ff2f8a74
@ -2,14 +2,14 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
|
|
||||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||||
VITE_API_URL = 'http://192.168.34.155:6688'
|
# VITE_API_URL = 'http://192.168.34.155:6688'
|
||||||
# VITE_API_URL = 'http://183.63.230.59:6090'
|
# VITE_API_URL = 'http://183.63.230.59:6090'
|
||||||
# VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296'
|
# VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296'
|
||||||
VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081"
|
VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081"
|
||||||
# VITE_API_URL = "http://jxjzw.zhgdyun.com:9013"
|
# VITE_API_URL = "http://jxjzw.zhgdyun.com:9013"
|
||||||
# VITE_API_URL = 'https://xmglcs.hyjgxt.cn:6090'
|
VITE_API_URL = 'https://xmglcs.hyjgxt.cn:6090'
|
||||||
|
|
||||||
# 上传
|
# 上传
|
||||||
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='
|
# VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='
|
||||||
# VITE_ULD_API_URL = 'http://jxjzw.zhgdyun.com:8012/onlinePreview?url='
|
VITE_ULD_API_URL = 'http://jxjzw.zhgdyun.com:8012/onlinePreview?url='
|
||||||
|
|
||||||
|
|||||||
@ -30,14 +30,20 @@
|
|||||||
<section class="upload-area">
|
<section class="upload-area">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<p v-if="!fileList.length">
|
<p v-if="!fileList.length">
|
||||||
<el-icon class="info"><InfoFilled /></el-icon>
|
<el-icon class="info">
|
||||||
|
<InfoFilled />
|
||||||
|
</el-icon>
|
||||||
<span>温馨提示:将文件添加到上传队列, 然后点击“开始上传”按钮。</span>
|
<span>温馨提示:将文件添加到上传队列, 然后点击“开始上传”按钮。</span>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="isOverflow">
|
<p v-if="isOverflow">
|
||||||
<el-icon class="error"><WarningFilled /></el-icon>
|
<el-icon class="error">
|
||||||
|
<WarningFilled />
|
||||||
|
</el-icon>
|
||||||
<span>文件大小错误: 文件大小不超过 {{ calculateFileSize(maxTotalFileSize!) }}</span>
|
<span>文件大小错误: 文件大小不超过 {{ calculateFileSize(maxTotalFileSize!) }}</span>
|
||||||
</p>
|
</p>
|
||||||
<el-icon class="close" @click.capture="close"><Close /></el-icon>
|
<el-icon class="close" @click.capture="close">
|
||||||
|
<Close />
|
||||||
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="upload-list">
|
<div class="upload-list">
|
||||||
@ -55,9 +61,16 @@
|
|||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ /* TODO: 只是为了触发视图更新, 因为 File 对象无法被 vue 托管 */ __JUST_UPDATE_VIEW ? "" : "" }}
|
{{ /* TODO: 只是为了触发视图更新, 因为 File 对象无法被 vue 托管 */ __JUST_UPDATE_VIEW ? "" : "" }}
|
||||||
|
|
||||||
<el-icon v-if="row.response" class="success"><CircleCheckFilled /></el-icon>
|
<el-icon v-if="row.response" class="success">
|
||||||
<el-icon v-else-if="row.uploading" class="uploading"> <Upload /></el-icon>
|
<CircleCheckFilled />
|
||||||
<el-icon v-else class="remove" @click.capture="remove(row)"><RemoveFilled /></el-icon>
|
</el-icon>
|
||||||
|
<el-icon v-else-if="row.uploading" class="uploading">
|
||||||
|
<Upload />
|
||||||
|
</el-icon>
|
||||||
|
<el-icon class="remove" @click.capture="remove(row, 1)">
|
||||||
|
<RemoveFilled />
|
||||||
|
</el-icon>
|
||||||
|
<!-- v-else -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -73,9 +86,15 @@
|
|||||||
<p>{{ calculateFileSize(file.size) }}</p>
|
<p>{{ calculateFileSize(file.size) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-icon v-if="file.response" class="success"><CircleCheckFilled /></el-icon>
|
<el-icon v-if="file.response" class="success">
|
||||||
<el-icon v-else-if="file.uploading" class="uploading"> <Upload /></el-icon>
|
<CircleCheckFilled />
|
||||||
<el-icon v-else class="remove" @click.capture="remove(file)"><RemoveFilled /></el-icon>
|
</el-icon>
|
||||||
|
<el-icon v-else-if="file.uploading" class="uploading">
|
||||||
|
<Upload />
|
||||||
|
</el-icon>
|
||||||
|
<el-icon v-else class="remove" @click.capture="remove(file)">
|
||||||
|
<RemoveFilled />
|
||||||
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -84,7 +103,12 @@
|
|||||||
<div class="file-info">
|
<div class="file-info">
|
||||||
<span class="size">{{ !fileList.length ? "未选择" : calculateFileSize(totalFileSize) }}</span>
|
<span class="size">{{ !fileList.length ? "未选择" : calculateFileSize(totalFileSize) }}</span>
|
||||||
|
|
||||||
<div class="progress" :style="{ '--progress': `${parseInt((progress / currentTask) * 100 + '')}%` }"></div>
|
<div
|
||||||
|
class="progress"
|
||||||
|
:style="{
|
||||||
|
'--progress': `${parseInt((progress / currentTask) * 100 + '')}%`
|
||||||
|
}"
|
||||||
|
></div>
|
||||||
|
|
||||||
<!-- <span class="uploaded" :class="{ active: isUploading }">{{ `已上传 ${completeCount}/${currentTask} 个文件` }}</span> -->
|
<!-- <span class="uploaded" :class="{ active: isUploading }">{{ `已上传 ${completeCount}/${currentTask} 个文件` }}</span> -->
|
||||||
</div>
|
</div>
|
||||||
@ -205,8 +229,8 @@ const getType = (type: Type) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
maxFileSize: 5 * 1024 * 1024,
|
maxFileSize: 500 * 1024 * 1024,
|
||||||
maxTotalFileSize: 50 * 1024 * 1024,
|
maxTotalFileSize: 500 * 1024 * 1024,
|
||||||
checkDuplicateFile: true,
|
checkDuplicateFile: true,
|
||||||
timeout: 30000
|
timeout: 30000
|
||||||
});
|
});
|
||||||
@ -305,11 +329,18 @@ const selectFile = (e: Event) => {
|
|||||||
* @description 删除指定文件对象
|
* @description 删除指定文件对象
|
||||||
* @param row 文件对象
|
* @param row 文件对象
|
||||||
*/
|
*/
|
||||||
const remove = (row: UploadFile) => {
|
const remove = (row: UploadFile, type?: number) => {
|
||||||
if (isUploading.value) return ElMessage.warning("上传中, 请不要执行任何操作");
|
if (isUploading.value) return ElMessage.warning("上传中, 请不要执行任何操作");
|
||||||
|
|
||||||
const i = fileList.value.indexOf(row);
|
const i = fileList.value.indexOf(row);
|
||||||
|
|
||||||
|
if (type == 1) {
|
||||||
|
const findIndex = successList.value.findIndex(item => item.id === row.id);
|
||||||
|
if (findIndex > -1) {
|
||||||
|
successList.value.splice(findIndex, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
fileList.value.splice(i, 1);
|
fileList.value.splice(i, 1);
|
||||||
|
|
||||||
@ -367,7 +398,11 @@ const handlerUpload = () => {
|
|||||||
|
|
||||||
controllerList.value.push(controller);
|
controllerList.value.push(controller);
|
||||||
|
|
||||||
upload(data, { signal: controller.signal, onUploadProgress, headers: { noLoading: true } })
|
upload(data, {
|
||||||
|
signal: controller.signal,
|
||||||
|
onUploadProgress,
|
||||||
|
headers: { noLoading: true }
|
||||||
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == "200") {
|
if (res.code == "200") {
|
||||||
file.response = res.result;
|
file.response = res.result;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export enum ResultEnum {
|
|||||||
SUCCESS = 200,
|
SUCCESS = 200,
|
||||||
ERROR = 500,
|
ERROR = 500,
|
||||||
OVERDUE = 401,
|
OVERDUE = 401,
|
||||||
TIMEOUT = 30000,
|
TIMEOUT = 60000,
|
||||||
TYPE = "success"
|
TYPE = "success"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -321,3 +321,16 @@ export function sendIframeMessage(msg: any, type: any, iframeEle: any | undefine
|
|||||||
window.parent.postMessage(msg, "*");
|
window.parent.postMessage(msg, "*");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 替换指定字符串内容
|
||||||
|
export function getSubstringAfter(str: string, searchStr: string) {
|
||||||
|
// 查找searchStr在str中的位置
|
||||||
|
const index = str.indexOf(searchStr);
|
||||||
|
console.log(index, searchStr);
|
||||||
|
// 如果找到了,则截取searchStr之后的内容(包括searchStr之后的所有字符)
|
||||||
|
// 如果不想包括searchStr本身,可以调整startIndex为index + searchStr.length
|
||||||
|
if (index !== -1) {
|
||||||
|
return str.substring(index + searchStr.length);
|
||||||
|
}
|
||||||
|
// 如果没有找到,返回原字符串或null等,根据需求决定
|
||||||
|
return false; // 或者返回空字符串"",表示没有找到
|
||||||
|
}
|
||||||
|
|||||||
@ -95,10 +95,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<!-- <el-input placeholder="请输入" v-model="item.punish" class="form-element-input" /> -->
|
<el-input placeholder="请输入" v-model="item.punish" class="form-element-input" />
|
||||||
<el-select placeholder="请选择" class="form-element-select" v-model="item.punish">
|
<!-- <el-select placeholder="请选择" class="form-element-select" v-model="item.punish">
|
||||||
<el-option v-for="(item2, index) in rankRemark" :key="item2.label" :label="item2.label" :value="item2.value" />
|
<el-option v-for="(item2, index) in rankRemark" :key="item2.label" :label="item2.label" :value="item2.value" />
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-input placeholder="请输入" v-model="item.remark" class="form-element-input" />
|
<el-input placeholder="请输入" v-model="item.remark" class="form-element-input" />
|
||||||
|
|||||||
@ -88,21 +88,9 @@ const next = async (data: { [key: string]: OverviewForm }, isTemporary: any, isS
|
|||||||
annexFileList.value.push(...item.files);
|
annexFileList.value.push(...item.files);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (data.engineeringStageEightList?.length) {
|
console.log(annexFileList.value, 22222222);
|
||||||
addRepostData.value.engineeringStageEightList = data.engineeringStageEightList.map(item => {
|
const map = new Map();
|
||||||
let eightFileList = [];
|
addRepostData.value.annexFiles = annexFileList.value.filter(v => !map.has(v.fileUrl) && map.set(v.fileUrl, v));
|
||||||
item.engineeringSingles.map(item => {
|
|
||||||
if (item.files.length > 0) {
|
|
||||||
eightFileList.push(...item.files);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
item.annexFiles = eightFileList;
|
|
||||||
delete item.engineeringSingles;
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
addRepostData.value.annexFiles = annexFileList.value;
|
|
||||||
delete addRepostData.value.engineeringSingles;
|
|
||||||
console.log(annexFileList.value, 111222);
|
console.log(annexFileList.value, 111222);
|
||||||
console.log(addRepostData.value, 111222);
|
console.log(addRepostData.value, 111222);
|
||||||
if (isTemporary) {
|
if (isTemporary) {
|
||||||
@ -128,6 +116,7 @@ const submit = async () => {
|
|||||||
if (Array.isArray(requestData.projectSecondType)) {
|
if (Array.isArray(requestData.projectSecondType)) {
|
||||||
requestData.projectSecondType = requestData.projectSecondType.join(",");
|
requestData.projectSecondType = requestData.projectSecondType.join(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!store.Message) {
|
if (!store.Message) {
|
||||||
const data = await addPreEngineering(requestData);
|
const data = await addPreEngineering(requestData);
|
||||||
ElMessage.success(data.message);
|
ElMessage.success(data.message);
|
||||||
@ -146,7 +135,7 @@ const temporarySave = async () => {
|
|||||||
let requestData = {
|
let requestData = {
|
||||||
...addRepostData.value,
|
...addRepostData.value,
|
||||||
isDraft: 1 // 1代表暂存
|
isDraft: 1 // 1代表暂存
|
||||||
};
|
} as any;
|
||||||
if (Array.isArray(requestData.projectSecondType)) {
|
if (Array.isArray(requestData.projectSecondType)) {
|
||||||
requestData.projectSecondType = requestData.projectSecondType.join(",");
|
requestData.projectSecondType = requestData.projectSecondType.join(",");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,8 +38,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-form-item label="项目总投资:" prop="engineeringCost">
|
<el-form-item label="项目总投资:" prop="allCost">
|
||||||
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
<el-input placeholder="请输入" v-model="form.allCost" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目总面积(㎡):" prop="engineeringArea">
|
<el-form-item label="项目总面积(㎡):" prop="engineeringArea">
|
||||||
<el-input placeholder="请输入" v-model="form.engineeringArea" />
|
<el-input placeholder="请输入" v-model="form.engineeringArea" />
|
||||||
@ -315,7 +315,11 @@ onMounted(async () => {
|
|||||||
item.files = files;
|
item.files = files;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
form.value.projectSecondType = store.Message.projectSecondType.split(",").map((item: string) => Number(item));
|
// console.log(111111, store.Message.projectSecondType, store.Message.projectSecondType.split(","));
|
||||||
|
form.value.projectSecondType =
|
||||||
|
store.Message.projectSecondType && store.Message.projectSecondType.split(",").map((item: string) => Number(item));
|
||||||
|
// console.log(form.value.projectSecondType);
|
||||||
|
form.value.allCost = store.Message.allCost;
|
||||||
}
|
}
|
||||||
// if (store.Message) {
|
// if (store.Message) {
|
||||||
// form.value = store.Message;
|
// form.value = store.Message;
|
||||||
|
|||||||
@ -150,7 +150,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -188,7 +188,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -112,7 +112,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -139,7 +139,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -136,7 +136,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -120,7 +120,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -275,7 +275,9 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<el-button type="primary" @click="handleSubmit(ruleFormRef, true)" v-if="!store.Message">保存</el-button>
|
<el-button type="primary" @click="handleSubmit(ruleFormRef, true)" v-if="!store.Message || store.Message.isDraft"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
<el-button type="primary" @click="prev">上一步</el-button>
|
<el-button type="primary" @click="prev">上一步</el-button>
|
||||||
<el-button type="primary" @click="handleSubmit(ruleFormRef)">提交</el-button>
|
<el-button type="primary" @click="handleSubmit(ruleFormRef)">提交</el-button>
|
||||||
</footer>
|
</footer>
|
||||||
@ -311,7 +313,7 @@ const showFilesUpload = ref(false);
|
|||||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||||
|
|
||||||
const dictLabel = ref<undefined | number>(undefined);
|
const dictLabel = ref<undefined | number>(undefined);
|
||||||
const store = GlobalStore();
|
const store: any = GlobalStore();
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
const props = defineProps(["reportPersonList"]);
|
const props = defineProps(["reportPersonList"]);
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@ -32,8 +32,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-form-item label="项目总投资:" prop="engineeringCost">
|
<el-form-item label="项目总投资:" prop="allCost">
|
||||||
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
<el-input placeholder="请输入" v-model="form.allCost" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目总面积(㎡):" prop="engineeringArea">
|
<el-form-item label="项目总面积(㎡):" prop="engineeringArea">
|
||||||
<el-input placeholder="请输入" v-model="form.engineeringArea" />
|
<el-input placeholder="请输入" v-model="form.engineeringArea" />
|
||||||
@ -1237,9 +1237,10 @@ const onPreview = (row: any) => {
|
|||||||
const onAppendix = row => {
|
const onAppendix = row => {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
if (row.files.length) {
|
// if (row.files.length) {
|
||||||
|
// current.value = row.files;
|
||||||
|
// }
|
||||||
current.value = row.files;
|
current.value = row.files;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const getDataDetail = async () => {
|
const getDataDetail = async () => {
|
||||||
// console.log(row);
|
// console.log(row);
|
||||||
|
|||||||
@ -70,11 +70,29 @@ const handlechange = e => {
|
|||||||
|
|
||||||
const handleSubmit = (isTemporary?: any) => {
|
const handleSubmit = (isTemporary?: any) => {
|
||||||
const fileList: AnnexFile[] = [];
|
const fileList: AnnexFile[] = [];
|
||||||
|
console.log(annexFiles.value, 888999);
|
||||||
annexFiles.value.forEach(item => {
|
annexFiles.value.forEach(item => {
|
||||||
const files = item.files;
|
const files = item.files;
|
||||||
|
|
||||||
files.forEach(file => {
|
files.forEach((file: any) => {
|
||||||
|
if (file.response.fileId) {
|
||||||
|
const curr: AnnexFile = {};
|
||||||
|
|
||||||
|
curr.createTime = file.response?.createTime;
|
||||||
|
curr.extendName = file.response?.extendName;
|
||||||
|
|
||||||
|
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||||
|
curr.fileName = file.response?.fileName;
|
||||||
|
// curr.fileName = file.response?.filename;
|
||||||
|
|
||||||
|
// curr.fileId = file.response && +file.response.id;
|
||||||
|
curr.fileSize = `${file.response?.fileSize || ""}`;
|
||||||
|
curr.fileUrl = file.response?.fileUrl;
|
||||||
|
|
||||||
|
curr.label = file.response?.label;
|
||||||
|
|
||||||
|
fileList.push(curr);
|
||||||
|
} else {
|
||||||
const curr: AnnexFile = {};
|
const curr: AnnexFile = {};
|
||||||
|
|
||||||
curr.createTime = file.response?.createTime;
|
curr.createTime = file.response?.createTime;
|
||||||
@ -91,11 +109,13 @@ const handleSubmit = (isTemporary?: any) => {
|
|||||||
curr.label = file.label;
|
curr.label = file.label;
|
||||||
|
|
||||||
fileList.push(curr);
|
fileList.push(curr);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
item.files = files;
|
item.files = files;
|
||||||
});
|
});
|
||||||
|
console.log(fileList, 888999);
|
||||||
|
// return;
|
||||||
emit("next", { annexFiles: fileList }, isTemporary);
|
emit("next", { annexFiles: fileList }, isTemporary);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -313,6 +313,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||||||
import type { FormInstance, UploadProps } from "element-plus";
|
import type { FormInstance, UploadProps } from "element-plus";
|
||||||
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
||||||
import { submitReform } from "@/api/modules/project";
|
import { submitReform } from "@/api/modules/project";
|
||||||
|
import { getSubstringAfter } from "@/utils/util";
|
||||||
import printJS from "print-js";
|
import printJS from "print-js";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
detailsDialog: Boolean,
|
detailsDialog: Boolean,
|
||||||
@ -506,7 +507,13 @@ const getInfo = async () => {
|
|||||||
basicData.value = res.result;
|
basicData.value = res.result;
|
||||||
recordData.value = res.result.inspectQuestionList;
|
recordData.value = res.result.inspectQuestionList;
|
||||||
recordData.value.map(item => {
|
recordData.value.map(item => {
|
||||||
item.image = eval(item.image);
|
item.image = eval(item.image).map((ele: any) => {
|
||||||
|
const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090");
|
||||||
|
return {
|
||||||
|
...ele,
|
||||||
|
url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
console.log(recordData);
|
console.log(recordData);
|
||||||
};
|
};
|
||||||
@ -515,7 +522,13 @@ const getTimeLineList = async () => {
|
|||||||
const res = await timeLineData({ inspectQuestionId: recordRowData.value.id });
|
const res = await timeLineData({ inspectQuestionId: recordRowData.value.id });
|
||||||
|
|
||||||
res.result.map(item => {
|
res.result.map(item => {
|
||||||
item.solveImage = eval(item.solveImage);
|
item.solveImage = eval(item.solveImage).map((ele: any) => {
|
||||||
|
const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090");
|
||||||
|
return {
|
||||||
|
...ele,
|
||||||
|
url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
timelineList.value = res.result;
|
timelineList.value = res.result;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -307,6 +307,7 @@ import type { FormInstance, UploadProps } from "element-plus";
|
|||||||
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
import { relativeInfo, timeLineData, singleOptionAudit, allOptionAudit } from "@/api/modules/goverment";
|
||||||
import { submitReform } from "@/api/modules/project";
|
import { submitReform } from "@/api/modules/project";
|
||||||
import printJS from "print-js";
|
import printJS from "print-js";
|
||||||
|
import { getSubstringAfter } from "@/utils/util";
|
||||||
const baseUrl = window.location.protocol + "//" + window.location.host;
|
const baseUrl = window.location.protocol + "//" + window.location.host;
|
||||||
// const baseUrl = import.meta.env.VITE_API_URL;
|
// const baseUrl = import.meta.env.VITE_API_URL;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -492,13 +493,20 @@ const rowClick = row => {
|
|||||||
};
|
};
|
||||||
// 相关信息接口调用
|
// 相关信息接口调用
|
||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
const res = await relativeInfo({ id: props.relativeId });
|
const res: any = await relativeInfo({ id: props.relativeId });
|
||||||
basicData.value = res.result;
|
basicData.value = res.result;
|
||||||
recordData.value = res.result.inspectQuestionList;
|
recordData.value = res.result.inspectQuestionList;
|
||||||
recordData.value.map(item => {
|
recordData.value.map((item: any) => {
|
||||||
item.image = eval(item.image);
|
item.image = eval(item.image).map((ele: any) => {
|
||||||
|
const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090");
|
||||||
|
return {
|
||||||
|
...ele,
|
||||||
|
url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl
|
||||||
|
};
|
||||||
});
|
});
|
||||||
console.log(recordData);
|
});
|
||||||
|
|
||||||
|
console.log(33333, recordRowData.value);
|
||||||
};
|
};
|
||||||
const timelineList = ref([{ name: 1 }]);
|
const timelineList = ref([{ name: 1 }]);
|
||||||
// 获取整改情况时间轴列表
|
// 获取整改情况时间轴列表
|
||||||
@ -506,7 +514,13 @@ const getTimeLineList = async () => {
|
|||||||
const res = await timeLineData({ inspectQuestionId: recordRowData.value.id });
|
const res = await timeLineData({ inspectQuestionId: recordRowData.value.id });
|
||||||
|
|
||||||
res.result.map(item => {
|
res.result.map(item => {
|
||||||
item.solveImage = eval(item.solveImage);
|
item.solveImage = eval(item.solveImage).map((ele: any) => {
|
||||||
|
const newUrl = getSubstringAfter(ele.url, "https://xmgl.hyjgxt.cn:6090");
|
||||||
|
return {
|
||||||
|
...ele,
|
||||||
|
url: newUrl == false ? ele.url : window.location.protocol + "//" + window.location.host + newUrl
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
timelineList.value = res.result;
|
timelineList.value = res.result;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user