|
|
|
@ -44,9 +44,13 @@ |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="16"> |
|
|
|
|
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol" :wrapperCol="wrapperCol7"> |
|
|
|
|
<a-form-item label="项目(赛道)层次" v-bind="validateInfos.objLevel" :labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol7"> |
|
|
|
|
<a-radio-group v-model:value="formData.objLevel"> |
|
|
|
|
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{ item.name }}</a-radio> |
|
|
|
|
<a-radio v-for="item in objLevelll" :key="item.id" :value="item.id">{{ |
|
|
|
|
item.name |
|
|
|
|
}} |
|
|
|
|
</a-radio> |
|
|
|
|
</a-radio-group> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
@ -66,18 +70,21 @@ |
|
|
|
|
<a-col :span="11"> |
|
|
|
|
<a-form-item label="参与形式" v-bind="validateInfos.entryForm" :labelCol="labelCol" |
|
|
|
|
:wrapperCol="wrapperCol8"> |
|
|
|
|
<j-dict-select-tag type="radio" v-model:value="formData.entryForm" placeholder="请选择参与形式" dict-code="joinType" /> |
|
|
|
|
<j-dict-select-tag type="radio" v-model:value="formData.entryForm" |
|
|
|
|
placeholder="请选择参与形式" dict-code="joinType"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="6" v-if="formData.entryForm==='Y'"> |
|
|
|
|
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader" :labelCol="labelCol3" |
|
|
|
|
<a-form-item label="是否需要领队" v-bind="validateInfos.requireLeader" |
|
|
|
|
:labelCol="labelCol3" |
|
|
|
|
:wrapperCol="wrapperCol3"> |
|
|
|
|
<j-switch v-model:value="formData.requireLeader" :disabled="disabled"></j-switch> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="7" v-if="formData.entryForm==='Y'"> |
|
|
|
|
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName" :labelCol="labelCol3" |
|
|
|
|
:wrapperCol="wrapperCol3" > |
|
|
|
|
<a-form-item label="是否需要队伍名称" v-bind="validateInfos.requireTeamName" |
|
|
|
|
:labelCol="labelCol3" |
|
|
|
|
:wrapperCol="wrapperCol3"> |
|
|
|
|
<j-switch type='radio' v-model:value="formData.requireTeamName" dictCode="" |
|
|
|
|
placeholder="请选择是否需要队伍名称" :disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -101,79 +108,79 @@ |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第1编号" > |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFirst" placeholder="请输入队伍第1编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第1编号比值" v-bind="formData.teamSeqFirstVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFirstVal" placeholder="请输入第1编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<!-- |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第1编号" > |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFirst" placeholder="请输入队伍第1编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第1编号比值" v-bind="formData.teamSeqFirstVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFirstVal" placeholder="请输入第1编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
|
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第2编号" v-bind="formData.teamSeqSecond"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqSecond" placeholder="请输入队伍第2编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第2编号比值" v-bind="formData.teamSeqSecondVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqSecondVal" placeholder="请输入第2编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第2编号" v-bind="formData.teamSeqSecond"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqSecond" placeholder="请输入队伍第2编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第2编号比值" v-bind="formData.teamSeqSecondVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqSecondVal" placeholder="请输入第2编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
|
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第3编号" v-bind="formData.teamSeqThird"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqThird" placeholder="请输入队伍第3编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第3编号比值" v-bind="formData.teamSeqThirdVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqThirdVal" placeholder="请输入第3编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第4编号" v-bind="formData.teamSeqFourth"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFourth" placeholder="请输入队伍第4编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第4编号比值" v-bind="formData.teamSeqFourthVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFourthVal" placeholder="请输入第4编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第5编号" v-bind="formData.teamSeqFifth"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFifth" placeholder="请输入队伍第5编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第5编号比值" v-bind="formData.teamSeqFifthVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFifthVal" placeholder="请输入第5编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第3编号" v-bind="formData.teamSeqThird"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqThird" placeholder="请输入队伍第3编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第3编号比值" v-bind="formData.teamSeqThirdVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqThirdVal" placeholder="请输入第3编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第4编号" v-bind="formData.teamSeqFourth"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFourth" placeholder="请输入队伍第4编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第4编号比值" v-bind="formData.teamSeqFourthVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFourthVal" placeholder="请输入第4编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
<a-row v-if="formData.entryForm ==='Y'"> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="队伍第5编号" v-bind="formData.teamSeqFifth"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFifth" placeholder="请输入队伍第5编号" style="width: 100%" disabled/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="12"> |
|
|
|
|
<a-form-item label="第5编号比值" v-bind="formData.teamSeqFifthVal"> |
|
|
|
|
<a-input-number v-model:value="formData.teamSeqFifthVal" placeholder="请输入第5编号比值" |
|
|
|
|
style="width: 100%" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
</a-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--> |
|
|
|
|
--> |
|
|
|
|
|
|
|
|
|
<a-row> |
|
|
|
|
|
|
|
|
@ -186,7 +193,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireApply==='Y'"> |
|
|
|
|
<a-form-item label="开始时间" v-bind="validateInfos.applyStartTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择报名开始时间" v-model:value="formData.applyStartTime" |
|
|
|
|
showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -194,7 +202,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireApply==='Y'"> |
|
|
|
|
<a-form-item label="结束时间" v-bind="validateInfos.applyEndTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择报名结束时间" v-model:value="formData.applyEndTime" |
|
|
|
|
showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -212,7 +221,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireTopic==='Y'"> |
|
|
|
|
<a-form-item label="开始时间" v-bind="validateInfos.topicStartTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择选题开始时间" v-model:value="formData.topicStartTime" |
|
|
|
|
showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -220,7 +230,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireTopic==='Y'"> |
|
|
|
|
<a-form-item label="结束时间" v-bind="validateInfos.topicEndTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择选题结束时间" v-model:value="formData.topicEndTime" |
|
|
|
|
showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -229,7 +240,8 @@ |
|
|
|
|
|
|
|
|
|
<a-row> |
|
|
|
|
<a-col :span="5"> |
|
|
|
|
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks" :labelCol="labelCol4" |
|
|
|
|
<a-form-item label="上传作品" v-bind="validateInfos.requireUploadWorks" |
|
|
|
|
:labelCol="labelCol4" |
|
|
|
|
:wrapperCol="wrapperCol4"> |
|
|
|
|
<j-switch v-model:value="formData.requireUploadWorks" :disabled="disabled"></j-switch> |
|
|
|
|
</a-form-item> |
|
|
|
@ -238,7 +250,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'"> |
|
|
|
|
<a-form-item label="开始时间" v-bind="validateInfos.uploadStartTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择上传作品开始时间" v-model:value="formData.uploadStartTime" |
|
|
|
|
<a-date-picker placeholder="请选择上传作品开始时间" |
|
|
|
|
v-model:value="formData.uploadStartTime" |
|
|
|
|
showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -246,16 +259,19 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireUploadWorks==='Y'"> |
|
|
|
|
<a-form-item label="结束时间" v-bind="validateInfos.uploadEndTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择上传作品结束时间" v-model:value="formData.uploadEndTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择上传作品结束时间" |
|
|
|
|
v-model:value="formData.uploadEndTime" showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :span="24" v-if="formData.requireUploadWorks==='Y'"> |
|
|
|
|
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType" :labelCol="labelCol6" |
|
|
|
|
<a-form-item label="上传作品类型" v-bind="validateInfos.uploadWorksType" |
|
|
|
|
:labelCol="labelCol6" |
|
|
|
|
:wrapperCol="wrapperCol6"> |
|
|
|
|
<j-select-multiple type="list_multi" v-model:value="formData.uploadWorksType" |
|
|
|
|
dictCode="updateWorksType" placeholder="请选择上传作品类型" :disabled="disabled" |
|
|
|
|
dictCode="updateWorksType" placeholder="请选择上传作品类型" |
|
|
|
|
:disabled="disabled" |
|
|
|
|
:triggerChange="false"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
@ -270,7 +286,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireScore==='Y'"> |
|
|
|
|
<a-form-item label="开始时间" v-bind="validateInfos.scoreStartTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择评分开始时间" v-model:value="formData.scoreStartTime" |
|
|
|
|
showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -278,7 +295,8 @@ |
|
|
|
|
<a-col :span="9" v-if="formData.requireScore==='Y'"> |
|
|
|
|
<a-form-item label="结束时间" v-bind="validateInfos.scoreEndTime" :labelCol="labelCol5" |
|
|
|
|
:wrapperCol="wrapperCol5"> |
|
|
|
|
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime" showTime |
|
|
|
|
<a-date-picker placeholder="请选择评分结束时间" v-model:value="formData.scoreEndTime" |
|
|
|
|
showTime |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
|
|
|
|
:disabled="disabled"/> |
|
|
|
|
</a-form-item> |
|
|
|
@ -299,16 +317,18 @@ |
|
|
|
|
<BasicModal |
|
|
|
|
v-bind="$attrs" |
|
|
|
|
@register="register" |
|
|
|
|
title="Modal Title" |
|
|
|
|
title="比值配置" |
|
|
|
|
:height="800" |
|
|
|
|
@ok="handleOk" |
|
|
|
|
> |
|
|
|
|
<!-- <div v-for="(item,index) in num" :key="index">--> |
|
|
|
|
<!-- <a-input-number v-model="item.index"></a-input-number>--> |
|
|
|
|
<!-- <a-input-number v-model="item.value"></a-input-number>--> |
|
|
|
|
<!-- <a-button @click="delNum(index)">删除</a-button>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>--> |
|
|
|
|
|
|
|
|
|
<!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>--> |
|
|
|
|
<!-- <div v-for="(item,index) in num" :key="index">--> |
|
|
|
|
<!-- <a-input-number v-model="item.index"></a-input-number>--> |
|
|
|
|
<!-- <a-input-number v-model="item.value"></a-input-number>--> |
|
|
|
|
<!-- <a-button @click="delNum(index)">删除</a-button>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <a-button type="primary" @click="addNum" class="mr-2">从内部关闭弹窗</a-button>--> |
|
|
|
|
|
|
|
|
|
<!-- <a-button type="primary" @click="setModalProps">从内部修改title</a-button>--> |
|
|
|
|
<JVxeTable |
|
|
|
|
ref="tableRef" |
|
|
|
|
stripe |
|
|
|
@ -326,8 +346,8 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { BasicModal, useModalInner,useModal } from '/@/components/Modal'; |
|
|
|
|
import {ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted} from 'vue'; |
|
|
|
|
import {BasicModal, useModal} from '/@/components/Modal'; |
|
|
|
|
import {computed, defineExpose, defineProps, nextTick, onMounted, reactive, ref} from 'vue'; |
|
|
|
|
import {defHttp} from '/@/utils/http/axios'; |
|
|
|
|
import {useMessage} from '/@/hooks/web/useMessage'; |
|
|
|
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; |
|
|
|
@ -335,17 +355,39 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue'; |
|
|
|
|
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; |
|
|
|
|
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; |
|
|
|
|
import {getValueType} from '/@/utils'; |
|
|
|
|
import {saveOrUpdate, getProjectlevel} from '../AnnualCompPoint.api'; |
|
|
|
|
import {getProjectlevel, saveOrUpdate} from '../AnnualCompPoint.api'; |
|
|
|
|
import {Form} from 'ant-design-vue'; |
|
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable'; |
|
|
|
|
import { JVxeTypes, JVxeColumn} from '/@/components/jeecg/JVxeTable/types'; |
|
|
|
|
const dataSource = ref([]) |
|
|
|
|
const title = ref<string>(''); |
|
|
|
|
const width = ref<number>(800); |
|
|
|
|
const visible = ref<boolean>(false); |
|
|
|
|
const disableSubmit = ref<boolean>(false); |
|
|
|
|
const realForm = ref(); |
|
|
|
|
import {JVxeTable} from '/@/components/jeecg/JVxeTable'; |
|
|
|
|
import {JVxeColumn, JVxeTypes} from '/@/components/jeecg/JVxeTable/types'; |
|
|
|
|
// 是否正在加载 |
|
|
|
|
const loading = ref(false); |
|
|
|
|
// 分页器参数 |
|
|
|
|
const pagination = reactive({ |
|
|
|
|
// 当前页码 |
|
|
|
|
current: 1, |
|
|
|
|
// 每页的条数 |
|
|
|
|
pageSize: 200, |
|
|
|
|
// 可切换的条数 |
|
|
|
|
pageSizeOptions: ['10', '20', '30', '100', '200'], |
|
|
|
|
// 数据总数(目前并不知道真实的总数,所以先填写0,在后台查出来后再赋值) |
|
|
|
|
total: 0, |
|
|
|
|
}); |
|
|
|
|
// 选择的行 |
|
|
|
|
const selectedRows = ref<Recordable[]>([]); |
|
|
|
|
// 数据源,控制表格的数据 |
|
|
|
|
const dataSource = ref<Recordable[]>([]); |
|
|
|
|
// 列配置,控制表格显示的列 |
|
|
|
|
const columns = ref<JVxeColumn[]>([ |
|
|
|
|
// { key: 'num', title: '序号', width: 80, type: JVxeTypes.normal }, |
|
|
|
|
{ key: 'teamSeqFirst', title: '序号1', width: 80, type: JVxeTypes.normal }, |
|
|
|
|
{ |
|
|
|
|
title: '比值', |
|
|
|
|
key: 'raito', |
|
|
|
|
key: 'teamSeqFirstVal', |
|
|
|
|
type: JVxeTypes.input, |
|
|
|
|
width: 180, |
|
|
|
|
defaultValue: '', |
|
|
|
@ -364,7 +406,7 @@ const columns = ref<JVxeColumn[]>([ |
|
|
|
|
// message: '${title}不能重复', |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
handler({ cellValue, row, column }, callback, target) { |
|
|
|
|
handler({cellValue, row, column}, callback, target) { |
|
|
|
|
// cellValue 当前校验的值 |
|
|
|
|
// callback(flag, message) 方法必须执行且只能执行一次 |
|
|
|
|
// flag = 是否通过了校验,不填写或者填写 null 代表不进行任何操作 |
|
|
|
@ -381,7 +423,51 @@ const columns = ref<JVxeColumn[]>([ |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
]) |
|
|
|
|
function handleTableSave({ $table, target }) { |
|
|
|
|
|
|
|
|
|
// 查询url地址 |
|
|
|
|
enum Api { |
|
|
|
|
getData = '/teamSeq/listByPointId', |
|
|
|
|
// 模拟保存单行数据(即时保存) |
|
|
|
|
saveRow = '/mock/vxe/immediateSaveRow', |
|
|
|
|
// 模拟保存整个表格的数据 |
|
|
|
|
saveAll = '/teamSeq/saveOrUpdate4TeamSeq', |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 加载数据 |
|
|
|
|
async function loadData() { |
|
|
|
|
alert(formData.id) |
|
|
|
|
// loading.value = true; |
|
|
|
|
// 调用查询数据接口 |
|
|
|
|
await defHttp |
|
|
|
|
.get({ |
|
|
|
|
// 请求地址 |
|
|
|
|
url: Api.getData, |
|
|
|
|
// // 封装查询条件 |
|
|
|
|
params: { |
|
|
|
|
pointId: formData.id |
|
|
|
|
// pageNo: pagination.current, |
|
|
|
|
// pageSize: pagination.pageSize, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
.then((result) => { |
|
|
|
|
// 后台查询回来的 total,数据总数量 |
|
|
|
|
// pagination.total = result.total; |
|
|
|
|
// 将查询的数据赋值给 dataSource |
|
|
|
|
dataSource.value = result.records; |
|
|
|
|
// 重置选择 |
|
|
|
|
selectedRows.value = []; |
|
|
|
|
}) |
|
|
|
|
.finally(() => { |
|
|
|
|
// 这里是无论成功或失败都会执行的方法,在这里关闭loading |
|
|
|
|
loading.value = false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleOk() { |
|
|
|
|
alert("handleOk") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleTableSave({$table, target}) { |
|
|
|
|
// 校验整个表格 |
|
|
|
|
$table.validate().then((errMap) => { |
|
|
|
|
// 校验通过 |
|
|
|
@ -411,6 +497,7 @@ function handleTableSave({ $table, target }) { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
|
// objLevelll: { type: Array, default: () => [] }, |
|
|
|
|
formDisabled: {type: Boolean, default: false}, |
|
|
|
@ -420,30 +507,33 @@ const props = defineProps({ |
|
|
|
|
}, |
|
|
|
|
formBpm: {type: Boolean, default: true} |
|
|
|
|
}); |
|
|
|
|
const [register, { openModal }] = useModal(); |
|
|
|
|
const [register, {openModal}] = useModal(); |
|
|
|
|
// const [register, { closeModal, setModalProps,openModal }] = useModalInner(); |
|
|
|
|
const showModel = () => { |
|
|
|
|
loadData(); |
|
|
|
|
|
|
|
|
|
openModal() |
|
|
|
|
|
|
|
|
|
// console.log(1111) |
|
|
|
|
openModal() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let num = ref([ |
|
|
|
|
{ |
|
|
|
|
value:'', |
|
|
|
|
index:1 |
|
|
|
|
value: '', |
|
|
|
|
index: 1 |
|
|
|
|
} |
|
|
|
|
]) |
|
|
|
|
const addNum = () => { |
|
|
|
|
num.value.push({value:'',index:num.value.length}) |
|
|
|
|
num.value.push({value: '', index: num.value.length}) |
|
|
|
|
} |
|
|
|
|
const delNum = (index) => { |
|
|
|
|
num.value.splice(index,1) |
|
|
|
|
num.value.splice(index, 1) |
|
|
|
|
} |
|
|
|
|
const objLevelll = ref([]) |
|
|
|
|
const getProjectlevelEvent = async() => { |
|
|
|
|
const getProjectlevelEvent = async () => { |
|
|
|
|
const res = await getProjectlevel() |
|
|
|
|
objLevelll.value = res |
|
|
|
|
console.log(res,'2222') |
|
|
|
|
console.log(res, '2222') |
|
|
|
|
} |
|
|
|
|
getProjectlevelEvent() |
|
|
|
|
const formRef = ref(); |
|
|
|
@ -542,7 +632,7 @@ function add() { |
|
|
|
|
if (props.objLevelll.length !== 0) { |
|
|
|
|
formData.objLevel = props.objLevelll[0].id; |
|
|
|
|
} |
|
|
|
|
edit({ ...formData }); |
|
|
|
|
edit({...formData}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|