bug 修复

This commit is contained in:
BianLzhaoMin 2025-09-06 15:34:24 +08:00
parent 8d011e88c8
commit 271478037b
11 changed files with 101 additions and 60 deletions

View File

@ -153,6 +153,12 @@ export default {
return false return false
} }
//
if (file.name.length > 30) {
this.$modal.msgError('文件名称不能超过30个字符')
return false
}
this.$modal.loading('图片正在上传,请稍候...') this.$modal.loading('图片正在上传,请稍候...')
// # // #
const newFileName = file.name.replace(/#/g, '@') const newFileName = file.name.replace(/#/g, '@')
@ -200,6 +206,16 @@ export default {
return false return false
} }
//
if (file.name.length > 30) {
this.$modal.msgError('文件名称不能超过30个字符')
this.$emit(
'update:fileList',
fileList.filter((item) => item.uid !== file.uid),
)
return false
}
// // # // // #
// const newFileName = file.name.replace(/#/g, '@') // const newFileName = file.name.replace(/#/g, '@')
// const newFile = new File([file], newFileName, { type: file.type }) // const newFile = new File([file], newFileName, { type: file.type })

View File

@ -169,6 +169,8 @@ export default {
return false return false
} }
console.log(file.name, 'file.name')
this.$modal.loading('图片正在上传,请稍候...') this.$modal.loading('图片正在上传,请稍候...')
// # // #
const newFileName = file.name.replace(/#/g, '@') const newFileName = file.name.replace(/#/g, '@')
@ -215,6 +217,16 @@ export default {
) )
return false return false
} }
//
if (file.name.length > 30) {
this.$modal.msgError('文件名称不能超过30个字符')
this.$emit(
'update:fileList',
fileList.filter((item) => item.uid !== file.uid),
)
return false
}
this.$emit('update:fileList', fileList) this.$emit('update:fileList', fileList)
this.$emit('onUploadChange', fileList) this.$emit('onUploadChange', fileList)
}, },

View File

@ -95,6 +95,7 @@
size="mini" size="mini"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
v-if="!data.proId"
v-hasPermi="['att:machine:delete']" v-hasPermi="['att:machine:delete']"
@click="onHandleDeleteSubBaseInfo(data)" @click="onHandleDeleteSubBaseInfo(data)"
> >

View File

@ -261,14 +261,17 @@ export default {
}, },
// //
onHandleConfirmFinish: debounce(async () => { onHandleConfirmFinish: debounce(function () {
try { const handleAsync = async () => {
await this.$refs.addApplyFormRef.onHandleConfirmFinishFun() try {
this.handleCloseDialogOuter() await this.$refs.addApplyFormRef.onHandleConfirmFinishFun()
this.$refs.cardReplacementApplyTableRef.getTableList() this.handleCloseDialogOuter()
} catch (error) { this.$refs.cardReplacementApplyTableRef.getTableList()
// console.log('', error) } catch (error) {
// console.log('', error)
}
} }
handleAsync()
}, 1500), }, 1500),
// //

View File

