7/30 限制前端输入字数
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
:key="index"
|
||||
:src="item"
|
||||
:preview-teleported="true"
|
||||
:initial-index="index"
|
||||
:preview-src-list="problemImageUrlList"
|
||||
style="width: 120px; height: 120px; margin-right: 10px"
|
||||
></el-image>
|
||||
@@ -80,6 +81,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="处理人员" prop="handleId">
|
||||
<repairUser
|
||||
title-name="选择处理人员"
|
||||
:is-multiple="false"
|
||||
:username="formInfo.handleName"
|
||||
:userid="formInfo.handleId"
|
||||
@@ -88,7 +90,7 @@
|
||||
></repairUser>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理描述" prop="handleContent">
|
||||
<el-input type="textarea" :rows="5" v-model="form.handleContent"></el-input>
|
||||
<el-input maxlength="200" show-word-limit type="textarea" :rows="5" v-model.trim="form.handleContent"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" v-if="form.status !== '0'" @click="submitForm">提交</el-button>
|
||||
@@ -123,7 +125,7 @@ const formInfo = ref({
|
||||
'complaintName': '',
|
||||
'phone': '',
|
||||
'problemImageUrl': '',
|
||||
'status': '2', // 投诉状态 0待处理 1处理中 2已处理
|
||||
'status': '1', // 投诉状态 0 待处理 1 已处理
|
||||
'handleId': '',
|
||||
'handleName': '',
|
||||
'handleContent': '',
|
||||
@@ -152,8 +154,13 @@ async function init() {
|
||||
...formInfo.value,
|
||||
...res.data
|
||||
};
|
||||
console.log(formInfo.value);
|
||||
form.value = {
|
||||
...form.value,
|
||||
...res.data
|
||||
};
|
||||
// 处理照片
|
||||
problemImageUrlList.value = res.data.problemImageUrl ? res.data.problemImageUrl.split(',') : [];
|
||||
// 处理 投诉类型
|
||||
const find = res2.rows.find((item) => item.id === formInfo.value.typeId);
|
||||
if (find) {
|
||||
formInfo.value.type = find.name;
|
||||
@@ -172,7 +179,6 @@ function handleChange(pop: ResidentVO) {
|
||||
}
|
||||
|
||||
// 提交
|
||||
|
||||
const formRef = ref();
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user