政策申办

This commit is contained in:
liuye
2022-04-25 10:49:34 +08:00
parent c430bbf467
commit 3ce7f47a6b
3 changed files with 42 additions and 13 deletions

View File

@@ -13,10 +13,10 @@
<ai-area-get :instance="instance" v-model="form.areaId" :root="rootArea" valueLevel="5"/>
</el-form-item>
<el-form-item label="文章类型" prop="moduleId" style="width:50%;">
<ai-select v-model="form.moduleId" :selectList="dict.getDict('sex')"/>
<ai-select v-model="form.moduleId" :selectList="miniTypeList" @change="getNewTypeList"/>
</el-form-item>
<el-form-item label="分类" prop="categoryId" style="width:50%;">
<ai-select v-model="form.categoryId" :selectList="dict.getDict('sex')"/>
<ai-select v-model="form.categoryId" :selectList="newTypeList"/>
</el-form-item>
<el-form-item label="正文" prop="content" style="width: 100%;">
<ai-editor v-model="form.content" :instance="instance"/>
@@ -98,10 +98,12 @@ export default {
data() {
return {
form: {
householdRelation: "",
healthyStatus: [],
pictureUrlList: [],
pictureUrl: '',
file: []
},
miniTypeList: [],
newTypeList: []
}
},
methods: {
@@ -152,6 +154,9 @@ export default {
submit() {
this.$refs.ruleForm.validate(v => {
if (v) {
if(this.form.pictureUrlList.length) {
this.form.pictureUrl = this.form.pictureUrlList[0].url
}
this.instance.post(`/app/apppublicityinfo/addOrUpdate`, this.form).then(res => {
if (res.code == 0) {
this.$message.success('提交成功!');
@@ -160,10 +165,34 @@ export default {
})
}
})
}
},
getTypeList() {
let {parentId} = this.$route.query
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
if (res.code == 0) {
res.data.records.map((item) => {
item.dictName = item.categoryName
item.dictValue = item.id
})
this.miniTypeList = res.data.records
}
})
},
getNewTypeList() {
this.instance.post(`/app/apppublicitycategory/list?categoryType=2&size=100&parentId=${this.form.moduleId}`).then(res => {
if (res.code == 0) {
res.data.records.map((item) => {
item.dictName = item.categoryName
item.dictValue = item.id
})
this.newTypeList = res.data.records
}
})
},
},
created() {
this.getDetail()
this.getTypeList()
// this.getDetail()
}
}
</script>

View File

@@ -37,7 +37,7 @@
</ai-search-bar>
<ai-search-bar>
<template #left>
<el-button type="primary" icon="iconfont iconAdd" @click="showEdit('')">添加</el-button>
<el-button type="primary" icon="iconfont iconAdd" @click="showEdit('')" v-if="typeList.length && miniTypeList.length">添加</el-button>
<!-- <el-button icon="iconfont iconDelete" :disabled="!ids.length" @click="handleDelete(ids)">删除</el-button> -->
</template>
</ai-search-bar>

View File

@@ -6,7 +6,7 @@
<ai-search-bar>
<template #left>
<ai-select placeholder="所属部门" v-model="search.department" @change="page.current=1,getTableData()" :selectList="departmentList"/>
<ai-select placeholder="所属分类" v-model="search.classificationId" :selectList="classList" @change="page.current=1,getTableData()"/>
<ai-select placeholder="所属分类" v-model="search.classificationName" :selectList="classList" @change="page.current=1,getTableData()"/>
</template>
<template #right>
<el-input size="small" placeholder="申请人/申请主体/事项名称" v-model="search.name" clearable @change="page.current=1,getTableData()"/>
@@ -25,8 +25,8 @@
</ai-table>
</template>
</ai-list>
<ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="dialog=false" @onConfirm="dialog=false" width="600px">
<img class="pdf-img" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1114%2F113020142315%2F201130142315-1-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1653443191&t=29aec7c40c67dda942d4ee3222385fcd" alt="">
<ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="dialog=false" @onConfirm="dialog=false" width="800px">
<img class="pdf-img" :src="dialogImgUrl" alt="">
</ai-dialog>
</section>
</template>
@@ -47,7 +47,7 @@ export default {
},
data() {
return {
search: {name: '', classificationId: '', department: ''},
search: {name: '', classificationName: '', department: ''},
page: {current: 1, size: 10, total: 0},
tableData: [],
colConfigs: [
@@ -88,7 +88,7 @@ export default {
if (res?.data) {
res.data.records.map((item) => {
item.dictName = item.name
item.dictValue = item.id
item.dictValue = item.name
})
this.classList = res.data.records
}
@@ -117,7 +117,7 @@ export default {
.AppPolicyBid {
height: 100%;
.pdf-img{
max-height: 1000px;
width: 100%;
}
}
</style>