表单
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #content v-if="refresh">
|
<template #content v-if="refresh">
|
||||||
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
||||||
<applyForm ref="applyForm" :instance="instance" :dict="dict" v-show="activeStep==1"/>
|
<applyForm ref="applyForm" :value="filedList" :instance="instance" :dict="dict" v-show="activeStep==1"/>
|
||||||
<attachmentMaterial ref="attachmentMaterial" :instance="instance" v-show="activeStep==2"/>
|
<attachmentMaterial ref="attachmentMaterial" :instance="instance" v-show="activeStep==2"/>
|
||||||
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
||||||
:dict="dict" v-show="activeStep==3"/>
|
:dict="dict" v-show="activeStep==3"/>
|
||||||
@@ -52,8 +52,11 @@ export default {
|
|||||||
approvalSteps: "",
|
approvalSteps: "",
|
||||||
},
|
},
|
||||||
processAnnexDefs: [],
|
processAnnexDefs: [],
|
||||||
detailObj: {},
|
detailObj: {
|
||||||
|
tableInfo: {}
|
||||||
|
},
|
||||||
refresh: true,
|
refresh: true,
|
||||||
|
filedList: [],
|
||||||
tableFieldInfos: []
|
tableFieldInfos: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -120,6 +123,7 @@ export default {
|
|||||||
...this.baseInfo,
|
...this.baseInfo,
|
||||||
processDefStatus: Number(this.baseInfo.processDefStatus),
|
processDefStatus: Number(this.baseInfo.processDefStatus),
|
||||||
tableInfo: {
|
tableInfo: {
|
||||||
|
...this.detailObj.tableInfo,
|
||||||
tableFieldInfos: this.tableFieldInfos
|
tableFieldInfos: this.tableFieldInfos
|
||||||
},
|
},
|
||||||
tableType: 0,
|
tableType: 0,
|
||||||
@@ -140,6 +144,7 @@ export default {
|
|||||||
this.instance.post(`/app/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
this.instance.post(`/app/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.detailObj = res.data
|
this.detailObj = res.data
|
||||||
|
this.filedList = res.data.tableInfo.tableFieldInfos
|
||||||
this.refreshDetail()
|
this.refreshDetail()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -66,54 +66,32 @@
|
|||||||
<span>删除字段</span>
|
<span>删除字段</span>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item style="width: 100%;" :label="item.fieldName" :rules="[{ required: item.mustFill === '1' ? true : false }]">
|
<el-form-item style="width: 100%;" :label="item.fieldName" :rules="[{ required: item.mustFill === '1' ? true : false }]">
|
||||||
<template v-if="(item.type === 'textarea')">
|
<template v-if="item.fieldDataType === '1'">
|
||||||
<el-input :disabled="item.disable === '1'" :rows="item.lineNumber" size="small" type="textarea" :placeholder="item.fieldTips" v-model="item.defaultValue"></el-input>
|
<el-input :disabled="item.disable === '1'" size="small" placeholder="请输入" v-model="item.defaultValue"></el-input>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'radio'">
|
<template v-if="item.fieldDataType === '4'">
|
||||||
<el-radio-group v-model="item.defaultValue" :disabled="item.disable === '1'">
|
<el-radio-group v-model="item.defaultValue" :disabled="item.disable === '1'">
|
||||||
<el-radio :label="field.label" v-for="(field, index) in item.options" :key="index">{{ field.label }}</el-radio>
|
<el-radio :label="field.label" v-for="(field, index) in item.options" :key="index">{{ field.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'number'">
|
<template v-if="item.fieldDataType === '0'">
|
||||||
<el-input-number style="width: 100%;" v-model="item.defaultValue" :placeholder="item.fieldTips"></el-input-number>
|
<el-input-number style="width: 100%;" v-model="item.defaultValue" :placeholder="item.fieldTips"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'rtf'">
|
<template v-if="item.fieldDataType === '3'">
|
||||||
<ai-editor v-model="item.defaultValue" :placeholder="item.fieldTips" :instance="instance"/>
|
|
||||||
</template>
|
|
||||||
<template v-if="item.type === 'time'">
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.defaultValue"
|
v-model="item.defaultValue"
|
||||||
size="small"
|
size="small"
|
||||||
:placeholder="item.fieldTips">
|
:placeholder="item.fieldTips">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'date'">
|
<template v-if="item.fieldDataType === '8'">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.defaultValue"
|
v-model="item.defaultValue"
|
||||||
size="small"
|
size="small"
|
||||||
:placeholder="item.fieldTips">
|
:placeholder="item.fieldTips">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'datetime'">
|
<template v-if="item.fieldDataType === '9'">
|
||||||
<el-date-picker
|
|
||||||
v-model="item.defaultValue"
|
|
||||||
size="small"
|
|
||||||
:placeholder="item.fieldTips">
|
|
||||||
</el-date-picker>
|
|
||||||
</template>
|
|
||||||
<template v-if="item.type === 'onOff'">
|
|
||||||
<el-switch active-value="1" inactive-value="0" v-model="item.defaultValue"></el-switch>
|
|
||||||
</template>
|
|
||||||
<template v-if="['input', 'phone', 'name', 'idNumber'].includes(item.type)">
|
|
||||||
<el-input :disabled="item.disable === '1'" :maxlength="Number(item.maxLength)" size="small" :placeholder="item.fieldTips" v-model="item.defaultValue"></el-input>
|
|
||||||
</template>
|
|
||||||
<template v-if="item.type === 'area'">
|
|
||||||
<ai-area-get
|
|
||||||
:instance="instance"
|
|
||||||
always-show
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-if="item.type === 'select'">
|
|
||||||
<el-select :disabled="item.disable === '1'" style="width: 100%;" size="small" :placeholder="item.fieldTips" v-model="item.defaultValue">
|
<el-select :disabled="item.disable === '1'" style="width: 100%;" size="small" :placeholder="item.fieldTips" v-model="item.defaultValue">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(filed, index) in item.options"
|
v-for="(filed, index) in item.options"
|
||||||
@@ -123,17 +101,11 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'checkbox'" >
|
<template v-if="item.fieldDataType === '5'" >
|
||||||
<el-checkbox-group v-model="item.defaultValue" :disabled="item.disable === '1'">
|
<el-checkbox-group v-model="item.defaultValue" :disabled="item.disable === '1'">
|
||||||
<el-checkbox :label="field.label" v-for="(field, index) in item.options" :key="index">{{ field.label }}</el-checkbox>
|
<el-checkbox :label="field.label" v-for="(field, index) in item.options" :key="index">{{ field.label }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.type === 'upload'">
|
|
||||||
<div class="left-item__item--upload">
|
|
||||||
<i class="iconfont iconAdd"></i>
|
|
||||||
<span>添加附件</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
@@ -190,7 +162,7 @@
|
|||||||
<h2>最多输入字符</h2>
|
<h2>最多输入字符</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-item__content">
|
<div class="right-item__content">
|
||||||
<el-input placeholder="字符个数" v-model="currTarget.maxLength">
|
<el-input placeholder="字符个数" v-model="currTarget.fieldLength">
|
||||||
<span slot="append">个</span>
|
<span slot="append">个</span>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
@@ -215,17 +187,11 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'applyForm',
|
name: 'applyForm',
|
||||||
|
|
||||||
model: {
|
|
||||||
prop: 'value',
|
|
||||||
event: 'change',
|
|
||||||
},
|
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
params: Object,
|
params: Object,
|
||||||
type: String,
|
type: String,
|
||||||
areaId: String,
|
|
||||||
value: Array
|
value: Array
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -252,43 +218,17 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
value (v) {
|
|
||||||
if (v) {
|
|
||||||
let arr = JSON.parse(JSON.stringify(v))
|
|
||||||
let groups = this.unique(arr.map(v => v.groupName))
|
|
||||||
this.targetList = groups.map(groupName => {
|
|
||||||
const column = arr.filter(v => v.groupName === groupName).map(item => {
|
|
||||||
if (['9', '4', '5'].includes(item.fieldDataType)) {
|
|
||||||
item.options = item.selectValues.split('`').map(v => {
|
|
||||||
return {
|
|
||||||
label: v,
|
|
||||||
value: ''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.grid) {
|
|
||||||
item.grid = Number(item.grid)
|
|
||||||
}
|
|
||||||
|
|
||||||
return item
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
type: 'group',
|
|
||||||
fieldName: '卡片',
|
|
||||||
fixedLabel: '卡片',
|
|
||||||
icon: 'iconpic',
|
|
||||||
groupName,
|
|
||||||
column: column
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
activeIndex () {
|
activeIndex () {
|
||||||
|
if (this.activeIndex > -1 && this.groupIndex > -1 && !this.isGroup) {
|
||||||
|
const filed = this.targetList[this.groupIndex].column[this.activeIndex]
|
||||||
|
this.currTarget = filed
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (this.groupIndex > -1 && this.isGroup) {
|
if (this.groupIndex > -1 && this.isGroup) {
|
||||||
this.currTarget = this.targetList[this.groupIndex]
|
this.currTarget = this.targetList[this.groupIndex].column[this.activeIndex]
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,13 +252,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
|
||||||
currComponentTitle () {
|
|
||||||
return '表单设置'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted () {
|
mounted () {
|
||||||
|
this.init()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -328,6 +263,39 @@
|
|||||||
this.targetList[j].column.splice(i, 1)
|
this.targetList[j].column.splice(i, 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
init () {
|
||||||
|
if (this.value.length) {
|
||||||
|
let arr = this.value
|
||||||
|
let groups = this.unique(arr.map(v => v.groupName))
|
||||||
|
this.targetList = groups.map(groupName => {
|
||||||
|
const column = arr.filter(v => v.groupName === groupName).map(item => {
|
||||||
|
if (['9', '4', '5'].includes(item.fieldDataType)) {
|
||||||
|
item.options = item.selectValues.split('`').map(v => {
|
||||||
|
return {
|
||||||
|
label: v,
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
grid: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: 'group',
|
||||||
|
fieldName: '卡片',
|
||||||
|
fixedLabel: '卡片',
|
||||||
|
icon: 'iconpic',
|
||||||
|
groupName,
|
||||||
|
column: column
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
removeGroup () {
|
removeGroup () {
|
||||||
if (this.targetList.length === 1) {
|
if (this.targetList.length === 1) {
|
||||||
return this.$message.error('分组不能小于1')
|
return this.$message.error('分组不能小于1')
|
||||||
@@ -348,13 +316,11 @@
|
|||||||
onConfirm () {
|
onConfirm () {
|
||||||
let result = []
|
let result = []
|
||||||
this.targetList.forEach((group, i) => {
|
this.targetList.forEach((group, i) => {
|
||||||
group.column.forEach((item, index) => {
|
group.column.forEach(item => {
|
||||||
result.push({
|
result.push({
|
||||||
...item,
|
...item,
|
||||||
groupIndex: i,
|
groupIndex: i,
|
||||||
fieldLength: item.maxLength,
|
|
||||||
groupName: group.groupName,
|
groupName: group.groupName,
|
||||||
fieldDbName: this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`,
|
|
||||||
selectValues: item.options ? item.options.map(v => v.label).join('`') : ''
|
selectValues: item.options ? item.options.map(v => v.label).join('`') : ''
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -365,12 +331,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
isUnique (type) {
|
|
||||||
const list = this.components[0].children.map(v => v.type)
|
|
||||||
|
|
||||||
return list.indexOf(type) > -1
|
|
||||||
},
|
|
||||||
|
|
||||||
addOptions () {
|
addOptions () {
|
||||||
const len = this.targetList[this.groupIndex].column[this.activeIndex].options.length
|
const len = this.targetList[this.groupIndex].column[this.activeIndex].options.length
|
||||||
let label = `选项${len + 1}`
|
let label = `选项${len + 1}`
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const components = [
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
icon: 'icontext_box',
|
icon: 'icontext_box',
|
||||||
mustFill: '1',
|
mustFill: '1',
|
||||||
maxLength: 20
|
fieldLength: 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'idNumber',
|
type: 'idNumber',
|
||||||
@@ -25,7 +25,7 @@ export const components = [
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
icon: 'icontext_area',
|
icon: 'icontext_area',
|
||||||
mustFill: '1',
|
mustFill: '1',
|
||||||
maxLength: 20,
|
fieldLength: 20,
|
||||||
disable: '0',
|
disable: '0',
|
||||||
grid: 1,
|
grid: 1,
|
||||||
fieldDataType: '1',
|
fieldDataType: '1',
|
||||||
@@ -39,7 +39,7 @@ export const components = [
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
icon: 'icontext_area',
|
icon: 'icontext_area',
|
||||||
mustFill: '1',
|
mustFill: '1',
|
||||||
maxLength: 11,
|
fieldLength: 11,
|
||||||
disable: '0',
|
disable: '0',
|
||||||
grid: 1,
|
grid: 1,
|
||||||
fieldDataType: '1',
|
fieldDataType: '1',
|
||||||
@@ -165,7 +165,7 @@ export const components = [
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
icon: 'icontext_box',
|
icon: 'icontext_box',
|
||||||
mustFill: '1',
|
mustFill: '1',
|
||||||
maxLength: 50
|
fieldLength: 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'number',
|
type: 'number',
|
||||||
@@ -179,7 +179,7 @@ export const components = [
|
|||||||
decimalPlaces: 0,
|
decimalPlaces: 0,
|
||||||
fieldDataType: '0',
|
fieldDataType: '0',
|
||||||
minValue: 0,
|
minValue: 0,
|
||||||
maxLength: 500,
|
fieldLength: 50,
|
||||||
disable: '0',
|
disable: '0',
|
||||||
grid: 1,
|
grid: 1,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-list v-if="!isShowDetail">
|
<ai-list v-if="!isShowDetail">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="村民圈" :isShowBottomBorder="false" :instance="instance" v-model="areaId" @change="changeArea"></ai-title>
|
<ai-title title="村民圈" isShowArea :isShowBottomBorder="false" :instance="instance" v-model="areaId" @change="changeArea"></ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="tabs">
|
<template slot="tabs">
|
||||||
<el-tabs v-model="currIndex">
|
<el-tabs v-model="currIndex">
|
||||||
|
|||||||
@@ -1,43 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="村民圈详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||||
</ai-title>
|
</ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-card title="基础信息">
|
<ai-card title="基础信息">
|
||||||
<ai-wrapper slot="content">
|
<ai-wrapper slot="content">
|
||||||
<ai-info-item label="主题" :value="info.content" isLine></ai-info-item>
|
<ai-info-item label="话题" :value="dict.getLabel('villagerCircleTopic', info.topic)" isLine></ai-info-item>
|
||||||
<ai-info-item label="发布地区" :value="info.areaName" isLine></ai-info-item>
|
<ai-info-item label="发布人" :value="info.createUserName" isLine></ai-info-item>
|
||||||
<ai-info-item label="议事截止时间" :value="info.discussDeadline"></ai-info-item>
|
<ai-info-item label="发布时间" :value="info.createTime" isLine></ai-info-item>
|
||||||
<ai-info-item label="公示截止时间" :value="info.publicityDeadline"></ai-info-item>
|
<ai-info-item label="所在位置" :value="info.gpsDesc" isLine></ai-info-item>
|
||||||
<ai-info-item label="议事类型" :value="dict.getLabel('discussType', info.type)" isLine></ai-info-item>
|
<ai-info-item label="内容" :value="info.content" isLine></ai-info-item>
|
||||||
<ai-info-item label="是否匿名投票" v-if="info.type === '1'" :value="info.anonymous === '1' ? '是' : '否'"></ai-info-item>
|
|
||||||
<ai-info-item label="投票方式" v-if="info.type === '1'" :value="info.voteType === '0' ? '单选' : '多选'"></ai-info-item>
|
|
||||||
<ai-info-item label="图片" isLine>
|
<ai-info-item label="图片" isLine>
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
disabled
|
disabled
|
||||||
v-model="info.images"
|
v-model="info.pictures"
|
||||||
:limit="9">
|
:limit="9">
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</ai-info-item>
|
</ai-info-item>
|
||||||
</ai-wrapper>
|
</ai-wrapper>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
|
<ai-card title="处理结果" v-if="info.status > 0">
|
||||||
|
<div slot="content" style="margin-top: 16px">
|
||||||
|
<ai-wrapper
|
||||||
|
label-width="120px">
|
||||||
|
<ai-info-item label="处理结果" :value="info.status === '1' ? '通过' : '拒绝'" isLine></ai-info-item>
|
||||||
|
<ai-info-item label="原因" v-if="info.status === '2'" isLine :value="info.auditOpinion"></ai-info-item>
|
||||||
|
<ai-info-item label="审核人" :value="info.auditUserName"></ai-info-item>
|
||||||
|
<ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
</div>
|
||||||
|
</ai-card>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
:visible.sync="isShowAdd"
|
:visible.sync="isShow"
|
||||||
width="680px"
|
width="800px"
|
||||||
height="580px"
|
|
||||||
title="发表意见"
|
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
|
title="审核"
|
||||||
@onConfirm="onConfirm">
|
@onConfirm="onConfirm">
|
||||||
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
|
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
|
||||||
<el-form-item label="发表意见" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请发表你的观点和意见', trigger: 'blur' }]">
|
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
|
||||||
<el-input size="small" type="textarea" :rows="5" show-word-limit :maxlength="140" placeholder="请发表你的观点和意见" v-model="form.content"></el-input>
|
<el-radio-group v-model="form.pass">
|
||||||
|
<el-radio label="0">否</el-radio>
|
||||||
|
<el-radio label="1">是</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核意见" v-if="form.pass === '0'" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入审核意见' }]">
|
||||||
|
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
<template #footer >
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
|
<el-button type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
|
||||||
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -60,10 +78,11 @@
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10
|
size: 10
|
||||||
},
|
},
|
||||||
isShowAdd: false,
|
|
||||||
form: {
|
form: {
|
||||||
content: ''
|
opinion: '',
|
||||||
|
pass: ''
|
||||||
},
|
},
|
||||||
|
isShow: false,
|
||||||
type: ''
|
type: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -78,17 +97,36 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo (id) {
|
getInfo (id) {
|
||||||
this.instance.post(`/app/appvillagediscuss/queryDetailById?id=${id}`).then(res => {
|
this.instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
this.info.images = res.data.images ? JSON.parse(res.data.images) : []
|
|
||||||
this.type = res.data.type
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose () {
|
onClose () {
|
||||||
this.form.content = ''
|
this.form.pass = ''
|
||||||
|
this.form.opinion = ''
|
||||||
|
this.id = ''
|
||||||
|
},
|
||||||
|
|
||||||
|
onConfirm() {
|
||||||
|
this.$refs.form.validate(v => {
|
||||||
|
if (v) {
|
||||||
|
this.instance.post('/app/appvillagercircleinfo/examine', null, {
|
||||||
|
params: {
|
||||||
|
...this.form,
|
||||||
|
id: this.params.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.isShow = false
|
||||||
|
this.getInfo(this.params.id)
|
||||||
|
this.$message.success('审核成功!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel (isRefresh) {
|
cancel (isRefresh) {
|
||||||
|
|||||||
@@ -3,8 +3,20 @@
|
|||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-search-bar class="search-bar">
|
<ai-search-bar class="search-bar">
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select placeholder="请选择状态" v-model="search.type" clearable @change="search.current = 1, getList()" :selectList="dict.getDict('discussType')"></ai-select>
|
<ai-select
|
||||||
<ai-select placeholder="请选择话题" v-model="search.status" clearable @change="search.current = 1, getList()" :selectList="dict.getDict('discussStatus')"></ai-select>
|
placeholder="请选择状态"
|
||||||
|
v-model="search.status"
|
||||||
|
clearable
|
||||||
|
@change="search.current = 1, getList()"
|
||||||
|
:selectList="dict.getDict('auditStatus')">
|
||||||
|
</ai-select>
|
||||||
|
<ai-select
|
||||||
|
placeholder="请选择话题"
|
||||||
|
v-model="search.topic"
|
||||||
|
clearable
|
||||||
|
@change="search.current = 1, getList()"
|
||||||
|
:selectList="dict.getDict('villagerCircleTopic')">
|
||||||
|
</ai-select>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input
|
<el-input
|
||||||
@@ -27,7 +39,7 @@
|
|||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
|
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
|
||||||
@@ -47,7 +59,8 @@
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object,
|
||||||
|
areaId: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -56,19 +69,18 @@
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
status: '',
|
status: '',
|
||||||
type: '',
|
topic: '',
|
||||||
title: '',
|
title: ''
|
||||||
areaId: ''
|
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'content', label: '议事主题', align: 'left', width: '200px' },
|
{ prop: 'createUserName', label: '发布人', align: 'left' },
|
||||||
{ prop: 'type', label: '议事类型', align: 'center', formart: v => this.dict.getLabel('discussType', v) },
|
|
||||||
{ prop: 'createUserName', label: '话事人', align: 'center' },
|
|
||||||
{ prop: 'msgCountTotal', label: '观点数量', align: 'center', formart: v => v === 0 ? '-' : v },
|
|
||||||
{ prop: 'voteCount', label: '投票数量', align: 'center', formart: v => v === 0 ? '-' : v },
|
|
||||||
{ prop: 'status', label: '发布状态', align: 'center', formart: v => this.dict.getLabel('discussStatus', v) },
|
|
||||||
{ prop: 'createTime', label: '发布时间', align: 'center' },
|
{ prop: 'createTime', label: '发布时间', align: 'center' },
|
||||||
|
{ prop: 'content', label: '发布内容', align: 'center' },
|
||||||
|
{ prop: 'topic', label: '话题类型', align: 'center', formart: v => this.dict.getLabel('villagerCircleTopic', v) },
|
||||||
|
{ prop: 'status', label: '状态', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
|
||||||
|
{ prop: 'auditUserName', label: '审核人', align: 'center' },
|
||||||
|
{ prop: 'auditTime', label: '审核时间', align: 'center' },
|
||||||
{ slot: 'options', label: '操作', align: 'center' }
|
{ slot: 'options', label: '操作', align: 'center' }
|
||||||
],
|
],
|
||||||
tableData: []
|
tableData: []
|
||||||
@@ -81,7 +93,7 @@
|
|||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.search.areaId = this.user.info.areaId
|
this.search.areaId = this.user.info.areaId
|
||||||
this.dict.load(['discussType', 'discussStatus']).then(() => {
|
this.dict.load(['villagerCircleTopic', 'auditStatus']).then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -90,8 +102,8 @@
|
|||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appvillagercirclecomment/list`, null, {
|
this.instance.post(`/app/appvillagercirclecomment/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
type: 0,
|
...this.search,
|
||||||
...this.search
|
areaId: this.areaId
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
@@ -59,7 +59,8 @@
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object
|
dict: Object,
|
||||||
|
areaId: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -102,17 +103,12 @@
|
|||||||
getList() {
|
getList() {
|
||||||
this.instance.post(`/app/appvillagercircleinfo/list`, null, {
|
this.instance.post(`/app/appvillagercircleinfo/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
type: 0,
|
...this.search,
|
||||||
...this.search
|
areaId: this.areaId
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.tableData = res.data.records.map(v => {
|
this.tableData = res.data.records
|
||||||
return {
|
|
||||||
...v,
|
|
||||||
content: v.content || v.title
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.total = res.data.total
|
this.total = res.data.total
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user