测试优化
This commit is contained in:
@ -10,12 +10,11 @@
|
||||
@click="isDisabled = false"
|
||||
class="px-8 py-2.5 transition-all duration-300 font-medium"
|
||||
v-if="isDisabled"
|
||||
v-hasPermi="['cailiaoshebei:purchaseUser:addOrUpdate']"
|
||||
v-hasPermi="['bidding:biddingUser:add']"
|
||||
>
|
||||
点击编辑
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 表单内容区域 -->
|
||||
<el-form ref="leaveFormRef" :model="form" :rules="rules" label-width="120px" class="p-6 pt30 space-y-6 h75" :disabled="isDisabled">
|
||||
<!-- 设计负责人 -->
|
||||
@ -30,7 +29,6 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 提交按钮区域 -->
|
||||
<div class="flex justify-center space-x-6 mt-8 pt-6 border-t border-gray-100" v-if="!isDisabled">
|
||||
<el-button
|
||||
@ -38,7 +36,7 @@
|
||||
@click="submitForm"
|
||||
icon="Check"
|
||||
class="px-8 py-2.5 transition-all duration-300 transform hover:scale-105 bg-blue-500 hover:bg-blue-600 text-white font-medium"
|
||||
v-hasPermi="['cailiaoshebei:purchaseUser:addOrUpdate']"
|
||||
v-hasPermi="['bidding:biddingUser:add']"
|
||||
>
|
||||
确认提交
|
||||
</el-button>
|
||||
@ -53,22 +51,14 @@
|
||||
|
||||
<script setup name="PersonnelForm" lang="ts">
|
||||
import { ref, reactive, computed, onMounted, toRefs } from 'vue';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import type { ComponentInternalInstance } from 'vue';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
import { ElMessage, ElLoading } from 'element-plus';
|
||||
import { biddingGetUser, AddbiddingUser, biddingUserList } from '@/api/bidding/appointment';
|
||||
import { getProject } from '@/api/project/project';
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取当前选中的项目
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
// 专业字典数据
|
||||
const { des_user_major } = toRefs<any>(proxy?.useDict('des_user_major'));
|
||||
const isDisabled = ref(false);
|
||||
const projectInfo = ref({}); //项目信息
|
||||
// 表单数据
|
||||
const form = reactive({
|
||||
id: null,
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="p-4 bg-gray-50 min-h-screen">
|
||||
<!-- 卡片容器:控制最大宽度+居中+圆角阴影 -->
|
||||
<el-card shadow="hover" class="max-w-6xl mx-auto rounded-xl overflow-hidden border-0"
|
||||
style="background-color: #ffffff">
|
||||
<el-card shadow="hover" class="max-w-6xl mx-auto rounded-xl overflow-hidden border-0" style="background-color: #ffffff">
|
||||
<!-- 卡片头部:项目信息展示区 -->
|
||||
<template #header>
|
||||
<div class="bg-blue-50 px-6 rounded-t-xl" style="padding: 10px 20px">
|
||||
@ -64,8 +63,15 @@
|
||||
</div> -->
|
||||
</template>
|
||||
<!-- 中标信息表单区域 -->
|
||||
<el-form :disabled="isDisabled" ref="listOfWinningBidsFormRef" :model="form" :rules="rules" label-width="150px"
|
||||
class="p-6 pt-4" style="background-color: #ffffff">
|
||||
<el-form
|
||||
:disabled="isDisabled"
|
||||
ref="listOfWinningBidsFormRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="150px"
|
||||
class="p-6 pt-4"
|
||||
style="background-color: #ffffff"
|
||||
>
|
||||
<el-row :gutter="32">
|
||||
<!-- 招标代理机构 -->
|
||||
<el-col :span="12">
|
||||
@ -82,15 +88,25 @@
|
||||
<!-- 投标截止时间 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="投标截止时间" prop="biddingDeadline" class="rounded-lg border border-gray-100 p-1 mb-5">
|
||||
<el-date-picker v-model="form.biddingDeadline" format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="请选择投标截止时间" />
|
||||
<el-date-picker
|
||||
v-model="form.biddingDeadline"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="请选择投标截止时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 开标时间 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开标时间" prop="bidopeningTime" class="rounded-lg border border-gray-100 p-1 mb-5">
|
||||
<el-date-picker v-model="form.bidopeningTime" format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="请选择开标时间" />
|
||||
<el-date-picker
|
||||
v-model="form.bidopeningTime"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="请选择开标时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -108,17 +124,26 @@
|
||||
</el-col>
|
||||
<!-- 答疑截止时间 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="答疑截止时间" prop="answeringDeadlineTime"
|
||||
class="rounded-lg border border-gray-100 p-1 mb-5">
|
||||
<el-date-picker v-model="form.answeringDeadlineTime" type="datetime" format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择答疑截止时间" />
|
||||
<el-form-item label="答疑截止时间" prop="answeringDeadlineTime" class="rounded-lg border border-gray-100 p-1 mb-5">
|
||||
<el-date-picker
|
||||
v-model="form.answeringDeadlineTime"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择答疑截止时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 澄清截止时间 -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="澄清截止时间" prop="clarifyDeadlineTime" class="rounded-lg border border-gray-100 p-1 mb-5">
|
||||
<el-date-picker format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss "
|
||||
v-model="form.clarifyDeadlineTime" type="datetime" placeholder="请选择澄清截止时间" />
|
||||
<el-date-picker
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss "
|
||||
v-model="form.clarifyDeadlineTime"
|
||||
type="datetime"
|
||||
placeholder="请选择澄清截止时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 项目概况 -->
|
||||
@ -131,22 +156,31 @@
|
||||
<!-- 操作按钮区域 -->
|
||||
<el-row v-if="!form.id" class="mt-4">
|
||||
<el-col :span="24" class="text-center">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm"
|
||||
v-hasPermi="['bidding:listOfWinningBids:add', 'bidding:listOfWinningBids:edit']" class="rounded-full px-8"
|
||||
size="large">
|
||||
<el-button
|
||||
:loading="buttonLoading"
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-hasPermi="['bidding:listOfWinningBids:add', 'bidding:listOfWinningBids:edit']"
|
||||
class="rounded-full px-8"
|
||||
size="large"
|
||||
>
|
||||
确认提交
|
||||
</el-button>
|
||||
<el-button type="default" @click="resetForm" class="ml-6 rounded-full px-8" size="large"> 重置 </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-top: 20px;" v-if="form.id">
|
||||
<span style=" color: rgb(38 153 255);
|
||||
display: inline-block;
|
||||
margin-left: 40px;
|
||||
font-weight: 700;">是否中标配置</span>
|
||||
<el-form ref="listOfWinningBidsFormRef" :disabled="iswhetherBid" :model="form" :rules="rules"
|
||||
label-width="150px" class="p-6 pt-4" style="background-color: #ffffff">
|
||||
<div style="margin-top: 20px" v-if="form.id">
|
||||
<span style="color: rgb(38 153 255); display: inline-block; margin-left: 40px; font-weight: 700">是否中标配置</span>
|
||||
<el-form
|
||||
ref="listOfWinningBidsFormRef"
|
||||
:disabled="iswhetherBid"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="150px"
|
||||
class="p-6 pt-4"
|
||||
style="background-color: #ffffff"
|
||||
>
|
||||
<el-row>
|
||||
<!-- 是否中标(必填) -->
|
||||
<el-col :span="12">
|
||||
@ -174,9 +208,14 @@
|
||||
<!-- 操作按钮区域 -->
|
||||
<el-row class="mt-4" v-if="!iswhetherBid && form.whetherBid == '0'">
|
||||
<el-col :span="24" class="text-center">
|
||||
<el-button :loading="buttonLoading1" type="primary" @click="submitForm"
|
||||
<el-button
|
||||
:loading="buttonLoading1"
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-hasPermi="['bidding:listOfWinningBids:add', 'bidding:listOfWinningBids:edit']"
|
||||
class="rounded-full px-8" size="large">
|
||||
class="rounded-full px-8"
|
||||
size="large"
|
||||
>
|
||||
中标
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -205,10 +244,6 @@ const fileList = ref([]);
|
||||
const userStore = useUserStoreHook();
|
||||
const iswhetherBid = ref(false); // 是否中标
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
// const realUploadUrl = computed(() => {
|
||||
// const search = new URLSearchParams().toString();
|
||||
// return search ? `${baseUrl}${props.uploadUrl}?${search}` : `${baseUrl}${props.uploadUrl}`;
|
||||
// });
|
||||
// 项目信息(仅展示,非表单编辑)
|
||||
const projectInfo = reactive({
|
||||
principal: undefined,
|
||||
@ -323,14 +358,7 @@ const getDictLabel = (dictList: any[], value: any) => {
|
||||
const dictItem = dictList.find((item) => item.value === value);
|
||||
return dictItem ? dictItem.label : '';
|
||||
};
|
||||
const upload = ref<UploadInstance>();
|
||||
|
||||
const handleExceed: UploadProps['onExceed'] = (files) => {
|
||||
upload.value!.clearFiles();
|
||||
const file = files[0] as UploadRawFile;
|
||||
file.uid = genFileId();
|
||||
upload.value!.handleStart(file);
|
||||
};
|
||||
/**
|
||||
* 初始化中标数据(根据项目ID查询已有记录)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user