nxdt-uniapp/pages/projectApproval/component/OtherMaterial.vue

97 lines
2.2 KiB
Vue
Raw Normal View History

2025-01-16 17:36:46 +08:00
<template>
<div>
<Title title="其他材料" />
<Preview :dataList="otherMaterials" />
<Title title="审批意见" />
<u--textarea
v-model="textareaValue"
placeholder="请输入内容"
count
height="105"
@blur="handleBlur"
:disabled="isDetail"
/>
<Title title="审批记录" />
<Steps :data="approvalRecordList" />
</div>
</template>
<script>
import Steps from 'pages/component/Steps'
import { selectFile } from '@/api/project'
import { filterInput } from '@/utils/regular'
export default {
props: {
isDetail: {
type: Boolean,
default: false
},
isLeave: {
type: Boolean,
default: false
},
isSubcontractor: {
type: Boolean,
default: false
},
params: {
type: Object,
default: () => {}
},
approvalRecordList: {
type: Array,
default: () => []
}
},
components: { Steps },
data() {
return {
// 其他材料
otherMaterials: [],
// 离场原因
leaveValue: '',
// 审批意见
textareaValue: ''
}
},
mounted() {
if (this.isSubcontractor) {
}
this.getOtherMaterials()
},
methods: {
handleBlur() {
console.log('审批意见', this.textareaValue)
this.textareaValue = filterInput(this.textareaValue)
this.$emit('handleOpinion', { OtherMaterial: this.textareaValue })
},
// 获取其他材料
getOtherMaterials() {
const params = {
proId: this.params.proId,
uuid: this.params.uuid,
subUuid: this.params.subUuid,
supUuid: this.params.supUuid,
taskId: this.params.taskId,
consUuid: this.params.consUuid,
classification: this.isSubcontractor ? '3' : '2',
fromType: '1',
informationType: '5'
}
// console.log('🚀 ~ getEnterpriseQualification ~ params:', params)
selectFile(params).then(res => {
console.log('其他材料', res)
if (res.data && res.data.length > 0) {
this.otherMaterials = res.data
} else {
this.otherMaterials = []
}
})
}
}
}
</script>
<style lang="scss" scoped></style>