讲师管理bug

This commit is contained in:
zhangsir
2024-12-14 13:35:16 +08:00
parent 31aea6411c
commit 52fd9f768d
5 changed files with 25 additions and 17 deletions

View File

@@ -277,7 +277,7 @@
</template> </template>
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch> <!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
</a-input> --> </a-input> -->
<a-input-number @blur="blurScore" @focus="focusScore" v-model:value="formParam.score" :precision="0" :min="0" :max="100" <a-input-number @blur="blurScore" @focus="focusScore" v-model:value="formParam.score" :precision="0" :min="1" :max="100"
style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" /> style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -455,7 +455,7 @@ export default {
teachingDate: null, teachingDate: null,
teacherId:null, teacherId:null,
mobile:null, mobile:null,
score: 0 score: null
}, },
searchdate: undefined, //选择时间 searchdate: undefined, //选择时间
searchParam: { searchParam: {
@@ -894,7 +894,7 @@ export default {
name: null, name: null,
type: null, type: null,
teaching: null, teaching: null,
score: 0, score: null,
remark: null, remark: null,
teachingDate: null, teachingDate: null,
teacherId:null teacherId:null
@@ -976,10 +976,10 @@ const sendName=()=>{
state.formParam.courseName = state.formParam.courseName.replace(/\s/g, ''); state.formParam.courseName = state.formParam.courseName.replace(/\s/g, '');
} }
const blurScore = () => { const blurScore = () => {
!state.formParam.score && (state.formParam.score = '0') // !state.formParam.score && (state.formParam.score = '0')
} }
const focusScore = () => { const focusScore = () => {
state.formParam.score == 0 && (state.formParam.score = null) // state.formParam.score == 0 && (state.formParam.score = null)
} }
const sendRemark=()=>{ const sendRemark=()=>{
state.formParam.remark = state.formParam.remark.replace(/\s/g, ''); state.formParam.remark = state.formParam.remark.replace(/\s/g, '');

View File

@@ -340,7 +340,7 @@
</template> </template>
<!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch> <!-- <a-input class="draitem" v-model:value="formParam.score" @blur="clearscoreNumber" placeholder="" allowClear showSearch>
</a-input> --> </a-input> -->
<a-input-number @blur="blurScore" @focus="focusScore" v-model:value="formParam.score" :precision="0" :min="0" :max="100" <a-input-number @blur="blurScore" @focus="focusScore" v-model:value="formParam.score" :precision="0" :min="1" :max="100"
style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" /> style="width:100%; height: 40px; border-radius: 8px ; " placeholder="请输入评分" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -1165,7 +1165,7 @@ export default {
courseName: null, courseName: null,
teaching: null, teaching: null,
studys: null, studys: null,
score: 0, score: null,
type: null, type: null,
remark: null, remark: null,
trainOrgId: null, trainOrgId: null,
@@ -1392,10 +1392,10 @@ export default {
state.formParam.score = state.formParam.score.replace(/\D/g, ''); state.formParam.score = state.formParam.score.replace(/\D/g, '');
} }
const blurScore = () => { const blurScore = () => {
!state.formParam.score && (state.formParam.score = '0') // !state.formParam.score && (state.formParam.score = '0')
} }
const focusScore = () => { const focusScore = () => {
state.formParam.score == 0 && (state.formParam.score = null) // state.formParam.score == 0 && (state.formParam.score = null)
} }
const clearstudysNumber = () => { const clearstudysNumber = () => {
state.formParam.studys = state.formParam.studys.replace(/\D/g, ''); state.formParam.studys = state.formParam.studys.replace(/\D/g, '');

View File

@@ -316,7 +316,7 @@
/> />
评分 评分
</template> </template>
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="0" :precision="0" placeholder="请输入评分" <a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="1" :precision="0" placeholder="请输入评分"
allowClear > allowClear >
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>

View File

@@ -172,7 +172,7 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div :style="{ <div v-if="formParam?.status==1||formParam?.status==5" :style="{
position: 'absolute', position: 'absolute',
right: 0, right: 0,
bottom: 0, bottom: 0,
@@ -184,7 +184,7 @@
zIndex: 1, zIndex: 1,
}"> }">
<a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button> <a-button class="drabtn" @click="cancelTeachingDialog">取消</a-button>
<a-button class="drabtn" type="primary" @click="cancelTeachingDialog" :loading="buttonLoading">确定 <a-button class="drabtn" type="primary" @click="cancelTeachingDialog(1)" :loading="buttonLoading">提交
</a-button> </a-button>
<!-- <a-button class="drabtn" @click="cancelTeachingDialog" type="primary" danger>拒绝</a-button> --> <!-- <a-button class="drabtn" @click="cancelTeachingDialog" type="primary" danger>拒绝</a-button> -->
</div> </div>
@@ -481,7 +481,7 @@
ellipsis: true, ellipsis: true,
align: "center", align: "center",
width: 120, width: 120,
customCell: (record) => {return{style:{color:['#67C23A','#F56C6C'][record.status]}}}, // customCell: (record) => {return{style:{color:['#67C23A','#F56C6C'][record.status]}}},
customRender: (value) => { customRender: (value) => {
switch (value.record.status) { switch (value.record.status) {
case 0: case 0:
@@ -598,9 +598,14 @@
}) })
} }
//取消按钮 清空输入的数据 //取消按钮 清空输入的数据
const cancelTeachingDialog = () => { const cancelTeachingDialog = (val) => {
if(state.teachingdialog = true ) if(state.teachingdialog = true )
{ {
console.log(val,'valllllll')
if(val == 1){
submit(state.formParam)
return
}
state.teachingdialog = false state.teachingdialog = false
cancel() cancel()
} }
@@ -705,10 +710,13 @@
if(res.data.code == 200){ if(res.data.code == 200){
message.success('提交成功') message.success('提交成功')
getTableDate(); getTableDate();
cancel()
state.teachingdialog = false
} }
}).catch(err=>{ }).catch(err=>{
message.destroy() message.destroy()
cancel()
state.teachingdialog = false
message.error(err.data.msg) message.error(err.data.msg)
}) })
} }

View File

@@ -398,7 +398,7 @@
/> />
评分 评分
</template> </template>
<a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="0" :precision="0" placeholder="请输入评分" <a-input-number class="draitem" v-model:value="formParam.score" :defaultValue="null" :max="100" :controls="false" :min="1" :precision="0" placeholder="请输入评分"
allowClear @change="scoreNumber"> allowClear @change="scoreNumber">
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
@@ -1454,7 +1454,7 @@ getAllLevelList().then((res) => {
const clearscoreNumber= () => { const clearscoreNumber= () => {
state.formParam.score = state.formParam.score?.replace(/\D/g, ''); state.formParam.score = state.formParam.score?.replace(/\D/g, '');
state.formParam.score == 0 && (state.formParam.score = null); state.formParam.score == 0 && (state.formParam.score = null);
state.formParam.score > 10 && (state.formParam.score = '10'); // state.formParam.score > 10 && (state.formParam.score = '10');
} }
const payExpense = () => { const payExpense = () => {
state.formParam.payableExpense = state.formParam.payableExpense?.replace(/\D/g, ''); state.formParam.payableExpense = state.formParam.payableExpense?.replace(/\D/g, '');