新增群众诉求
This commit is contained in:
parent
24db0aafda
commit
8be22bb5c1
|
|
@ -490,6 +490,16 @@ export function saveUser(data) {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*查看对应学习内容的相关党员信息
|
||||||
|
*/
|
||||||
|
export function partyCheckList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/partyLearnContent/partyCheckList/`,
|
||||||
|
method: "GET",
|
||||||
|
params:params
|
||||||
|
});
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*公开内容分页查看
|
*公开内容分页查看
|
||||||
*/
|
*/
|
||||||
|
|
@ -528,6 +538,16 @@ export function saveUser(data) {
|
||||||
data:params,
|
data:params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*查看对应公开内容的相关人员信息
|
||||||
|
*/
|
||||||
|
export function publicCheckList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/publicContent/publicCheckList/`,
|
||||||
|
method: "GET",
|
||||||
|
params:params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
40
src/api/demands.ts
Normal file
40
src/api/demands.ts
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*分页查看困难诉求
|
||||||
|
*/
|
||||||
|
export function difficultyPage(data) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/difficultyAppeal/difficultyPage`,
|
||||||
|
method: "GET",
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*查看困难诉求详情
|
||||||
|
*/
|
||||||
|
export function difficultyDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/difficultyAppeal/difficultyDetail/${data.difficultyId}`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*处置困难诉求
|
||||||
|
*/
|
||||||
|
export function difficultyDeal(data) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/difficultyAppeal/difficultyDeal`,
|
||||||
|
method: "GET",
|
||||||
|
params:data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*查看困难诉求处置流程信息
|
||||||
|
*/
|
||||||
|
export function difficultyProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: `/admin/difficultyAppeal/difficultyProcess/${data.difficultyId}`,
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -20,7 +20,7 @@ export default {
|
||||||
auth: "demands",
|
auth: "demands",
|
||||||
title: '群众诉求',
|
title: '群众诉求',
|
||||||
sidebar: false,
|
sidebar: false,
|
||||||
breadcrumb: true, //是否显示面包屑
|
// breadcrumb: true, //是否显示面包屑
|
||||||
activeMenu: '/demands/index'
|
activeMenu: '/demands/index'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -31,7 +31,7 @@ export default {
|
||||||
meta: {
|
meta: {
|
||||||
title: '群众诉求详情',
|
title: '群众诉求详情',
|
||||||
sidebar: false, //是否在菜单栏显示
|
sidebar: false, //是否在菜单栏显示
|
||||||
breadcrumb: true, //是否显示面包屑
|
// breadcrumb: true, //是否显示面包屑
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ export default {
|
||||||
icon: 'point',
|
icon: 'point',
|
||||||
title: '公告管理',
|
title: '公告管理',
|
||||||
breadcrumb: true,
|
breadcrumb: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'study',
|
path: 'study',
|
||||||
|
|
@ -183,6 +183,19 @@ export default {
|
||||||
title: '党员学习内容',
|
title: '党员学习内容',
|
||||||
breadcrumb: true, //是否显示面包屑
|
breadcrumb: true, //是否显示面包屑
|
||||||
},
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'study-detail',
|
||||||
|
name: 'study-detail',
|
||||||
|
component: () => import('@/views/system/message/study-content/detail.vue'),
|
||||||
|
meta: {
|
||||||
|
icon: 'point',
|
||||||
|
title: '党员学习内容详情',
|
||||||
|
breadcrumb: true,
|
||||||
|
sidebar: false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'public',
|
path: 'public',
|
||||||
|
|
@ -193,6 +206,19 @@ export default {
|
||||||
title: '公开内容',
|
title: '公开内容',
|
||||||
breadcrumb: true, //是否显示面包屑
|
breadcrumb: true, //是否显示面包屑
|
||||||
},
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'public-detail',
|
||||||
|
name: 'public-detail',
|
||||||
|
component: () => import('@/views/system/message/public-content/detail.vue'),
|
||||||
|
meta: {
|
||||||
|
icon: 'point',
|
||||||
|
title: '公开内容详情',
|
||||||
|
breadcrumb: true,
|
||||||
|
sidebar: false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ export enum FileType {
|
||||||
studyContentCover = 'studyContentCover',//党员学习内容封面
|
studyContentCover = 'studyContentCover',//党员学习内容封面
|
||||||
publicContent = 'publicContent',//党员学习内容
|
publicContent = 'publicContent',//党员学习内容
|
||||||
publicContentCover = 'publicContentCover',//党员学习内容封面
|
publicContentCover = 'publicContentCover',//党员学习内容封面
|
||||||
|
demandsEscalation = 'demandsEscalation',//群众诉求上报
|
||||||
|
demands = 'demands',//群众诉求处置
|
||||||
}
|
}
|
||||||
// 文件接口类型
|
// 文件接口类型
|
||||||
export enum ApiFile {
|
export enum ApiFile {
|
||||||
|
|
|
||||||
|
|
@ -440,8 +440,6 @@ const clone = () => {
|
||||||
//获取详情
|
//获取详情
|
||||||
const getDetail = () => {
|
const getDetail = () => {
|
||||||
domicileDetail({domicileId:route.query.id}).then((res: any) => {
|
domicileDetail({domicileId:route.query.id}).then((res: any) => {
|
||||||
console.log(res.data,'res===>');
|
|
||||||
|
|
||||||
detailForm.value = res.data;
|
detailForm.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -464,7 +462,6 @@ const getList = () => {
|
||||||
domicileId: route.query.id,
|
domicileId: route.query.id,
|
||||||
};
|
};
|
||||||
domicilePeoplePageList(params).then((res: any) => {
|
domicilePeoplePageList(params).then((res: any) => {
|
||||||
console.log(res,'res===>');
|
|
||||||
detailTableData.value = res.data.list;
|
detailTableData.value = res.data.list;
|
||||||
total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
tableDataloading.value = false;
|
tableDataloading.value = false;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="percentage-content">
|
<div class="percentage-content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div>
|
<div>
|
||||||
<TitleC titleName="户籍信息">
|
<TitleC titleName="诉求详情">
|
||||||
<template v-slot:option>
|
<template v-slot:option>
|
||||||
<div class="h-layout option">
|
<div class="h-layout option">
|
||||||
<div class="h-layout h-titlec" @click="getDetail">
|
<div class="h-layout h-titlec" @click="getDetail">
|
||||||
|
|
@ -17,60 +17,19 @@
|
||||||
</template>
|
</template>
|
||||||
</TitleC>
|
</TitleC>
|
||||||
<div class="detailForm-content">
|
<div class="detailForm-content">
|
||||||
<el-form
|
<el-form ref="detailFormRef" label-width="150px" :model="detailForm">
|
||||||
ref="formRef"
|
<el-form-item label="姓名" prop="userName">
|
||||||
label-width="150px"
|
|
||||||
:rules="ruleForm"
|
|
||||||
:model="detailForm"
|
|
||||||
>
|
|
||||||
<el-form-item label="姓名" prop="name">
|
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="formEnable"
|
:disabled="detailFormEnable"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
type="input"
|
type="input"
|
||||||
v-model="detailForm.name"
|
v-model="detailForm.userName"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别" prop="sortId">
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
<el-select
|
|
||||||
:disabled="formEnable"
|
|
||||||
placeholder="请选择"
|
|
||||||
v-model="detailForm.sex"
|
|
||||||
>
|
|
||||||
<el-option label="男" :value="1">男</el-option>
|
|
||||||
<el-option label="女" :value="0">女</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="areaCode" label="所属区域">
|
|
||||||
<el-cascader
|
|
||||||
:disabled="formEnable"
|
|
||||||
ref="cascader"
|
|
||||||
v-model="detailForm.areaCode"
|
|
||||||
placeholder="请选择地区"
|
|
||||||
:options="orgList"
|
|
||||||
:props="{
|
|
||||||
checkStrictly: true,
|
|
||||||
label: 'orgname',
|
|
||||||
value: 'orgcode',
|
|
||||||
}"
|
|
||||||
clearable
|
|
||||||
></el-cascader>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="婚姻状态" prop="marriageState">
|
|
||||||
<el-select
|
|
||||||
:disabled="formEnable"
|
|
||||||
placeholder="请选择"
|
|
||||||
v-model="detailForm.marriageState"
|
|
||||||
>
|
|
||||||
<el-option label="已婚" :value="1">已婚</el-option>
|
|
||||||
<el-option label="未婚" :value="2">未婚</el-option>
|
|
||||||
<el-option label="离婚" :value="3">离婚</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="出生日期" prop="birthday">
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="formEnable"
|
:disabled="detailFormEnable"
|
||||||
v-model="detailForm.birthday"
|
v-model="detailForm.createTime"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择出生日期"
|
placeholder="请选择出生日期"
|
||||||
size="default"
|
size="default"
|
||||||
|
|
@ -78,65 +37,130 @@
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="户籍创建时间" prop="changeTime">
|
<el-form-item label="诉求内容" prop="content" style="width: 100%;">
|
||||||
<el-date-picker
|
|
||||||
:disabled="formEnable"
|
|
||||||
v-model="detailForm.changeTime"
|
|
||||||
type="date"
|
|
||||||
placeholder="请选择户籍创建时间"
|
|
||||||
size="default"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="身份证号" prop="idCard">
|
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="formEnable"
|
:disabled="detailFormEnable"
|
||||||
placeholder="请输入身份证号"
|
|
||||||
type="input"
|
|
||||||
v-model="detailForm.idCard"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="现居地址" prop="address">
|
|
||||||
<el-input
|
|
||||||
:disabled="formEnable"
|
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
type="input"
|
:rows="4"
|
||||||
v-model="detailForm.address"
|
type="textarea"
|
||||||
/>
|
v-model="detailForm.content"
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="经度" prop="lon">
|
|
||||||
<el-input
|
|
||||||
:disabled="formEnable"
|
|
||||||
placeholder="请输入"
|
|
||||||
type="input"
|
|
||||||
v-model="detailForm.lon"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="纬度" prop="lat">
|
|
||||||
<el-input
|
|
||||||
:disabled="formEnable"
|
|
||||||
placeholder="请输入"
|
|
||||||
type="input"
|
|
||||||
v-model="detailForm.lat"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="诉求图片:" prop="coverImg" style="width: 100%;">
|
||||||
|
<CustomUpload
|
||||||
|
:listPic="fileListEscalation"
|
||||||
|
:OTCType="FileType.demandsEscalation"
|
||||||
|
:uuid="form.learnContentId"
|
||||||
|
:userId="userId"
|
||||||
|
:baseUrl="baseUrl"
|
||||||
|
:max="9"
|
||||||
|
@onUpdate="updateFile"
|
||||||
|
:readonly="false"
|
||||||
|
></CustomUpload>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<TitleC titleName="处置困难诉求">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div
|
||||||
|
v-if="detailForm.difficultyState == 1"
|
||||||
|
class="h-layout h-titlec"
|
||||||
|
@click="handleSumit()"
|
||||||
|
>
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">处置</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
label-width="150px"
|
||||||
|
:rules="ruleForm"
|
||||||
|
:model="form"
|
||||||
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="formEnable ? false : true"
|
label="诉求处置备注"
|
||||||
label="地图:"
|
prop="remark"
|
||||||
style="width: 94%;"
|
style="width: 100%;"
|
||||||
>
|
>
|
||||||
<Map
|
<el-input
|
||||||
@change="handleMapChange"
|
:disabled="detailForm.difficultyState == 1 ? false : true"
|
||||||
:longlat="
|
placeholder="请输入诉求处置备注"
|
||||||
detailForm.lon && detailForm.lat
|
:rows="4"
|
||||||
? [detailForm.lon, detailForm.lat]
|
type="textarea"
|
||||||
: latAndLon
|
v-model="form.remark"
|
||||||
"
|
/>
|
||||||
></Map>
|
</el-form-item>
|
||||||
|
<el-form-item label="封面:" prop="coverImg" style="width: 100%;">
|
||||||
|
<CustomUpload
|
||||||
|
:listPic="fileList"
|
||||||
|
:OTCType="FileType.demands"
|
||||||
|
:uuid="form.learnContentId || uuid"
|
||||||
|
:userId="userId"
|
||||||
|
:baseUrl="baseUrl"
|
||||||
|
:max="9"
|
||||||
|
@onUpdate="updateFile"
|
||||||
|
:readonly="detailForm.difficultyState == 1 ? false : true"
|
||||||
|
></CustomUpload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<TitleC titleName="困难诉求处置流程信息"></TitleC>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
:data="tableData"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
label="流程"
|
||||||
|
width="60"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="操作人员名"
|
||||||
|
prop="staffName"
|
||||||
|
width="200"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="备注"
|
||||||
|
prop="remark"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="操作时间"
|
||||||
|
prop="operationTime"
|
||||||
|
width="200"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="操作类型"
|
||||||
|
prop="operationType"
|
||||||
|
width="200"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{
|
||||||
|
scope.row.operationType == 1 ? "新增" : "处置"
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -144,57 +168,114 @@
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||||
import { areaTree } from "@/api/account";
|
import { getUUID, FileType } from "@/utils/common";
|
||||||
|
import {
|
||||||
|
difficultyDetail,
|
||||||
|
difficultyDeal,
|
||||||
|
difficultyProcess,
|
||||||
|
} from "@/api/demands";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import { getFile } from "@/api/file";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
const userId = ref(user.value.userId);
|
const userId = ref(user.value.userId);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
//控制form框操作
|
const uuid = ref("");
|
||||||
const formEnable = ref(true);
|
const routeId = ref("");
|
||||||
|
//诉求详情form框操作
|
||||||
|
const detailFormEnable = ref(true);
|
||||||
const detailForm = ref<any>({});
|
const detailForm = ref<any>({});
|
||||||
//道孚地图坐标
|
const detailFormRef = ref<FormInstance>();
|
||||||
const latAndLon = ref([101.13, 30.98]);
|
|
||||||
|
//诉求详情
|
||||||
|
const form = ref({});
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const ruleForm = reactive<FormRules>({
|
const ruleForm = reactive<FormRules>({
|
||||||
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||||
});
|
});
|
||||||
//诉求详情
|
const formEnable = ref(false);
|
||||||
const form = ref({});
|
|
||||||
|
|
||||||
//关闭
|
//关闭
|
||||||
const clone = () => {
|
const clone = () => {
|
||||||
router.go(-1);
|
router.go(-1);
|
||||||
};
|
};
|
||||||
|
//上传封面
|
||||||
//获取详情
|
const fileList = ref([]);
|
||||||
const getDetail = () => {
|
const baseUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
// domicileDetail({domicileId:route.query.id}).then((res: any) => {
|
/**
|
||||||
// console.log(res.data,'res===>');
|
* 文件列表更新
|
||||||
|
*/
|
||||||
// detailForm.value = res.data;
|
const updateFile = (files: any) => {
|
||||||
// });
|
fileList.value = files;
|
||||||
};
|
};
|
||||||
|
//图片查询
|
||||||
//获取地区
|
const getFiles = (id, FileType) => {
|
||||||
const orgList = ref([]);
|
getFile(id, FileType).then((res: any) => {
|
||||||
const getAreaTree = () => {
|
fileList.value = res.data;
|
||||||
areaTree(userId.value).then((res: any) => {
|
|
||||||
orgList.value = res.data;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//获取详情
|
||||||
|
const getDetail = () => {
|
||||||
|
difficultyDetail({ difficultyId: routeId.value }).then((res: any) => {
|
||||||
|
detailForm.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//提交诉求处置
|
||||||
|
const handleSumit = () => {
|
||||||
|
formRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let params = {
|
||||||
|
difficultyId: routeId.value,
|
||||||
|
operationType: 2,
|
||||||
|
processId: uuid.value,
|
||||||
|
remark: form.value.remark,
|
||||||
|
staffId: userId.value,
|
||||||
|
};
|
||||||
|
difficultyDeal(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
refurbish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const tableData = ref([]);
|
||||||
|
//查看困难诉求处置流程信息
|
||||||
|
const tableDataloading = ref(false);
|
||||||
|
const getList = () => {
|
||||||
|
tableDataloading.value = true;
|
||||||
|
let params = {
|
||||||
|
difficultyId: routeId.value,
|
||||||
|
};
|
||||||
|
difficultyProcess(params).then((res: any) => {
|
||||||
|
tableData.value = res.data;
|
||||||
|
tableDataloading.value = false;
|
||||||
|
res.data.forEach((item) => {
|
||||||
|
if (item.operationType == 2) {
|
||||||
|
form.value.remark = item.remark;
|
||||||
|
getFiles(item.processId, FileType.demands);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
//刷新
|
//刷新
|
||||||
const refurbish = () => {
|
const refurbish = () => {
|
||||||
getDetail();
|
getDetail();
|
||||||
|
getList();
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
routeId.value = route.query.id || "";
|
||||||
|
uuid.value = getUUID();
|
||||||
refurbish();
|
refurbish();
|
||||||
getAreaTree();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -9,43 +9,6 @@
|
||||||
<svg-icon name="refurbish" class="icon" />
|
<svg-icon name="refurbish" class="icon" />
|
||||||
<span>刷新</span>
|
<span>刷新</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="label-select filter-tab">
|
|
||||||
<label>户籍状态</label>
|
|
||||||
<el-select
|
|
||||||
placeholder="请选择"
|
|
||||||
v-model="search.domicileState"
|
|
||||||
clearable
|
|
||||||
@change="getList"
|
|
||||||
>
|
|
||||||
<el-option label="正常" :value="1">正常</el-option>
|
|
||||||
<el-option label="注销" :value="2">注销</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="label-select filter-tab">
|
|
||||||
<label>婚姻状态</label>
|
|
||||||
<el-select
|
|
||||||
placeholder="请选择"
|
|
||||||
v-model="search.marriageState"
|
|
||||||
clearable
|
|
||||||
@change="getList"
|
|
||||||
>
|
|
||||||
<el-option label="已婚" :value="1">已婚</el-option>
|
|
||||||
<el-option label="未婚" :value="2">未婚</el-option>
|
|
||||||
<el-option label="离婚" :value="3">离婚</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div> -->
|
|
||||||
<!-- <div class="label-select filter-tab">
|
|
||||||
<label>性别</label>
|
|
||||||
<el-select
|
|
||||||
placeholder="请选择"
|
|
||||||
v-model="search.sex"
|
|
||||||
clearable
|
|
||||||
@change="getList"
|
|
||||||
>
|
|
||||||
<el-option label="男" :value="1">男</el-option>
|
|
||||||
<el-option label="女" :value="0">女</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 30%;">
|
<div style="width: 30%;">
|
||||||
|
|
@ -83,96 +46,39 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
align="center"
|
align="center"
|
||||||
label="姓名"
|
label="用户名"
|
||||||
prop="name"
|
prop="userName"
|
||||||
width="130"
|
width="130"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
align="center"
|
align="center"
|
||||||
label="性别"
|
label="诉求内容"
|
||||||
prop="sex"
|
prop="content"
|
||||||
width="100"
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="状态"
|
||||||
|
prop="difficultyState"
|
||||||
|
width="130"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{
|
<span :class="scope.row.operationType == 1 ? 'didNot' : 'stop'">{{
|
||||||
scope.row.sex == 1 ? "男" : scope.row.sex == 0 ? "女" : "--"
|
scope.row.difficultyState == 1 ? "未处置" : "已处置"
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="出生日期"
|
|
||||||
prop="birthday"
|
|
||||||
width="200"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row.birthday ? scope.row.birthday : "--" }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="婚姻状况"
|
|
||||||
prop="marriageState"
|
|
||||||
width="100"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{
|
|
||||||
scope.row.marriageState == 1
|
|
||||||
? "已婚"
|
|
||||||
: scope.row.marriageState == 2
|
|
||||||
? "未婚"
|
|
||||||
: scope.row.marriageState == 3
|
|
||||||
? "离婚"
|
|
||||||
: "--"
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="居住地址"
|
|
||||||
prop="address"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="所在地区"
|
|
||||||
prop="areaName"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
:resizable="true"
|
|
||||||
align="center"
|
|
||||||
label="户籍状态"
|
|
||||||
prop="domicileState"
|
|
||||||
width="100"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<span class="table_ormal" v-if="scope.row.domicileState == 1"
|
|
||||||
>正常</span
|
|
||||||
>
|
|
||||||
<span class="table_cancel" v-else-if="scope.row.domicileState == 2"
|
|
||||||
>注销</span
|
|
||||||
>
|
|
||||||
<span v-else>--</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:resizable="true"
|
:resizable="true"
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="350"
|
width="180"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span class="operate" @click="toDetail(scope.row.difficultyId)">
|
||||||
class="operate"
|
|
||||||
@click="toDetail(scope.row.domicileId)"
|
|
||||||
>
|
|
||||||
<svg-icon name="detail" class="icon"></svg-icon>
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
<span class="detail">详情</span>
|
<span class="detail">详情</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -197,8 +103,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { onMounted, reactive, ref } from "vue";
|
import { onMounted, reactive, ref } from "vue";
|
||||||
import { domicilePage, domicileDel, domicileRestore } from "@/api/base";
|
import { difficultyPage } from "@/api/demands";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
@ -211,9 +116,6 @@ const dialogForm = ref({});
|
||||||
const readonly = ref(false);
|
const readonly = ref(false);
|
||||||
const search = ref({
|
const search = ref({
|
||||||
condition: "",
|
condition: "",
|
||||||
domicileState: "",
|
|
||||||
marriageState:"",
|
|
||||||
sex:"",
|
|
||||||
});
|
});
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
const pageSize = ref(10);
|
const pageSize = ref(10);
|
||||||
|
|
@ -227,12 +129,8 @@ const getList = () => {
|
||||||
limit: pageSize.value,
|
limit: pageSize.value,
|
||||||
page: currentPage.value,
|
page: currentPage.value,
|
||||||
condition: search.value.condition,
|
condition: search.value.condition,
|
||||||
userId: userId.value,
|
|
||||||
domicileState:search.value.domicileState,
|
|
||||||
marriageState:search.value.marriageState,
|
|
||||||
sex:search.value.sex,
|
|
||||||
};
|
};
|
||||||
domicilePage(params).then((res: any) => {
|
difficultyPage(params).then((res: any) => {
|
||||||
tableData.value = res.data.list;
|
tableData.value = res.data.list;
|
||||||
total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
tableDataloading.value = false;
|
tableDataloading.value = false;
|
||||||
|
|
@ -280,4 +178,14 @@ onMounted(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
.coverImg {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
.stop {
|
||||||
|
color: rgb(8 238 8);
|
||||||
|
}
|
||||||
|
.didNot {
|
||||||
|
color: #fb4e33;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
289
src/views/system/message/public-content/detail.vue
Normal file
289
src/views/system/message/public-content/detail.vue
Normal file
|
|
@ -0,0 +1,289 @@
|
||||||
|
<template>
|
||||||
|
<div class="percentage-content">
|
||||||
|
<div class="content">
|
||||||
|
<div>
|
||||||
|
<TitleC titleName="公开内容信息">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div class="h-layout h-titlec" @click="getDetail">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span class="span">刷新</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="h-layout h-titlec"
|
||||||
|
@click="resetPwd"
|
||||||
|
v-if="formEnable"
|
||||||
|
>
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">编辑</span>
|
||||||
|
</div>
|
||||||
|
<div v-else class="h-layout h-titlec" @click="handleSumit()">
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">保存</span>
|
||||||
|
</div>
|
||||||
|
<div class="h-layout h-titlec" @click="clone">
|
||||||
|
<svg-icon name="close" class="icon" />
|
||||||
|
<span class="span">关闭</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
label-width="150px"
|
||||||
|
:rules="ruleForm"
|
||||||
|
:model="detailForm"
|
||||||
|
>
|
||||||
|
<el-form-item label="标题名称:" prop="title" style="width: 100%;">
|
||||||
|
<el-input
|
||||||
|
:disabled="formEnable"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="detailForm.title"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容:" prop="content" style="width: 100%;">
|
||||||
|
<div class="qedit">
|
||||||
|
<QuillEditor
|
||||||
|
class="qedit"
|
||||||
|
:value="detailForm.content"
|
||||||
|
@updateValue="getMsg"
|
||||||
|
:id="detailForm.publicContentId"
|
||||||
|
:userId="userId"
|
||||||
|
:FileType="FileType.publicContent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="封面:" prop="coverImg" style="width: 100%;">
|
||||||
|
<CustomUpload
|
||||||
|
:listPic="fileList"
|
||||||
|
:OTCType="FileType.publicContentCover"
|
||||||
|
:uuid="detailForm.publicContentId"
|
||||||
|
:userId="userId"
|
||||||
|
:baseUrl="baseUrl"
|
||||||
|
:max="1"
|
||||||
|
@onUpdate="updateFile"
|
||||||
|
:readonly="formEnable"
|
||||||
|
></CustomUpload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<TitleC titleName="学习人员信息">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div class="h-layout h-titlec" @click="getList">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span class="span">刷新</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
:data="detailTableData"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
label="序列"
|
||||||
|
width="60"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="党员姓名"
|
||||||
|
prop="userName"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label=" 查看时间"
|
||||||
|
prop="checkTime"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
@size-change="getList"
|
||||||
|
@current-change="getList"
|
||||||
|
v-model:current-page.sync="currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
v-model:page-size.sync="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang='ts' setup>
|
||||||
|
import { onMounted, reactive, ref } from "vue";
|
||||||
|
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||||
|
import { uploadFile, getFile, delFile } from "@/api/file";
|
||||||
|
import { publicContentSave, publicContentDetail, publicCheckList } from "@/api/Sys";
|
||||||
|
import { FileType } from "@/utils/common";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
//控制form框操作
|
||||||
|
const formEnable = ref(true);
|
||||||
|
const detailForm = ref<any>({ content: "", title: "" });
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const ruleForm = reactive<FormRules>({
|
||||||
|
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
||||||
|
});
|
||||||
|
//id
|
||||||
|
const domicileId = ref('');
|
||||||
|
//人员信息
|
||||||
|
const form = ref({});
|
||||||
|
//人员信息弹窗
|
||||||
|
const detailDialogVisible = ref(false);
|
||||||
|
const readonly = ref(false);
|
||||||
|
//table列表
|
||||||
|
const tableDataloading = ref(false);
|
||||||
|
const tableData = ref([]);
|
||||||
|
const currentPage = ref(1);
|
||||||
|
const pageSize = ref(10);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
//编辑
|
||||||
|
const resetPwd = () => {
|
||||||
|
formEnable.value = false;
|
||||||
|
};
|
||||||
|
//保存
|
||||||
|
const handleSumit = () => {
|
||||||
|
formRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let params = {
|
||||||
|
...detailForm.value,
|
||||||
|
coverPath:fileList.value[0].filepath,
|
||||||
|
publicContentId:detailForm.value.publicContentId,
|
||||||
|
content : msgContent.value
|
||||||
|
}
|
||||||
|
publicContentSave(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
formEnable.value = true;
|
||||||
|
refurbish(domicileId.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//关闭
|
||||||
|
const clone = () => {
|
||||||
|
router.go(-1);
|
||||||
|
};
|
||||||
|
//上传封面
|
||||||
|
const fileList = ref([]);
|
||||||
|
const baseUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
/**
|
||||||
|
* 文件列表更新
|
||||||
|
*/
|
||||||
|
const updateFile = (files: any) => {
|
||||||
|
fileList.value = files;
|
||||||
|
};
|
||||||
|
//图片查询
|
||||||
|
const getFiles = (FileType) => {
|
||||||
|
getFile(detailForm.value.publicContentId, FileType).then(
|
||||||
|
(res: any) => {
|
||||||
|
fileList.value = res.data;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
//查询详情
|
||||||
|
const getPublicContentDetail = (id) => {
|
||||||
|
let params = {
|
||||||
|
publicContentId: id,
|
||||||
|
};
|
||||||
|
publicContentDetail(params).then((res: any) => {
|
||||||
|
detailForm.value = res.data;
|
||||||
|
getFiles(FileType.publicContentCover);
|
||||||
|
msgContent.value = res.data.content;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//人员信息分页
|
||||||
|
const detailTableData = ref([]);
|
||||||
|
const getList = () => {
|
||||||
|
tableDataloading.value = true;
|
||||||
|
let params = {
|
||||||
|
limit: pageSize.value,
|
||||||
|
page: currentPage.value,
|
||||||
|
publicContentId: route.query.id,
|
||||||
|
};
|
||||||
|
publicCheckList(params).then((res: any) => {
|
||||||
|
detailTableData.value = res.data.list;
|
||||||
|
total.value = res.data.total;
|
||||||
|
tableDataloading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//富文本
|
||||||
|
const msgContent = ref("");
|
||||||
|
const getMsg = (val) => {
|
||||||
|
// addMessageForm.content = val;
|
||||||
|
msgContent.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
//刷新
|
||||||
|
const refurbish = (id) => {
|
||||||
|
getPublicContentDetail(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
domicileId.value = route.query.id || "";
|
||||||
|
refurbish(domicileId.value);
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0.26042vw;
|
||||||
|
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
|
||||||
|
height: 100%;
|
||||||
|
padding: 0.83333vw;
|
||||||
|
overflow-y: scroll;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.detailForm-content {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
:deep(.el-form) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -90,9 +90,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="operate"
|
class="operate"
|
||||||
@click="
|
@click="toDetail(scope.row.publicContentId)"
|
||||||
(dialogVisible = true), (form = scope.row), (readonly = true)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<svg-icon name="detail" class="icon"></svg-icon>
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
<span class="detail">详情</span>
|
<span class="detail">详情</span>
|
||||||
|
|
@ -133,7 +131,9 @@ import { onMounted, reactive, ref } from "vue";
|
||||||
import { publicContentPage, publicContentDelete } from "@/api/Sys";
|
import { publicContentPage, publicContentDelete } from "@/api/Sys";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import Add from "./add.vue";
|
import Add from "./add.vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
const userId = ref(user.value.userId);
|
const userId = ref(user.value.userId);
|
||||||
|
|
@ -191,6 +191,13 @@ const del = (id) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//公开内容详情
|
||||||
|
const toDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
name: "public-detail",
|
||||||
|
query: { id: id },
|
||||||
|
});
|
||||||
|
};
|
||||||
//关闭新增弹窗
|
//关闭新增弹窗
|
||||||
const onclone = () => {
|
const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
|
|
|
||||||
289
src/views/system/message/study-content/detail.vue
Normal file
289
src/views/system/message/study-content/detail.vue
Normal file
|
|
@ -0,0 +1,289 @@
|
||||||
|
<template>
|
||||||
|
<div class="percentage-content">
|
||||||
|
<div class="content">
|
||||||
|
<div>
|
||||||
|
<TitleC titleName="党员学习内容信息">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div class="h-layout h-titlec" @click="getDetail">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span class="span">刷新</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="h-layout h-titlec"
|
||||||
|
@click="resetPwd"
|
||||||
|
v-if="formEnable"
|
||||||
|
>
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">编辑</span>
|
||||||
|
</div>
|
||||||
|
<div v-else class="h-layout h-titlec" @click="handleSumit()">
|
||||||
|
<svg-icon name="save-yellow" class="icon" />
|
||||||
|
<span class="span">保存</span>
|
||||||
|
</div>
|
||||||
|
<div class="h-layout h-titlec" @click="clone">
|
||||||
|
<svg-icon name="close" class="icon" />
|
||||||
|
<span class="span">关闭</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<div class="detailForm-content">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
label-width="150px"
|
||||||
|
:rules="ruleForm"
|
||||||
|
:model="detailForm"
|
||||||
|
>
|
||||||
|
<el-form-item label="标题名称:" prop="title" style="width: 100%;">
|
||||||
|
<el-input
|
||||||
|
:disabled="formEnable"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="detailForm.title"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容:" prop="content" style="width: 100%;">
|
||||||
|
<div class="qedit">
|
||||||
|
<QuillEditor
|
||||||
|
class="qedit"
|
||||||
|
:value="detailForm.content"
|
||||||
|
@updateValue="getMsg"
|
||||||
|
:id="detailForm.learnContentId"
|
||||||
|
:userId="userId"
|
||||||
|
:FileType="FileType.studyContent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="封面:" prop="coverImg" style="width: 100%;">
|
||||||
|
<CustomUpload
|
||||||
|
:listPic="fileList"
|
||||||
|
:OTCType="FileType.studyContentCover"
|
||||||
|
:uuid="detailForm.learnContentId"
|
||||||
|
:userId="userId"
|
||||||
|
:baseUrl="baseUrl"
|
||||||
|
:max="1"
|
||||||
|
@onUpdate="updateFile"
|
||||||
|
:readonly="formEnable"
|
||||||
|
></CustomUpload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<TitleC titleName="学习人员信息">
|
||||||
|
<template v-slot:option>
|
||||||
|
<div class="h-layout option">
|
||||||
|
<div class="h-layout h-titlec" @click="getList">
|
||||||
|
<svg-icon name="refurbish" class="icon" />
|
||||||
|
<span class="span">刷新</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</TitleC>
|
||||||
|
<el-table
|
||||||
|
ref="loading"
|
||||||
|
v-loading="tableDataloading"
|
||||||
|
:data="detailTableData"
|
||||||
|
header-row-class-name="el-one-header"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
align="center"
|
||||||
|
label="序列"
|
||||||
|
width="60"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label="党员姓名"
|
||||||
|
prop="userName"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="true"
|
||||||
|
align="center"
|
||||||
|
label=" 查看时间"
|
||||||
|
prop="checkTime"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<el-pagination
|
||||||
|
class="pagination"
|
||||||
|
@size-change="getList"
|
||||||
|
@current-change="getList"
|
||||||
|
v-model:current-page.sync="currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
v-model:page-size.sync="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total"
|
||||||
|
background
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang='ts' setup>
|
||||||
|
import { onMounted, reactive, ref } from "vue";
|
||||||
|
import { ElMessage, FormInstance, FormRules, ElMessageBox } from "element-plus";
|
||||||
|
import { uploadFile, getFile, delFile } from "@/api/file";
|
||||||
|
import { partyLearnSave, partyLearnDetail,partyCheckList } from "@/api/Sys";
|
||||||
|
import { FileType } from "@/utils/common";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import useUserStore from "@/store/modules/user";
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
|
const userId = ref(user.value.userId);
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
//控制form框操作
|
||||||
|
const formEnable = ref(true);
|
||||||
|
const detailForm = ref<any>({ content: "", title: "" });
|
||||||
|
const formRef = ref<FormInstance>();
|
||||||
|
const ruleForm = reactive<FormRules>({
|
||||||
|
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
||||||
|
});
|
||||||
|
//id
|
||||||
|
const domicileId = ref('');
|
||||||
|
//人员信息
|
||||||
|
const form = ref({});
|
||||||
|
//人员信息弹窗
|
||||||
|
const detailDialogVisible = ref(false);
|
||||||
|
const readonly = ref(false);
|
||||||
|
//table列表
|
||||||
|
const tableDataloading = ref(false);
|
||||||
|
const tableData = ref([]);
|
||||||
|
const currentPage = ref(1);
|
||||||
|
const pageSize = ref(10);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
//编辑
|
||||||
|
const resetPwd = () => {
|
||||||
|
formEnable.value = false;
|
||||||
|
};
|
||||||
|
//保存
|
||||||
|
const handleSumit = () => {
|
||||||
|
formRef.value?.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let params = {
|
||||||
|
...detailForm.value,
|
||||||
|
coverPath:fileList.value[0].filepath,
|
||||||
|
learnContentId:detailForm.value.learnContentId,
|
||||||
|
content : msgContent.value
|
||||||
|
}
|
||||||
|
partyLearnSave(params).then((res: any) => {
|
||||||
|
if (res.code == 1) {
|
||||||
|
ElMessage.success({
|
||||||
|
message: "保存成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
formEnable.value = true;
|
||||||
|
refurbish(domicileId.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//关闭
|
||||||
|
const clone = () => {
|
||||||
|
router.go(-1);
|
||||||
|
};
|
||||||
|
//上传封面
|
||||||
|
const fileList = ref([]);
|
||||||
|
const baseUrl = ref(import.meta.env.VITE_UPLOAD_URL);
|
||||||
|
/**
|
||||||
|
* 文件列表更新
|
||||||
|
*/
|
||||||
|
const updateFile = (files: any) => {
|
||||||
|
fileList.value = files;
|
||||||
|
};
|
||||||
|
//图片查询
|
||||||
|
const getFiles = (FileType) => {
|
||||||
|
getFile(detailForm.value.learnContentId, FileType).then(
|
||||||
|
(res: any) => {
|
||||||
|
fileList.value = res.data;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
//查询详情
|
||||||
|
const getPartyLearnDetail = (id) => {
|
||||||
|
let params = {
|
||||||
|
learnContentId: id,
|
||||||
|
};
|
||||||
|
partyLearnDetail(params).then((res: any) => {
|
||||||
|
detailForm.value = res.data;
|
||||||
|
getFiles(FileType.studyContentCover);
|
||||||
|
msgContent.value = res.data.content;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//人员信息分页
|
||||||
|
const detailTableData = ref([]);
|
||||||
|
const getList = () => {
|
||||||
|
tableDataloading.value = true;
|
||||||
|
let params = {
|
||||||
|
limit: pageSize.value,
|
||||||
|
page: currentPage.value,
|
||||||
|
learnContentId: route.query.id,
|
||||||
|
};
|
||||||
|
partyCheckList(params).then((res: any) => {
|
||||||
|
detailTableData.value = res.data.list;
|
||||||
|
total.value = res.data.total;
|
||||||
|
tableDataloading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//富文本
|
||||||
|
const msgContent = ref("");
|
||||||
|
const getMsg = (val) => {
|
||||||
|
// addMessageForm.content = val;
|
||||||
|
msgContent.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
//刷新
|
||||||
|
const refurbish = (id) => {
|
||||||
|
getPartyLearnDetail(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
domicileId.value = route.query.id || "";
|
||||||
|
refurbish(domicileId.value);
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0.26042vw;
|
||||||
|
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
|
||||||
|
height: 100%;
|
||||||
|
padding: 0.83333vw;
|
||||||
|
overflow-y: scroll;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.detailForm-content {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
:deep(.el-form) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -90,9 +90,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="operate"
|
class="operate"
|
||||||
@click="
|
@click="toDetail(scope.row.learnContentId)"
|
||||||
(dialogVisible = true), (form = scope.row), (readonly = true)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<svg-icon name="detail" class="icon"></svg-icon>
|
<svg-icon name="detail" class="icon"></svg-icon>
|
||||||
<span class="detail">详情</span>
|
<span class="detail">详情</span>
|
||||||
|
|
@ -133,7 +131,9 @@ import { onMounted, reactive, ref } from "vue";
|
||||||
import { partyLearnPage, partyLearnDelete } from "@/api/Sys";
|
import { partyLearnPage, partyLearnDelete } from "@/api/Sys";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import Add from "./add.vue";
|
import Add from "./add.vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
import useUserStore from "@/store/modules/user";
|
import useUserStore from "@/store/modules/user";
|
||||||
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const user = ref(JSON.parse(userStore.userInfo));
|
const user = ref(JSON.parse(userStore.userInfo));
|
||||||
const userId = ref(user.value.userId);
|
const userId = ref(user.value.userId);
|
||||||
|
|
@ -191,6 +191,13 @@ const del = (id) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//党员学习内容详情
|
||||||
|
const toDetail = (id) => {
|
||||||
|
router.push({
|
||||||
|
name: "study-detail",
|
||||||
|
query: { id: id },
|
||||||
|
});
|
||||||
|
};
|
||||||
//关闭新增弹窗
|
//关闭新增弹窗
|
||||||
const onclone = () => {
|
const onclone = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user