diff --git a/packages/jianping/AppPublicizeInformation/Add.vue b/packages/jianping/AppPublicizeInformation/Add.vue index ea248e2f..75261eec 100644 --- a/packages/jianping/AppPublicizeInformation/Add.vue +++ b/packages/jianping/AppPublicizeInformation/Add.vue @@ -10,7 +10,7 @@ - + @@ -21,7 +21,7 @@ - + 最多上传1张图片,单张图片最大10MB支持.png,.jpg,.jpeg格式 - + v && /0{3}$/g.test(v) ? cb('发布地区必须选到村级') : cb(), trigger: "blur"} + ], moduleId: [{required: true, message: "请选择文章类型"}], categoryId: [{required: true, message: "选择分类"}], } @@ -100,7 +103,7 @@ export default { form: { pictureUrlList: [], pictureUrl: '', - file: [] + files: [] }, miniTypeList: [], newTypeList: [] @@ -112,9 +115,9 @@ export default { const isLt10M = file.file.size / 1024 / 1024 < 10; if (!isLt10M) { this.$message.error("附件大小不超过10mb!"); - for (let i = 0; i < this.fileList.length; i++) { - if (this.fileList[i].uid == file.file.uid) { - this.fileList.splice(i, 1); + for (let i = 0; i < this.form.files.length; i++) { + if (this.form.files[i].uid == file.file.uid) { + this.form.files.splice(i, 1); } } return; @@ -124,33 +127,23 @@ export default { this.instance.post(`/admin/file/add`, formData, {withCredentials: false}).then(res => { if (res && res.code == 0) { let img = res.data[0].split(';'); - this.fileList.forEach((item, index) => { + this.form.files.forEach((item, index) => { if (item.uid == file.file.uid) { - this.fileList[index].id = img[1]; + this.form.files[index].id = img[1]; } }) } }); }, handleRemove(file, fileList) { - this.fileList = fileList; + this.form.files = fileList; }, handleChange(file, fileList) { - this.fileList = fileList; + this.form.files = fileList; }, back() { this.$router.push({}) }, - getDetail() { - let {id} = this.$route.query - id && this.instance.post("/app/apppreventionreturntopoverty/queryDetailById", null, { - params: {id} - }).then(res => { - if (res?.data) { - this.form = res.data - } - }) - }, submit() { this.$refs.ruleForm.validate(v => { if (v) { @@ -166,6 +159,23 @@ export default { } }) }, + getDetail() { + let {id} = this.$route.query + if(!id) { + return + } + id && this.instance.post("/app/apppreventionreturntopoverty/queryDetailById", null, { + params: {id} + }).then(res => { + if (res?.data) { + if(res.data.pictureUrl) { + res.data.pictureUrlList = [{url: res.data.pictureUrl}] + } + this.form = res.data + this.getNewTypeList() + } + }) + }, getTypeList() { let {parentId} = this.$route.query this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => { @@ -192,7 +202,7 @@ export default { }, created() { this.getTypeList() - // this.getDetail() + this.getDetail() } } diff --git a/packages/jianping/AppPublicizeInformation/List.vue b/packages/jianping/AppPublicizeInformation/List.vue index e9dce67e..2dbd9378 100644 --- a/packages/jianping/AppPublicizeInformation/List.vue +++ b/packages/jianping/AppPublicizeInformation/List.vue @@ -32,7 +32,7 @@ - + @@ -44,7 +44,7 @@ ids=v.map(e=>e.id)"> - + 编辑 删除 @@ -93,16 +93,16 @@ export default { }, data() { return { - search: {name: ""}, + search: {title: ""}, page: {current: 1, size: 10, total: 0}, newPage: {current: 1, size: 10, total: 0}, tableData: [], colConfigs: [ - {label: "标题", prop: "name", align: "center"}, - {label: "地区", prop: "sex", dict: 'sex', align: "center"}, - {label: "浏览次数", prop: "age", align: "center"}, - {label: "发布人", prop: "nation", align: "center", dict: "fpNation"}, - {label: "发布时间", prop: "education", align: "center", dict: "fpEducation"}, + {label: "标题", prop: "title", align: "center"}, + {label: "地区", prop: "areaName", align: "center", width: '150px'}, + {label: "浏览次数", prop: "viewCount", align: "center", width: '100px'}, + {label: "发布人", prop: "createUserName", align: "center", width: '100px'}, + {label: "发布时间", prop: "createTime", align: "center", width: '100px'}, {slot: "options"} ], colConfigsNew: [ @@ -113,9 +113,6 @@ export default { dialog: false, form: {}, rules: { - // type0: [{required: true, message: "请输入板块名称", trigger: "change"}], - // type1: [{required: true, message: "请输入模块名称", trigger: "change"}], - // type2: [{required: true, message: "请输入分类名称", trigger: "change"}], categoryName: '', showIndex: [{required: true, message: "请输入排序", trigger: "change"}], }, @@ -132,7 +129,7 @@ export default { }, methods: { getTableData() { - this.instance.post("/app/apppreventionreturntopoverty/list", null, { + this.instance.post("/app/apppublicityinfo/list", null, { params: {...this.page, ...this.search} }).then(res => { if (res?.data) { @@ -145,8 +142,8 @@ export default { this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id}, hash: "#add"}) }, handleDelete(ids) { - this.$confirm("是否要删除监测对象").then(() => { - this.instance.post("/app/apppreventionreturntopoverty/delete", null, { + this.$confirm("是否删除该条宣传资讯信息").then(() => { + this.instance.post("/app/apppublicityinfo/delete", null, { params: {ids: ids?.toString()} }).then(res => { if (res?.code == 0) { diff --git a/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue b/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue index b31b4f89..65895ec1 100644 --- a/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue +++ b/project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue @@ -10,6 +10,25 @@ + + + + 如果表格中已经存在数据,则会被本次导入的数据覆盖;不存在数据,系统将生成新的标准记录; + + + 导入 + 导出
+ 如果表格中已经存在数据,则会被本次导入的数据覆盖;不存在数据,系统将生成新的标准记录; +