fix : 修复表格更新数据回显,新增征集提示框
This commit is contained in:
@@ -551,7 +551,7 @@ html, body, #app, .el-container, .el-aside, .el-main {
|
||||
}
|
||||
|
||||
.approval-record {
|
||||
padding-top: 10px;
|
||||
//padding-top: 10px;
|
||||
padding-bottom: 30px;
|
||||
position: relative;
|
||||
.approval-title {
|
||||
|
||||
@@ -367,7 +367,13 @@ const submitParam = (item) => {
|
||||
const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
if (!valid) {
|
||||
return ElNotification({
|
||||
title: '提示',
|
||||
message: '请完善数据,再提交!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
const {msg, code} = await addRequirement(submitParam(formData.value))
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -283,9 +283,9 @@ const headBtnClick = (key) => {
|
||||
|
||||
const search = (val) => {
|
||||
let obj = {...val}
|
||||
if (obj.time) {
|
||||
obj.startTime = obj.time[0]
|
||||
obj.endTime = obj.time[1]
|
||||
if (obj.dateValue) {
|
||||
obj.startTime = obj.dateValue[0]
|
||||
obj.endTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
tableConfig.params = obj
|
||||
|
||||
@@ -173,10 +173,10 @@ const searchConfig = reactive([
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
// {
|
||||
// type: 'selection',
|
||||
// prop: 'selection'
|
||||
// },
|
||||
{
|
||||
prop: 'name',
|
||||
type: 'index',
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||
{{tableForm.projectChargePerson?tableForm.projectChargePerson: currentPerson.name }}
|
||||
{{tableForm.projectChargePersonName}}
|
||||
<el-button @click="showPersonnelPicker">
|
||||
{{ tableForm.projectChargePerson||currentPerson.name ? '更改' : '请选择研发人员' }}
|
||||
{{ tableForm.projectChargePersonName ? '更改' : '请选择研发人员' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -55,7 +55,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="项目总体完成率(%)">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" :controls="false" style="width: 200px">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" min="0" max="100" :controls="false" style="width: 200px">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -88,23 +88,30 @@ const tagsViewStore = useTagsView()
|
||||
const baseForm = ref()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const currentPerson = ref({})
|
||||
const tableForm = ref({
|
||||
projectName: '',
|
||||
completeWork: '',
|
||||
endTime: '',
|
||||
projectBudgetDescription: '',
|
||||
projectChargePerson: '',
|
||||
projectChargePersonName:'',
|
||||
projectCompletionRate: '',
|
||||
projectDevelopmentWay: '',
|
||||
projectId: '',
|
||||
startTime: '',
|
||||
startTime: ''
|
||||
})
|
||||
const userPicker = ref()
|
||||
|
||||
const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const selected = (select) => {
|
||||
if (!select || select.length === 0) {
|
||||
return
|
||||
}
|
||||
for (const selectElement of select) {
|
||||
currentPerson.value = selectElement
|
||||
tableForm.value.projectChargePerson = selectElement.id
|
||||
tableForm.value.projectChargePersonName = selectElement.name
|
||||
}
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
@@ -113,9 +120,6 @@ const disabledDate = (time) => {
|
||||
const handleBack = () => {
|
||||
history.back()
|
||||
}
|
||||
const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
let params = {
|
||||
...tableForm.value,
|
||||
|
||||
Reference in New Issue
Block a user