This commit is contained in:
yanran200730
2021-12-23 11:38:57 +08:00
parent 5c8af74966
commit 37cfd3fd46
2 changed files with 10 additions and 7 deletions

View File

@@ -24,7 +24,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="categoryId" label="分类"> <el-form-item prop="categoryId" label="分类" v-if="cateList.length" :rules="[{required: true, message: '请选择分类', trigger: 'change'}]">
<el-select style="width: 100%;" v-model="form.categoryId" size="small" placeholder="请选择分类"> <el-select style="width: 100%;" v-model="form.categoryId" size="small" placeholder="请选择分类">
<el-option <el-option
v-for="item in cateList" v-for="item in cateList"
@@ -93,10 +93,6 @@
areaName: '', areaName: '',
thumbUrl: [] thumbUrl: []
}, },
cropOps: {
width: "336px",
height: "210px"
},
id: '', id: '',
contentTypeList: [ contentTypeList: [
{ {
@@ -152,12 +148,17 @@
confirm () { confirm () {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
let categoryName = ''
if (this.cateList.length && this.form.categoryId) {
categoryName = this.cateList.filter(v => v.id === this.form.categoryId)[0].categoryName
}
this.instance.post(`/app/appcontentinfo/addOrUpdate`, { this.instance.post(`/app/appcontentinfo/addOrUpdate`, {
...this.form, ...this.form,
moduleId: this.$route.query.moduleId, moduleId: this.$route.query.moduleId,
createUserName: this.user.info.name, createUserName: this.user.info.name,
createUserId: this.user.info.id, createUserId: this.user.info.id,
categoryName: this.cateList.length ? this.cateList.filter(v => v.id === this.form.categoryId)[0].categoryName : '' categoryName: categoryName
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success('提交成功') this.$message.success('提交成功')

View File

@@ -323,7 +323,9 @@ export default {
}); });
}, },
deletePersonFn() { deletePersonFn() {
this.resident.instance.post(`/app/appresident/delete?ids=${this.deleteIds}`).then(res => { this.resident.instance.post(`/app/appresident/deleteBody`, {
ids: this.deleteIds
}).then(res => {
if (res && res.code == 0) { if (res && res.code == 0) {
this.$message.success("删除成功"); this.$message.success("删除成功");
if ( if (