修改 草稿 功能 bug

This commit is contained in:
GGJ
2024-06-21 10:15:25 +08:00
parent 90246e9abf
commit b2a2c1ecf6
4 changed files with 32 additions and 50 deletions

View File

@@ -172,8 +172,6 @@ const title = ref('')
const planAddition = ref(false)
const key: any = ref(0)
const dynamicProp = computed(() => {
console.log(123);
return supvTypeOptionList.filter(item => item.id === form.value.supvType)[0]?.code == 'Technical_Super'
? ''
: 'substation'
@@ -234,7 +232,7 @@ const rules = ref({
const changeSubstationFlag = () => {
console.log(form.value.customSubstationFlag)
//处理所属变电站手都输入1/下拉数据0
key.value++
key.value += 1
if (form.value.customSubstationFlag == 0) {
rules.value.substation[0].message = '请选择关联电站'
form.value.substation = []
@@ -262,7 +260,10 @@ const loadData = () => {
const detailById = (id: any) => {
getById(id).then(res => {
form.value = res.data
form.value.substation = res.data.substation.split(',')
form.value.substation =
res.data.customSubstationFlag == 0 ? res.data.substation.split(',') : res.data.substation
key.value += 1
})
}
// 提交
@@ -277,6 +278,7 @@ const submitFn = (flag: boolean) => {
addSurveyPlan(addForm).then(res => {
cancelFn()
ElMessage.success('保存成功!')
emit('onsubmit')
})
} else {
@@ -291,11 +293,13 @@ const submitFn = (flag: boolean) => {
if (title.value == '计划新增') {
addSurveyPlan(addForm).then(res => {
cancelFn()
ElMessage.success('计划新增成功!')
emit('onsubmit')
})
} else {
updateSurveyPlan(addForm).then(res => {
cancelFn()
ElMessage.success('重新发起成功!')
emit('onsubmit')
})
}
@@ -341,7 +345,7 @@ const open = (text: string, id: any) => {
title.value = text
planAddition.value = true
setTimeout(() => {
key.value++
key.value += 1
}, 10)
if (id) {
detailById(id)

View File

@@ -46,10 +46,9 @@
</el-form-item>
<el-form-item for="-" label="用户性质:" prop="userType">
<el-select
:disabled="resendId != ''"
:disabled="resendId != '' && title != '编辑'"
v-model="form.userType"
placeholder="请选择用户性质"
@change="changeUserType()"
>
<el-option
v-for="(item, index) in userTypeList"
@@ -620,7 +619,7 @@ const resetForm = () => {
reportDate: new Date(), //填报日期 1
orgId: '', //填报部门 1
expectedProductionDate: '', //工程预期投产日期 1
userType: 0, //用户性质 1
userType: 1, //用户性质 1
city: areaOptionList[0].name, //所在地市 1
responsibleDepartment: '', //归口管理部门 1
userStatus: userStateList[0].value, //用户状态 1
@@ -711,7 +710,7 @@ const subForm: any = ref({
responsibleDepartment: '', //归口管理部门
substation: '', ////变电站
userStatus: '0', //用户状态
userType: 0, //用户性质
userType: 1, //用户性质
voltageLevel: '',
//userType=='0' '1'
userReportProjectPO: {
@@ -949,6 +948,7 @@ const open = async (row: any) => {
})
} else {
resendId.value = ''
form.value.userType = 0
}
}
// 处理上传文件回显
@@ -996,7 +996,6 @@ onMounted(() => {
console.log()
})
const changeUserType = value => {}
// 上传报告
const uploadRef = ref()
const handleExceed: UploadProps['onExceed'] = files => {
@@ -1150,8 +1149,6 @@ const confirmForm = (flag: boolean) => {
close()
})
} else {
ruleFormRef.value.validate((valid: any) => {
if (valid) {
//整理上传文件的数据
@@ -1315,7 +1312,6 @@ const confirmForm = (flag: boolean) => {
confirmFormData.saveOrCheckflag = '2'
if (title.value == '用户档案录入') {
submitFormData(confirmFormData).then(res => {
ElMessage({
message: '新增成功',
type: 'success'
@@ -1323,14 +1319,12 @@ const confirmForm = (flag: boolean) => {
ruleFormRef.value.resetFields()
resetForm()
close()
})
} else {
console.log(confirmFormData)
confirmFormData.id = resendId.value
updateFormData(confirmFormData).then(res => {
ElMessage({
message: '重新发起成功',
type: 'success'
@@ -1338,7 +1332,6 @@ const confirmForm = (flag: boolean) => {
ruleFormRef.value.resetFields()
resetForm()
close()
})
}
} else {

View File

@@ -191,7 +191,7 @@ const submit = (flag: boolean) => {
//此时该告警单处于待反馈状态
addFeedback(subForm).then(res => {
//查询进线数据避免一直处于loading状态
ElMessage.success('申请成功')
ElMessage.success('保存成功')
tableStore.index()
dialogVisible.value = false
})

View File

@@ -113,22 +113,7 @@ const tableStore = new TableStore({
return !row.processInstanceId
}
},
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.createBy != adminInfo.$state.id || !(row.status == 0)
},
click: row => {
addForms.value.open({
title: '编辑',
row: row
})
}
},
{
name: 'edit',
title: '报告上传',
@@ -139,7 +124,7 @@ const tableStore = new TableStore({
return row.status != null
},
click: row => {
FormRef.value.open('报告上', row)
FormRef.value.open('报告上', row)
}
},