bugfix and performance improves
This commit is contained in:
@ -4,11 +4,11 @@
|
||||
#}
|
||||
|
||||
:4173 {
|
||||
handle_path /api/* {
|
||||
reverse_proxy http://101.34.131.16:1618
|
||||
handle /api/* {
|
||||
reverse_proxy http://101.34.251.155
|
||||
}
|
||||
handle {
|
||||
root * "/Volumes/iMac Doc/WebstormProjects/cas_cloud_admin/dist"
|
||||
root * "/Volumes/iMac Doc/WebstormProjects/cas_cloud_admin_i18n/dist"
|
||||
file_server
|
||||
try_files {path} /
|
||||
}
|
||||
|
@ -23,15 +23,21 @@ export const updateExpertAchievement = (data) =>
|
||||
data,
|
||||
});
|
||||
|
||||
// 批量审核成果
|
||||
export const batchAchievement = (ids) =>
|
||||
/**
|
||||
* 批量审核成果
|
||||
* @param ids
|
||||
* @param status 1->通过|2->驳回
|
||||
* @returns {*}
|
||||
*/
|
||||
export const batchAchievement = (ids, status) =>
|
||||
request({
|
||||
url: `/business/dataReview/batchAchievement`,
|
||||
url: `/business/dataReview/batchAchievement/${status}`,
|
||||
method: "put",
|
||||
data: {
|
||||
ids,
|
||||
},
|
||||
});
|
||||
|
||||
// 批量删除成果
|
||||
export const deleteAchievementByIds = (ids) =>
|
||||
request({
|
||||
|
@ -9,9 +9,9 @@ export const updateTechnologyDemand = (data) =>
|
||||
});
|
||||
|
||||
// 批量审核企业技术需求
|
||||
export const batchTechnologyDemand = (ids) =>
|
||||
export const batchTechnologyDemand = (ids, status) =>
|
||||
request({
|
||||
url: `/business/dataReview/batchTechnologyDemand/${ids}`,
|
||||
url: `/business/dataReview/batchTechnologyDemand/${ids}/${status}`,
|
||||
method: "PUT",
|
||||
});
|
||||
|
||||
|
@ -17,7 +17,9 @@
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:class="{ hide: fileList.length >= limit }"
|
||||
>
|
||||
<el-icon class="avatar-uploader-icon"><plus /></el-icon>
|
||||
<el-icon class="avatar-uploader-icon">
|
||||
<plus/>
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
@ -100,7 +102,7 @@ watch(
|
||||
fileList.value = list.map((item) => {
|
||||
if (typeof item === "string") {
|
||||
if (item.indexOf(baseUrl) === -1) {
|
||||
item = { name: baseUrl + item, url: baseUrl + item };
|
||||
item = {name: baseUrl + "/file" + item, url: baseUrl + "/file" + item};
|
||||
} else {
|
||||
item = {name: item, url: item};
|
||||
}
|
||||
@ -122,7 +124,7 @@ function handleRemove(file, files) {
|
||||
|
||||
// 上传成功回调
|
||||
function handleUploadSuccess(res) {
|
||||
uploadList.value.push({ name: res.fileName, url: res.url });
|
||||
uploadList.value.push({name: res.fileName, url: res.fileName});
|
||||
if (uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value
|
||||
.filter((f) => f.url !== undefined)
|
||||
|
@ -25,7 +25,8 @@
|
||||
v-for="item in checkList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>{{ item.name }}
|
||||
</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
@ -81,7 +82,8 @@
|
||||
false-label="1"
|
||||
true-label="2"
|
||||
v-model="modelValue.budgetMode"
|
||||
>面议</el-checkbox
|
||||
>面议
|
||||
</el-checkbox
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -161,15 +163,16 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { updateTechnologyDemand } from "@/api/dataApproval/enterpriseTechnologyDemand";
|
||||
import {demandCategoryList} from "@/utils/parameter";
|
||||
import WangEditor from "@/components/WangEditor";
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import {ElMessage} from "element-plus";
|
||||
import { ref, toRefs } from "vue";
|
||||
import {toRefs} from "vue";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import {batchTechnologyDemand} from "@/api/dataApproval/enterpriseTechnologyDemand";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const emit = defineEmits(["update-list"]);
|
||||
const props = defineProps({
|
||||
@ -187,7 +190,8 @@ const labelWidth = 160;
|
||||
const checkList = reactive(demandCategoryList);
|
||||
const approve = async (status) => {
|
||||
let title = status == 1 ? "通过" : "驳回";
|
||||
await updateTechnologyDemand({ id: modelValue.value.id, status });
|
||||
// await updateTechnologyDemand({ id: modelValue.value.id, status });
|
||||
await batchTechnologyDemand(modelValue.value.id, status)
|
||||
userStore.getUnApprovedTechnology();
|
||||
ElMessage.success(`已${title}需求`);
|
||||
emit("update:isShow", false);
|
||||
|
@ -38,12 +38,12 @@
|
||||
fieldKey="customers"
|
||||
ref="customerFormRef"
|
||||
/>
|
||||
<city-options
|
||||
v-model="form"
|
||||
disabled
|
||||
:labelWidth="labelWidth"
|
||||
ref="cityFormRef"
|
||||
></city-options>
|
||||
<!-- <city-options-->
|
||||
<!-- v-model="form"-->
|
||||
<!-- disabled-->
|
||||
<!-- :labelWidth="labelWidth"-->
|
||||
<!-- ref="cityFormRef"-->
|
||||
<!-- ></city-options>-->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果成熟度:" prop="maturity">
|
||||
@ -111,8 +111,10 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属单位:" prop="unit">
|
||||
<el-input v-model="form.unit"></el-input>
|
||||
</el-form-item> </el-col
|
||||
></el-row>
|
||||
</el-form-item>
|
||||
</el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果简介:" prop="description">
|
||||
@ -151,7 +153,8 @@
|
||||
:disabled="!form.image"
|
||||
type="primary"
|
||||
@click="downloadImage"
|
||||
>下载图片材料</el-link
|
||||
>下载图片材料
|
||||
</el-link
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -165,25 +168,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { demandCategoryList } from "@/utils/parameter";
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import {cooperationOptions, demandCategoryList, leadOptions, maturityOptions} from "@/utils/parameter";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import {reactive, toRefs} from "vue";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {
|
||||
expertAchievementInfo,
|
||||
updateExpertAchievement,
|
||||
} from "@/api/dataApproval/achivement";
|
||||
import { customDownload } from "@/utils/request";
|
||||
import {
|
||||
maturityOptions,
|
||||
leadOptions,
|
||||
cooperationOptions,
|
||||
} from "@/utils/parameter";
|
||||
import {batchAchievement, expertAchievementInfo,} from "@/api/dataApproval/achivement";
|
||||
import {downloadFile} from "../../../utils/request";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@ -209,7 +203,8 @@ const downloadImage = () => {
|
||||
};
|
||||
|
||||
const submitForm = async (status) => {
|
||||
await updateExpertAchievement({ ...form.value, status });
|
||||
// await updateExpertAchievement({ ...form.value, status });
|
||||
await batchAchievement([form.value.id], status);
|
||||
let successMessage;
|
||||
switch (status) {
|
||||
case "1":
|
||||
|
@ -224,7 +224,7 @@ const handleBatchApproval = async () => {
|
||||
`是否确认批量审核通过编号为${selectedIds.value.join(",")}的数据项?`
|
||||
)
|
||||
.then(async () => {
|
||||
await batchAchievement(selectedIds.value);
|
||||
await batchAchievement(selectedIds.value, 1);
|
||||
userStore.getUnApprovedAchivement();
|
||||
getList();
|
||||
ElMessage.success("批量审核成功");
|
||||
|
@ -244,19 +244,21 @@ const handleDelete = async (...ids) => {
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
};
|
||||
const handleBatchApproval = async () => {
|
||||
ElMessageBox.confirm(
|
||||
`是否确认批量审核通过编号为${selectedIds.value.join(",")}的数据项?`
|
||||
)
|
||||
.then(async () => {
|
||||
await batchTechnologyDemand(selectedIds.value);
|
||||
await batchTechnologyDemand(selectedIds.value.join(","), 1);
|
||||
userStore.getUnApprovedTechnology();
|
||||
getList();
|
||||
ElMessage.success("批量审核成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
};
|
||||
|
||||
// 修改为完成状态
|
||||
@ -268,7 +270,8 @@ const complete = (id) => {
|
||||
getList();
|
||||
ElMessage.success("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
});
|
||||
};
|
||||
|
||||
const showAppointBroker = ref(false);
|
||||
|
Reference in New Issue
Block a user