@ -1352,10 +1352,10 @@ export default {
// //
onChangeProId(val) { onChangeProId(val) {
this.keyInfoForm.teamId = ''
this.keyInfoForm.subId = ''
if (!val) { if (!val) {
this.keyInfoForm.proName = '' this.keyInfoForm.proName = ''
this.keyInfoForm.subId = ''
this.keyInfoForm.teamId = ''
this.subSelectList = [] this.subSelectList = []
this.teamSelectList = [] this.teamSelectList = []
return return
@ -1378,9 +1378,9 @@ export default {
}, },
// //
onChangeSubId(val) { onChangeSubId(val) {
this.keyInfoForm.teamId = ''
if (!val) { if (!val) {
this.keyInfoForm.subName = '' this.keyInfoForm.subId = ''
this.keyInfoForm.teamId = ''
this.teamSelectList = [] this.teamSelectList = []
return return
} }

View File

@ -13,13 +13,13 @@ export const formLabel = [
f_width: '180px', f_width: '180px',
isShow: false, // 是否展示label isShow: false, // 是否展示label
}, },
{ // {
f_label: '联系方式', // f_label: '联系方式',
f_model: 'phone', // f_model: 'phone',
f_type: 'ipt', // f_type: 'ipt',
f_width: '180px', // f_width: '180px',
isShow: false, // 是否展示label // isShow: false, // 是否展示label
}, // },
{ {
f_label: '工程', f_label: '工程',
f_model: 'proId', f_model: 'proId',
@ -28,14 +28,14 @@ export const formLabel = [
isShow: false, // 是否展示label isShow: false, // 是否展示label
f_selList: [], // 工程列表 f_selList: [], // 工程列表
}, },
{ // {
f_label: '工种', // f_label: '工种',
f_model: 'postId', // f_model: 'postId',
f_type: 'sel', // f_type: 'sel',
f_width: '180px', // f_width: '180px',
isShow: false, // 是否展示label // isShow: false, // 是否展示label
f_selList: [], // 工种列表 // f_selList: [], // 工种列表
}, // },
{ {
f_label: '分包', f_label: '分包',
f_model: 'subId', f_model: 'subId',

View File

@ -244,14 +244,17 @@ export default {
}, },
// //
onHandleConfirmAddOrEdit: debounce(async () => { onHandleConfirmAddOrEdit: debounce(function () {
try { const handleAsync = async () => {
await this.$refs.addOrEditFormContentRef.onHandleConfirmAddOrEditFun() try {
this.$refs.personEntryTableRef.getTableList() await this.$refs.addOrEditFormContentRef.onHandleConfirmAddOrEditFun()
this.handleCloseDialogOuter() this.$refs.personEntryTableRef.getTableList()
} catch (error) { this.handleCloseDialogOuter()
// console.log('', error) } catch (error) {
// console.log('', error)
}
} }
handleAsync()
}, 1000), }, 1000),
// //

View File

@ -233,17 +233,24 @@ export default {
}, },
// //
onHandleConfirmAddOrEdit: debounce(async () => { onHandleConfirmAddOrEdit: debounce(function () {
try { //
const res = const handleAsync = async () => {
await this.$refs.uploadContractContentRef.onHandleConfirmAddOrEditFun() try {
if (res !== 'isClose') { const res =
this.$refs.contractWitnessTableRef.getTableList() await this.$refs.uploadContractContentRef.onHandleConfirmAddOrEditFun()
if (res !== 'isClose') {
this.$refs.contractWitnessTableRef.getTableList()
}
this.handleCloseDialogOuter()
} catch (error) {
//
console.error('表单提交失败', error)
} }
this.handleCloseDialogOuter()
} catch (error) {
// console.log('', error)
} }
//
handleAsync()
}, 1000), }, 1000),
// //

View File

@ -190,18 +190,21 @@ export default {
}, },
// //
onHandleConfirmAddOrEdit: debounce(async () => { onHandleConfirmAddOrEdit: debounce(function () {
try { const handleAsync = async () => {
const res = try {
await this.$refs.uploadContractContentRef.onHandleConfirmAddOrEditFun() const res =
await this.$refs.uploadContractContentRef.onHandleConfirmAddOrEditFun()
if (res !== 'isClose') { if (res !== 'isClose') {
this.$refs.wageCardWitnessTableRef.getTableList() this.$refs.wageCardWitnessTableRef.getTableList()
}
this.handleCloseDialogOuter()
} catch (error) {
// console.log('', error)
} }
this.handleCloseDialogOuter()
} catch (error) {
// console.log('', error)
} }
handleAsync()
}, 1000), }, 1000),
// //

View File

@ -152,7 +152,7 @@ export default {
sex: this.sex, sex: this.sex,
isAtt: this.isAtt, isAtt: this.isAtt,
postId: this.postId, postId: this.postId,
mainProId: this.selectCompany, subComId: this.selectCompany,
}, },
commonSlots: [ commonSlots: [
'onSiteCount', 'onSiteCount',

View File

@ -2,17 +2,13 @@
<!-- 固定临时人员 --> <!-- 固定临时人员 -->
<div class="person-ratio"> <div class="person-ratio">
<div class="person-ratio-row"> <div class="person-ratio-row">
<div> <div @click="onHandleOpenDialog('fixed')">
<svg-icon icon-class="fixed-person" style="font-size: 32px" /> <svg-icon icon-class="fixed-person" style="font-size: 32px" />
<span @click="onHandleOpenDialog('fixed')"> <span> {{ personAttendanceData.einNum }}</span>
{{ personAttendanceData.einNum }}</span
>
</div> </div>
<div> <div @click="onHandleOpenDialog('temp')">
<svg-icon icon-class="temp-person" style="font-size: 26px" /> <svg-icon icon-class="temp-person" style="font-size: 26px" />
<span @click="onHandleOpenDialog('temp')"> <span> {{ personAttendanceData.tempNum }}</span>
{{ personAttendanceData.tempNum }}</span
>
</div> </div>
</div> </div>