乡村相册
This commit is contained in:
@@ -8,22 +8,21 @@
|
|||||||
<ai-card title="基本信息">
|
<ai-card title="基本信息">
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||||
<el-form-item label="相册名称" style="width: 100%;" prop="title" :rules="[{required: true, message: '请输入标题', trigger: 'blur'}]">
|
<el-form-item label="相册主题" style="width: 100%;" prop="type" :rules="[{required: true, message: '请输入标题', trigger: 'blur'}]">
|
||||||
<el-input type="input" size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="30" show-word-limit></el-input>
|
<ai-select
|
||||||
|
v-model="form.type"
|
||||||
|
placeholder="请选择相册主题"
|
||||||
|
:selectList="dict.getDict('villagePictureAlbumType')">
|
||||||
|
</ai-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="areaId" style="width: 100%;" label="发布地区" :rules="[{required: true, message: '请选择地区', trigger: 'change'}]">
|
<el-form-item prop="areaId" style="width: 100%;" label="发布地区" :rules="[{required: true, message: '请选择地区', trigger: 'change'}]">
|
||||||
<ai-area-select clearable always-show :instance="instance" v-model="form.areaId" :disabled-level="disabledLevel"></ai-area-select>
|
<ai-area-select @fullname="v => form.areaName = v" clearable always-show :instance="instance" v-model="form.areaId" :disabled-level="disabledLevel"></ai-area-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="相册主题" style="width: 100%;" prop="title" :rules="[{required: true, message: '请输入标题', trigger: 'blur'}]">
|
<el-form-item label="图片" style="width: 100%;" prop="urlList">
|
||||||
<el-input type="input" size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="30" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="图片" style="width: 100%;" prop="thumbUrl">
|
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
isShowTip
|
v-model="form.urlList"
|
||||||
v-model="form.thumbUrl"
|
:limit="9">
|
||||||
:limit="20"
|
|
||||||
:cropOps="cropOps">
|
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -52,13 +51,9 @@
|
|||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
form: {
|
form: {
|
||||||
title: '',
|
areaName: '',
|
||||||
content: '',
|
|
||||||
areaId: '',
|
areaId: '',
|
||||||
createUnitName: '',
|
urlList: []
|
||||||
createUserName: '',
|
|
||||||
status: '',
|
|
||||||
thumbUrl: []
|
|
||||||
},
|
},
|
||||||
cropOps: {
|
cropOps: {
|
||||||
width: "336px",
|
width: "336px",
|
||||||
@@ -75,6 +70,7 @@
|
|||||||
created () {
|
created () {
|
||||||
this.form.areaId = this.user.info.areaId
|
this.form.areaId = this.user.info.areaId
|
||||||
this.disabledLevel = this.user.info.areaList.length
|
this.disabledLevel = this.user.info.areaList.length
|
||||||
|
this.dict.load(['villagePictureAlbumType'])
|
||||||
if (this.params && this.params.id) {
|
if (this.params && this.params.id) {
|
||||||
this.id = this.params.id
|
this.id = this.params.id
|
||||||
this.getInfo(this.params.id)
|
this.getInfo(this.params.id)
|
||||||
@@ -86,7 +82,6 @@
|
|||||||
this.instance.post(`/app/appcountrysidetourism/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appcountrysidetourism/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
this.form.thumbUrl = res.data.thumbUrl ? JSON.parse(res.data.thumbUrl) : []
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -94,13 +89,10 @@
|
|||||||
confirm () {
|
confirm () {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.instance.post(`/app/appcountrysidetourism/addOrUpdate`, {
|
this.instance.post(`/app/appvillagepicturealbum/addPictures`, {
|
||||||
...this.form,
|
...this.form,
|
||||||
type: 0,
|
id: this.params.id,
|
||||||
createUserName: this.user.info.name,
|
urlList: this.form.urlList.map(v => v.url)
|
||||||
thumbUrl: this.form.thumbUrl.length ? JSON.stringify([{
|
|
||||||
url: this.form.thumbUrl[0].url
|
|
||||||
}]) : ''
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('提交成功')
|
this.$message.success('提交成功')
|
||||||
|
|||||||
@@ -9,26 +9,17 @@
|
|||||||
<ai-select
|
<ai-select
|
||||||
v-model="search.status"
|
v-model="search.status"
|
||||||
@change="search.current = 1, getList()"
|
@change="search.current = 1, getList()"
|
||||||
placeholder="项目状态"
|
placeholder="请选择相册主题"
|
||||||
:selectList="dict.getDict('questionnaireStatus')">
|
:selectList="dict.getDict('villagePictureAlbumType')">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
<ai-select
|
<el-date-picker
|
||||||
v-model="search.type"
|
v-model="search.timeTag"
|
||||||
@change="search.current = 1, getList()"
|
type="month"
|
||||||
placeholder="项目类型"
|
|
||||||
:selectList="dict.getDict('questionnaireType')">
|
|
||||||
</ai-select>
|
|
||||||
</template>
|
|
||||||
<template #right>
|
|
||||||
<el-input
|
|
||||||
v-model="search.title"
|
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入模板名称或创建人"
|
@change="search.current = 1, getList()"
|
||||||
clearable
|
value-format="yyyy-MM"
|
||||||
@keyup.enter.native="search.current = 1, getList()"
|
placeholder="请选择日期">
|
||||||
@clear="search.current = 1, search.title = '', getList()"
|
</el-date-picker>
|
||||||
suffix-icon="iconfont iconSearch">
|
|
||||||
</el-input>
|
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
@@ -101,7 +92,8 @@
|
|||||||
current: 1,
|
current: 1,
|
||||||
areaId: '',
|
areaId: '',
|
||||||
size: 1000000,
|
size: 1000000,
|
||||||
title: ''
|
title: '',
|
||||||
|
timeTag: ''
|
||||||
},
|
},
|
||||||
isShowAdd: false,
|
isShowAdd: false,
|
||||||
form: {
|
form: {
|
||||||
@@ -120,7 +112,7 @@
|
|||||||
created () {
|
created () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.search.areaId = this.user.info.areaId
|
this.search.areaId = this.user.info.areaId
|
||||||
this.dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
|
this.dict.load(['villagePictureAlbumType']).then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
181
packages/3.0.0/AppVillageAlbum/components/config.js
vendored
181
packages/3.0.0/AppVillageAlbum/components/config.js
vendored
@@ -1,181 +0,0 @@
|
|||||||
export const components = [
|
|
||||||
{
|
|
||||||
type: 'options',
|
|
||||||
tips: '(可重复添加)',
|
|
||||||
label: '选项',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
type: 'radio',
|
|
||||||
label: '单选',
|
|
||||||
fixedLabel: '单选',
|
|
||||||
value: '',
|
|
||||||
points: '',
|
|
||||||
icon: 'iconradio',
|
|
||||||
isShowPoints: false,
|
|
||||||
required: true,
|
|
||||||
hasAnswer: false,
|
|
||||||
answer: '',
|
|
||||||
pointType: '0',
|
|
||||||
pointDict: [
|
|
||||||
{
|
|
||||||
dictName: '此题有唯一答案和分值',
|
|
||||||
dictValue: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dictName: '每个选项都有对应分值',
|
|
||||||
dictValue: '1'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: '选项1',
|
|
||||||
value: '',
|
|
||||||
point: '',
|
|
||||||
img: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '选项2',
|
|
||||||
value: '',
|
|
||||||
point: '',
|
|
||||||
img: []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
title: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'checkbox',
|
|
||||||
label: '多选',
|
|
||||||
fixedLabel: '多选',
|
|
||||||
points: '',
|
|
||||||
icon: 'iconcheck_box',
|
|
||||||
isShowPoints: false,
|
|
||||||
required: true,
|
|
||||||
hasAnswer: false,
|
|
||||||
answer: [],
|
|
||||||
value: [],
|
|
||||||
pointType: '0',
|
|
||||||
pointDict: [
|
|
||||||
{
|
|
||||||
dictName: '此题有唯一答案和分值',
|
|
||||||
dictValue: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dictName: '每个选项都有对应分值',
|
|
||||||
dictValue: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dictName: '答对几项得几分,答错不得分',
|
|
||||||
dictValue: '2'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: '选项1',
|
|
||||||
value: '',
|
|
||||||
point: '',
|
|
||||||
img: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '选项2',
|
|
||||||
point: '',
|
|
||||||
value: '',
|
|
||||||
img: []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
title: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
label: '单下拉框',
|
|
||||||
fixedLabel: '单下拉框',
|
|
||||||
value: '',
|
|
||||||
points: '',
|
|
||||||
icon: 'iconSelect',
|
|
||||||
isShowPoints: false,
|
|
||||||
required: true,
|
|
||||||
hasAnswer: false,
|
|
||||||
answer: '',
|
|
||||||
pointType: '0',
|
|
||||||
pointDict: [
|
|
||||||
{
|
|
||||||
dictName: '此题有唯一答案和分值',
|
|
||||||
dictValue: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dictName: '每个选项都有对应分值',
|
|
||||||
dictValue: '1'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
label: '选项1',
|
|
||||||
value: '',
|
|
||||||
point: '',
|
|
||||||
img: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '选项2',
|
|
||||||
value: '',
|
|
||||||
point: '',
|
|
||||||
img: []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
title: ''
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
tips: '(可重复添加)',
|
|
||||||
label: '填空',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
label: '单行填空',
|
|
||||||
fixedLabel: '单行填空',
|
|
||||||
value: '',
|
|
||||||
pointType: '0',
|
|
||||||
icon: 'icontext_box',
|
|
||||||
isShowPoints: false,
|
|
||||||
points: '',
|
|
||||||
required: true,
|
|
||||||
hasAnswer: false,
|
|
||||||
placeholder: '请输入...',
|
|
||||||
answer: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'textarea',
|
|
||||||
label: '多行填空',
|
|
||||||
fixedLabel: '多行填空',
|
|
||||||
pointType: '0',
|
|
||||||
icon: 'icontext_area',
|
|
||||||
points: '',
|
|
||||||
isShowPoints: false,
|
|
||||||
required: true,
|
|
||||||
hasAnswer: false,
|
|
||||||
answer: '',
|
|
||||||
placeholder: '请输入...',
|
|
||||||
value: ''
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'annex',
|
|
||||||
tips: '(可重复添加)',
|
|
||||||
label: '附件',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
type: 'upload',
|
|
||||||
label: '上传图片',
|
|
||||||
fixedLabel: '上传图片',
|
|
||||||
value: '',
|
|
||||||
icon: 'iconpic',
|
|
||||||
isShowPoints: false,
|
|
||||||
points: '',
|
|
||||||
required: true,
|
|
||||||
hasAnswer: false,
|
|
||||||
answer: ''
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
Reference in New Issue
Block a user