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