Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
"bin-code-editor": "^0.9.0",
|
||||
"dayjs": "^1.8.35",
|
||||
"dvcp-dv": "^1.0.0",
|
||||
"dvcp-dv-ui": "file:project/dvui",
|
||||
"dvcp-dv-ui": "^2.0.1",
|
||||
"dvcp-ui": "^1.42.2",
|
||||
"echarts": "^5.1.2",
|
||||
"mp4box": "^0.4.1",
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship",
|
||||
"yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook",
|
||||
"yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook","fpType", "fpRiskType",
|
||||
"fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<section class="hrLog">
|
||||
<ai-card title="走访日志">
|
||||
<template #right>
|
||||
<!-- <ai-select placeholder="档案状态" v-model="search.status" :selectList="dict.getDict('fpPrtpStatus')" @change="page.current=1,getTableData()"/> -->
|
||||
<el-button type="text" icon="el-icon-plus" @click="dialog=true">添加</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
@@ -10,6 +11,7 @@
|
||||
<b v-text="row.createUserName"/>
|
||||
<span v-text="row.createTime"/>
|
||||
</el-row>
|
||||
<p>操作类型:</p>
|
||||
<div class="content" v-text="row.detail"/>
|
||||
<ai-uploader v-model="row.files" disabled/>
|
||||
<div class="btns">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<b v-text="row.createUserName"/>
|
||||
<span v-text="row.createTime"/>
|
||||
</el-row>
|
||||
<p>帮扶类型:</p>
|
||||
<div class="content" v-text="row.detail"/>
|
||||
<ai-uploader v-model="row.files" disabled/>
|
||||
<div class="btns">
|
||||
@@ -22,6 +23,13 @@
|
||||
</ai-card>
|
||||
<ai-dialog :visible.sync="dialog" :title="addTitle" @closed="form={}" @onConfirm="submit" width="600px">
|
||||
<el-form :model="form" :rules="rules" ref="DialogForm" size="small" label-width="80px">
|
||||
<el-form-item label="帮扶类型" prop="sex">
|
||||
<ai-select
|
||||
v-model="form.sex"
|
||||
:selectList="dict.getDict('sex')"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="帮扶措施" prop="detail">
|
||||
<el-input type="textarea" v-model="form.detail" placeholder="请输入" maxlength="500" show-word-limit rows="5"/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -8,12 +8,18 @@
|
||||
<template #content>
|
||||
<div flex class="half wrap">
|
||||
<div flex class="column">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" maxlength="20" show-word-limit
|
||||
:disabled="isEdit"/>
|
||||
<el-form-item label="户主姓名" prop="name">
|
||||
<!-- <el-input v-model="form.name" placeholder="请输入姓名" maxlength="20" show-word-limit
|
||||
:disabled="isEdit"/> -->
|
||||
<el-input size="small" class="user-selecter" v-model="form.name" placeholder="请输入姓名" clearable :disabled="isEdit || isSelectUser">
|
||||
<template slot="append">
|
||||
<ai-person-select :instance="instance" @selectPerson="checkName">
|
||||
</ai-person-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号" :maxlength="18" :disabled="isEdit"
|
||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号" :maxlength="18" :disabled="isEdit || isSelectUser"
|
||||
@change="handleIdNumberAutocomplete"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
@@ -39,13 +45,9 @@
|
||||
<el-form-item label="政治面貌" prop="politicsStatus">
|
||||
<ai-select v-model="form.politicsStatus" :selectList="dict.getDict('fpPoliticalOutlook')"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="在校生状况" prop="schoolStatus">
|
||||
<ai-select v-model="form.schoolStatus" :selectList="dict.getDict('fpStudentsInSchool')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况" prop="healthyStatus">
|
||||
<ai-select v-model="form.healthyStatus" :selectList="dict.getDict('fpHealth')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="务工时间(月)" prop="workeMonths">
|
||||
<el-input v-model="form.workeMonths" placeholder="请输入" clearable/>
|
||||
</el-form-item>
|
||||
@@ -71,6 +73,11 @@
|
||||
<ai-select v-model="form.specialPovertySupport" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="健康状况" prop="healthyStatusList">
|
||||
<el-checkbox-group v-model="form.healthyStatusList">
|
||||
<el-checkbox :label="item.dictValue" v-for="(item, index) in dict.getDict('fpHealth')" :key="index">{{item.dictName}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="联络信息">
|
||||
@@ -89,35 +96,58 @@
|
||||
<ai-card title="户籍信息">
|
||||
<template slot="content">
|
||||
<div flex class="half wrap">
|
||||
<el-form-item label="是否户主" prop="isHousehold">
|
||||
<!-- <el-form-item label="是否户主" prop="isHousehold">
|
||||
<ai-select v-model="form.isHousehold" :selectList="dict.getDict('yesOrNo')"
|
||||
@change="form.householdRelation=null"/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="监测对象类型" prop="objectType">
|
||||
<ai-select v-model="form.objectType" :selectList="dict.getDict('fpType')"/>
|
||||
</el-form-item>
|
||||
<template v-if="form.isHousehold==1">
|
||||
<el-form-item label="监测对象类型" prop="objectType">
|
||||
<ai-select v-model="form.objectType" :selectList="dict.getDict('fpType')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否危房" prop="dilapidatedHousehold">
|
||||
<ai-select v-model="form.dilapidatedHousehold" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否饮用水安全" prop="drinkingWaterSafety">
|
||||
<ai-select v-model="form.drinkingWaterSafety" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否搬迁" prop="move">
|
||||
<ai-select v-model="form.move" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="form.isHousehold==0">
|
||||
<el-form-item label="是否危房" prop="dilapidatedHousehold">
|
||||
<ai-select v-model="form.dilapidatedHousehold" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否饮用水安全" prop="drinkingWaterSafety">
|
||||
<ai-select v-model="form.drinkingWaterSafety" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否搬迁" prop="move">
|
||||
<ai-select v-model="form.move" :selectList="dict.getDict('fpYesOrNo')"/>
|
||||
</el-form-item>
|
||||
<!-- <template v-if="form.isHousehold==0">
|
||||
<el-form-item label="与户主关系" prop="householdRelation">
|
||||
<ai-select v-model="form.householdRelation" :selectList="dict.getDict('fpRelationship')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="户主身份证号" prop="householdIdNumber">
|
||||
<el-input v-model="form.householdIdNumber" placeholder="请输入户主身份证号" :maxlength="18" clearable/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</template> -->
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
|
||||
<ai-card title="情况描述">
|
||||
<template slot="content">
|
||||
<el-form-item label="风险因素" prop="riskType">
|
||||
<ai-select v-model="form.riskType" :selectList="dict.getDict('fpRiskType')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注说明">
|
||||
<el-form-item>
|
||||
<el-input v-model="form.detail" placeholder="备注说明" maxlength="500" show-word-limit clearable type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片(最多9张)" >
|
||||
<ai-uploader
|
||||
:isShowTip="true"
|
||||
:instance="instance"
|
||||
v-model="form.files"
|
||||
fileType="img"
|
||||
acceptType=".png,.jpg,.jpeg"
|
||||
:limit="9">
|
||||
<template slot="tips">最多上传9张图片,单张图片最大10MB<br/>支持.png,.jpg,.jpeg格式</template>
|
||||
</ai-uploader>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
<template v-if="/[123]/.test(form.status)">
|
||||
<ai-card title="收入情况(单位:元)">
|
||||
<template slot="content">
|
||||
@@ -227,6 +257,7 @@ export default {
|
||||
isHousehold: [{required: true, message: "请选择是否户主"}],
|
||||
householdRelation: [{required: true, message: "请选择与户主关系"}],
|
||||
householdIdNumber: [{required: true, message: "请选择户主身份证号"}],
|
||||
riskType: [{required: true, message: "请选择风险因素"}],
|
||||
}
|
||||
},
|
||||
rootArea() {
|
||||
@@ -236,11 +267,34 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
householdRelation: ""
|
||||
}
|
||||
householdRelation: "",
|
||||
healthyStatus: '',
|
||||
healthyStatusList: [],
|
||||
file: [],
|
||||
},
|
||||
isSelectUser: false, //是否选择人员
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkName(e) {
|
||||
if(!e) {
|
||||
this.isSelectUser = false
|
||||
this.form.name = ''
|
||||
this.form.idNumber = ''
|
||||
this.form.phone =''
|
||||
this.form.areaId = ''
|
||||
this.form.birthDate = ''
|
||||
this.form.sex = ''
|
||||
this.form.age = ''
|
||||
return
|
||||
}
|
||||
this.form.name = e.name
|
||||
this.form.idNumber = e.idNumber
|
||||
this.form.phone = e.phone
|
||||
this.form.areaId = e.householdAreaId
|
||||
this.handleIdNumberAutocomplete(e.idNumber)
|
||||
this.isSelectUser = true
|
||||
},
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
@@ -250,7 +304,12 @@ export default {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
res.data.healthyStatusList = []
|
||||
if(res.data.healthyStatus) {
|
||||
res.data.healthyStatusList = res.data.healthyStatus.split(',')
|
||||
}
|
||||
this.form = {...res.data}
|
||||
console.log(res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -261,8 +320,10 @@ export default {
|
||||
submit() {
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
if (this.form.isHousehold == 1) {
|
||||
this.form.householdIdNumber = this.form.idNumber
|
||||
this.form.isHousehold = 1
|
||||
this.form.householdIdNumber = this.form.idNumber
|
||||
if (this.form.healthyStatusList.length) {
|
||||
this.form.healthyStatus = this.form.healthyStatusList.join(',')
|
||||
}
|
||||
this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,42 +10,17 @@
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select placeholder="档案状态" v-model="search.status"
|
||||
:selectList="dict.getDict('fpPrtpStatus')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="性别" v-model="search.sex"
|
||||
:selectList="dict.getDict('sex')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="文化程度" v-model="search.education"
|
||||
:selectList="dict.getDict('fpEducation')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="民族" v-model="search.nation"
|
||||
:selectList="dict.getDict('fpNation')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="search.birthStart"
|
||||
type="date"
|
||||
size="small"
|
||||
unlink-panels
|
||||
placeholder="选择出生开始日期"
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
<el-date-picker
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-model="search.birthEnd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择出生结束日期"
|
||||
unlink-panels
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
<ai-select placeholder="政治面貌" v-model="search.politicsStatus"
|
||||
:selectList="dict.getDict('fpPoliticalOutlook')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="是否户主" v-model="search.isHousehold"
|
||||
:selectList="dict.getDict('yesOrNo')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="档案状态" v-model="search.status" :selectList="dict.getDict('fpPrtpStatus')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="监测对象类型" v-model="search.objectType" :selectList="dict.getDict('fpType')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="风险因素" v-model="search.riskType" :selectList="dict.getDict('fpRiskType')" @change="page.current=1,getTableData()"/>
|
||||
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="search.birthStart" type="date" size="small"
|
||||
unlink-panels placeholder="选择出生开始日期" @change="page.current=1,getTableData()" />
|
||||
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="search.birthEnd" type="date" size="small" placeholder="选择出生结束日期"
|
||||
unlink-panels @change="page.current=1,getTableData()" />
|
||||
<ai-select placeholder="性别" v-model="search.sex" :selectList="dict.getDict('sex')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="文化程度" v-model="search.education" :selectList="dict.getDict('fpEducation')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="民族" v-model="search.nation" :selectList="dict.getDict('fpNation')" @change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="政治面貌" v-model="search.politicsStatus" :selectList="dict.getDict('fpPoliticalOutlook')" @change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="姓名/身份证/联系方式" v-model="search.con" clearable
|
||||
@@ -112,7 +87,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: ""},
|
||||
search: {name: '', objectType: '', riskType: '',isHousehold: 1},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
|
||||
233
packages/jianping/AppPublicizeInformation/Add.vue
Normal file
233
packages/jianping/AppPublicizeInformation/Add.vue
Normal file
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<section class="Add">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="addTitle" isShowBottomBorder isShowBack @onBackClick="back"/>
|
||||
<template #content>
|
||||
<el-form :model="form" ref="ruleForm" :rules="rules" label-width="130px" label-position="right" size="small">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题" :maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布地区" prop="areaId">
|
||||
<ai-area-get :instance="instance" v-model="form.areaId" :root="rootArea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="文章类型" prop="moduleId" style="width:50%;" v-if="miniTypeList.length">
|
||||
<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="newTypeList"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="正文" prop="content" style="width: 100%;">
|
||||
<ai-editor v-model="form.content" :instance="instance"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图片" >
|
||||
<ai-uploader
|
||||
:isShowTip="true"
|
||||
:instance="instance"
|
||||
v-model="form.pictureUrlList"
|
||||
fileType="img"
|
||||
acceptType=".png,.jpg,.jpeg"
|
||||
:limit="1">
|
||||
<template slot="tips">最多上传1张图片,单张图片最大10MB<br/>支持.png,.jpg,.jpeg格式</template>
|
||||
</ai-uploader>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件附件" prop="files">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
multiple
|
||||
accept=".zip,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.txt,.jpg,.png"
|
||||
:http-request="uploadFile"
|
||||
:on-exceed="()=>$message.error('最多只能上传9个附件!')"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="handleChange"
|
||||
:limit="9"
|
||||
:file-list="form.files">
|
||||
<el-button size="mini"> 添加附件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
<p style="line-height: 0;">最多上传9个附件,单个文件最大10MB </p>
|
||||
<p style="line-height: 40px;">
|
||||
支持.zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt、.jpg、.png格式</p>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="back">取消</el-button>
|
||||
<el-button type="primary" @click="submit">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "Add",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
isEdit() {
|
||||
return !!this.$route.query.id
|
||||
},
|
||||
addTitle() {
|
||||
return this.isEdit ? "编辑新闻发布" : "添加新闻发布"
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
title: [{required: true, message: "请输入标题"}],
|
||||
areaId: [
|
||||
{message: "请选择发布地区", required: true, trigger: "blur"},
|
||||
{validator: (r, v, cb) => v && /0{3}$/g.test(v) ? cb('发布地区必须选到村级') : cb(), trigger: "blur"}
|
||||
],
|
||||
moduleId: [{required: true, message: "请选择文章类型"}],
|
||||
categoryId: [{required: true, message: "选择分类"}],
|
||||
}
|
||||
},
|
||||
rootArea() {
|
||||
return this.user.info?.areaId?.replace(/(\d{6})\d+/g, '$1' + Array(7).join("0")) || ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
pictureUrlList: [],
|
||||
pictureUrl: '',
|
||||
files: []
|
||||
},
|
||||
miniTypeList: [],
|
||||
newTypeList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 上传附件
|
||||
uploadFile: function (file) {
|
||||
const isLt10M = file.file.size / 1024 / 1024 < 10;
|
||||
if (!isLt10M) {
|
||||
this.$message.error("附件大小不超过10mb!");
|
||||
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;
|
||||
}
|
||||
let formData = new FormData();
|
||||
formData.append("file", file.file);
|
||||
this.instance.post(`/admin/file/add`, formData, {withCredentials: false}).then(res => {
|
||||
if (res && res.code == 0) {
|
||||
let img = res.data[0].split(';');
|
||||
this.form.files.forEach((item, index) => {
|
||||
if (item.uid == file.file.uid) {
|
||||
this.form.files[index].id = img[1];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.form.files = fileList;
|
||||
},
|
||||
handleChange(file, fileList) {
|
||||
this.form.files = fileList;
|
||||
},
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
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('提交成功!');
|
||||
this.back()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post("/app/apppublicityinfo/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 => {
|
||||
if (res.code == 0) {
|
||||
this.miniTypeList = res.data.records.map((item) => {
|
||||
return {
|
||||
dictName: item.categoryName,
|
||||
dictValue: item.id
|
||||
}
|
||||
})
|
||||
console.log(this.miniTypeList)
|
||||
if(this.$route.query.id) {
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getNewTypeList() {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=2&size=100&parentId=${this.form.moduleId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.records
|
||||
this.newTypeList = res.data.records.map((item) => {
|
||||
return {
|
||||
dictName: item.categoryName,
|
||||
dictValue: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTypeList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Add {
|
||||
height: 100%;
|
||||
|
||||
.half {
|
||||
align-items: flex-start;
|
||||
|
||||
& > .el-form-item, & > div {
|
||||
width: 50%;
|
||||
|
||||
.el-form-item {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<section class="AppPublicizeInformation">
|
||||
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Add from "./Add";
|
||||
import List from "./List";
|
||||
|
||||
export default {
|
||||
name: "AppPublicizeInformation",
|
||||
components: {List, Add},
|
||||
label: "宣传资讯",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentComponent() {
|
||||
return this.$route.hash == "#add" ? Add : List
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load("sex", "fpNation", "fpPrtpStatus", "fpHealth", "fpStudentsInSchool", 'fpYesOrNo', "fpRelationship",
|
||||
"yesOrNo", "fpLaborSkills", "fpEducation", "fpType", "fpPoliticalOutlook",
|
||||
"fpPublicWelfarePostAssistance","fpHealthAssistance","fpFnancialAssistance","fpEmploymentAssistance","fpEducationalAssistance","fpIndustrialAssistance","fpSocialAssistance")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppPublicizeInformation {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
324
packages/jianping/AppPublicizeInformation/List.vue
Normal file
324
packages/jianping/AppPublicizeInformation/List.vue
Normal file
@@ -0,0 +1,324 @@
|
||||
<template>
|
||||
<section class="List">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="宣传资讯" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance"
|
||||
@change="page.current=1,getTableData()">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<div class="flex">
|
||||
<div class="type">
|
||||
<div class="title">宣传板块<span><el-button type="text" @click="addType(0, typeList.length+1, '')">添加</el-button></span></div>
|
||||
<div class="list">
|
||||
<div class="item" v-for="(item, index) in typeList" :key="index" :class="typeIndex == index ? 'active' : ''" @click="typeClick(index)">
|
||||
{{item.categoryName}}
|
||||
</div>
|
||||
<div class="item" v-if="!typeList.length">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="type mini-type">
|
||||
<div class="title">模块名称<span><el-button type="text" @click="addType(1, miniTypeList.length+1, typeList[typeIndex].id)">添加</el-button></span></div>
|
||||
<div class="list">
|
||||
<div class="item" v-for="(item, index) in miniTypeList" :key="index" :class="miniTypeIndex == index ? 'active' : ''" @click="miniTypeClick(index)">
|
||||
<span class="text">{{item.categoryName}}</span>
|
||||
<span class="icon">
|
||||
<i class="el-icon-circle-plus-outline" @click="addNewType(index)"></i>
|
||||
<i class="el-icon-edit" @click="editMini(index)"></i>
|
||||
<i class="el-icon-delete" @click="delMini(miniTypeList[index].id)"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="item" v-if="!miniTypeList.length">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<ai-search-bar>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="请输入标题" v-model="search.title" clearable @change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<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>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>ids=v.map(e=>e.id)">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width='150px'>
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="showEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="form={}" @onConfirm="submitDialog" width="600px">
|
||||
<el-form :model="form" :rules="rules" ref="DialogForm" size="small" label-width="100px">
|
||||
<el-form-item :label="addLabelText" prop="categoryName">
|
||||
<el-input v-model.number="form.categoryName" placeholder="请输入" maxlength="10" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="showIndex" v-if="type != 2">
|
||||
<el-input-number v-model="form.showIndex" @change="handleChange" :min="1" :max="100"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<ai-table :tableData="newTypeList" :total="newPage.total" :current.sync="newPage.current" :size.sync="newPage.size"
|
||||
@getList="getTableData" :col-configs="colConfigsNew" v-if="type == 2">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="editNew(row)">编辑</el-button>
|
||||
<el-button type="text" @click="delMini(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "List",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {title: ""},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
newPage: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{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: [
|
||||
{label: "分类名称", prop: "categoryName", align: "center"},
|
||||
{slot: "options"}
|
||||
],
|
||||
ids: [],
|
||||
dialog: false,
|
||||
form: {},
|
||||
rules: {
|
||||
categoryName: '',
|
||||
showIndex: [{required: true, message: "请输入排序", trigger: "change"}],
|
||||
},
|
||||
typeList: [], //大分类模块
|
||||
miniTypeList: [], //模块子
|
||||
newTypeList: [], //文章分类
|
||||
type: 0, //0、宣传板块;1、宣传模块;2、文章分类
|
||||
dialogTitle: '',
|
||||
addLabelText: '',
|
||||
parentId: '',
|
||||
typeIndex: 0,
|
||||
miniTypeIndex: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/app/apppublicityinfo/list", null, {
|
||||
params: {...this.page, ...this.search, moduleId: this.miniTypeList[this.miniTypeIndex].id || ''}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
showEdit(id) {
|
||||
this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id, moduleId: this.miniTypeList[this.miniTypeIndex].id}, hash: "#add"})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否删除该条宣传资讯信息").then(() => {
|
||||
this.instance.post("/app/apppublicityinfo/delete", null, {
|
||||
params: {ids: ids?.toString()}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!")
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
handleChange(value) {
|
||||
this.form.showIndex = value
|
||||
},
|
||||
submitDialog() {
|
||||
this.$refs.DialogForm.validate(v => {
|
||||
if (v) {
|
||||
this.form.categoryType = this.type
|
||||
this.form.parentId = this.parentId
|
||||
this.instance.post(`/app/apppublicitycategory/addPublicityCategory`, this.form).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('添加成功');
|
||||
if(this.type == 0) {
|
||||
this.getTypeList()
|
||||
}
|
||||
if(this.type == 1) {
|
||||
this.getMiniTypeList(this.typeList[this.typeIndex].id)
|
||||
}
|
||||
this.dialog = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
addType(e, index, parentId) {
|
||||
this.type = e
|
||||
this.parentId = parentId
|
||||
this.form.showIndex = index
|
||||
this.dialogTitle = ['宣传板本', '宣传模块', '文章分类'][e]
|
||||
this.addLabelText = ['板本名称', '模块名称', '分类名称'][e]
|
||||
this.rules.categoryName = [{required: true, message: "请输入"+this.addLabelText, trigger: "change"}]
|
||||
this.dialog = true
|
||||
},
|
||||
getTypeList() {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=0&size=100`).then(res => {
|
||||
if (res.code == 0 && res.data.records && res.data.records.length) {
|
||||
this.typeList = res.data.records
|
||||
this.getMiniTypeList(res.data.records[0].id)
|
||||
}
|
||||
})
|
||||
},
|
||||
getMiniTypeList(parentId) {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.miniTypeList = res.data.records
|
||||
if(res.data.records && res.data.records.length) {
|
||||
this.miniTypeClick(0)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getNewTypeList(parentId) {
|
||||
this.instance.post(`/app/apppublicitycategory/list?categoryType=2&size=10&parentId=${parentId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.newTypeList = res.data.records
|
||||
this.newPage.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
typeClick(e) {
|
||||
this.typeIndex = e
|
||||
this.getMiniTypeList(this.typeList[e].id)
|
||||
},
|
||||
miniTypeClick(e) {
|
||||
this.miniTypeIndex = e
|
||||
this.current = 1
|
||||
this.tableData = []
|
||||
this.getTableData()
|
||||
},
|
||||
editMini(index) {
|
||||
this.form = {...this.miniTypeList[index]}
|
||||
this.addType(this.miniTypeList[index].categoryType, this.miniTypeList[index].showIndex, this.typeList[this.typeIndex].id)
|
||||
},
|
||||
delMini(id) {
|
||||
this.$confirm("确认删除", {
|
||||
type: 'error'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/apppublicitycategory/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功');
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
})
|
||||
})
|
||||
},
|
||||
addNewType(index) {
|
||||
this.getNewTypeList(this.miniTypeList[index].id)
|
||||
this.addType(2, '', this.miniTypeList[index].id)
|
||||
},
|
||||
editNew(row) {
|
||||
this.form = {...row}
|
||||
this.addType(2, '', row.parentId)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.getTypeList()
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.List {
|
||||
height: 100%;
|
||||
.flex{
|
||||
display: flex;
|
||||
.type{
|
||||
width: 250px;
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 0 16px;
|
||||
font-weight: 600;
|
||||
span{
|
||||
color: #26f;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.list{
|
||||
.item{
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
.text{
|
||||
width: calc(100% - 70px);
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon{
|
||||
width: 70px;
|
||||
text-align: right;
|
||||
i{
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.el-icon-delete{
|
||||
color: #f46;
|
||||
}
|
||||
.el-icon-circle-plus-outline{
|
||||
color: #26f;
|
||||
}
|
||||
}
|
||||
}
|
||||
.active{
|
||||
// color: #26f;
|
||||
background-color: #f3f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mini-type{
|
||||
margin-right: 16px;
|
||||
}
|
||||
.content{
|
||||
width: calc(100% - 516px);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
142
project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue
Normal file
142
project/xiushan/apps/AppPolicyBid/AppPolicyBid.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<section class="AppPolicyBid">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="政策申办数据统计" isShowBottomBorder></ai-title>
|
||||
<template #content>
|
||||
<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.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()"/>
|
||||
<ai-import
|
||||
ref="import"
|
||||
title="导入"
|
||||
name="政策申办数据统计"
|
||||
url="/appzwspstatistics/downloadTemplate"
|
||||
importUrl="/appzwspstatistics/import"
|
||||
suffixName="xlsx"
|
||||
:customCliker="true"
|
||||
:instance="instance"
|
||||
>
|
||||
<template slot="tips">
|
||||
<p>
|
||||
如果表格中已经存在数据,则会被本次导入的数据覆盖;不存在数据,系统将生成新的标准记录;
|
||||
</p>
|
||||
</template>
|
||||
<el-button size="small" icon="iconfont iconImport"
|
||||
>导入</el-button
|
||||
>
|
||||
</ai-import>
|
||||
<ai-download :instance="instance" url="/appzwspstatistics/export" :params="search" fileName="政策申办数据统计" :disabled="tableData.length == 0">
|
||||
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
|
||||
</ai-download>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="showDetail(row)" v-if="row.zwspId">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppPolicyBid",
|
||||
label: "政策申办数据统计",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: '', classificationName: '', department: ''},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{label: "申请人/申请主体", prop: "name", align: "center", width: '200px'},
|
||||
{label: "事项名称", prop: "processName", align: "center"},
|
||||
{label: "所属分类", prop: "classificationName", align: "center"},
|
||||
{label: "所属部门/机构", prop: "department", align: "center", width: '120px'},
|
||||
{label: "意向金额(万)", prop: "intendedAmount", align: "center", width: '120px'},
|
||||
{label: "放款金额(万)", prop: "loanAmount", align: "center", width: '120px'},
|
||||
{label: "申请日期", prop: "applyDate", align: "center", width: '120px'},
|
||||
{label: "放款日期", prop: "loanDate", align: "center", width: '120px'},
|
||||
{slot: "options"}
|
||||
],
|
||||
dialog: false,
|
||||
dialogTitle: '',
|
||||
classList: [],
|
||||
departmentList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/appzwspstatistics/list", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(row) {
|
||||
this.dialogTitle = row.processName
|
||||
this.dialogImgUrl = row.zwspPictureUrl
|
||||
this.dialog = true
|
||||
},
|
||||
getClassTypeList() {
|
||||
this.instance.post("/zwspapprovalclassification/list?size=100").then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map((item) => {
|
||||
item.dictName = item.name
|
||||
item.dictValue = item.name
|
||||
})
|
||||
this.classList = res.data.records
|
||||
}
|
||||
})
|
||||
this.instance.post("/appfinancialorganization/list?size=100").then(res => {
|
||||
if (res?.data) {
|
||||
res.data.records.map((item) => {
|
||||
item.dictName = item.organizationName
|
||||
item.dictValue = item.organizationName
|
||||
})
|
||||
this.departmentList = res.data.records
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getClassTypeList()
|
||||
this.dict.load("sex").then(() => {
|
||||
this.getTableData()
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppPolicyBid {
|
||||
height: 100%;
|
||||
.pdf-img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user