更改发布任务

lijinlong
李劲龙 2 years ago
parent 4694a94d9b
commit beccaa030e

@ -1,10 +1,10 @@
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import Router from "vue-router";
Vue.use(Router) Vue.use(Router);
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from "@/layout";
/** /**
* Note: 路由配置项 * Note: 路由配置项
@ -31,153 +31,168 @@ import Layout from '@/layout'
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ {
path: '/redirect', path: "/redirect",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: "/redirect/:path(.*)",
component: () => import('@/views/redirect') component: () => import("@/views/redirect"),
} },
] ],
}, },
{ {
path: '/login', path: "/login",
component: () => import('@/views/login'), component: () => import("@/views/login"),
hidden: true hidden: true,
}, },
{ {
path: '/register', path: "/register",
component: () => import('@/views/register'), component: () => import("@/views/register"),
hidden: true hidden: true,
}, },
{ {
path: '/404', path: "/404",
component: () => import('@/views/error/404'), component: () => import("@/views/error/404"),
hidden: true hidden: true,
}, },
{ {
path: '/401', path: "/401",
component: () => import('@/views/error/401'), component: () => import("@/views/error/401"),
hidden: true hidden: true,
}, },
// {
// path: "",
// component: Layout,
// redirect: "index",
// children: [
// {
// path: "index",
// component: () => import("@/views/index"),
// name: "Index",
// meta: { title: "首页", icon: "dashboard", affix: true },
// },
// ],
// },
{ {
path: '', path: "/user",
component: Layout, component: Layout,
redirect: 'index', hidden: true,
redirect: "noredirect",
children: [ children: [
{ {
path: 'index', path: "profile",
component: () => import('@/views/index'), component: () => import("@/views/system/user/profile/index"),
name: 'Index', name: "Profile",
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: "个人中心", icon: "user" },
} },
] ],
}, },
{ {
path: '/user', path: "",
component: Layout, component: Layout,
hidden: true, redirect: "Zdgl",
redirect: 'noredirect',
children: [ children: [
{ {
path: 'profile', path: "/volunteer/zyzsjgl/zdgl/:dictId(\\d+)",
component: () => import('@/views/system/user/profile/index'), component: () => import("@/views/volunteer/zyzsjgl/zdgl/data"),
name: 'Profile', hidden: true,
meta: { title: '个人中心', icon: 'user' } name:"Zdgl",
} meta: { title: "字典详情", icon: "dashboard", affix: true , activeMenu: "/volunteer/zyzsjgl/zdgl"},
] },
} ],
] },
];
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [ export const dynamicRoutes = [
{ {
path: '/system/user-auth', path: "/system/user-auth",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:user:edit'], permissions: ["system:user:edit"],
children: [ children: [
{ {
path: 'role/:userId(\\d+)', path: "role/:userId(\\d+)",
component: () => import('@/views/system/user/authRole'), component: () => import("@/views/system/user/authRole"),
name: 'AuthRole', name: "AuthRole",
meta: { title: '分配角色', activeMenu: '/system/user' } meta: { title: "分配角色", activeMenu: "/system/user" },
} },
] ],
}, },
{ {
path: '/system/role-auth', path: "/system/role-auth",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:role:edit'], permissions: ["system:role:edit"],
children: [ children: [
{ {
path: 'user/:roleId(\\d+)', path: "user/:roleId(\\d+)",
component: () => import('@/views/system/role/authUser'), component: () => import("@/views/system/role/authUser"),
name: 'AuthUser', name: "AuthUser",
meta: { title: '分配用户', activeMenu: '/system/role' } meta: { title: "分配用户", activeMenu: "/system/role" },
} },
] ],
}, },
{ {
path: '/system/dict-data', path: "/system/dict-data",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:dict:list'], permissions: ["system:dict:list"],
children: [ children: [
{ {
path: 'index/:dictId(\\d+)', path: "index/:dictId(\\d+)",
component: () => import('@/views/system/dict/data'), component: () => import("@/views/system/dict/data"),
name: 'Data', name: "Data",
meta: { title: '字典数据', activeMenu: '/system/dict' } meta: { title: "字典数据", activeMenu: "/system/dict" },
} },
] ],
}, },
{ {
path: '/monitor/job-log', path: "/monitor/job-log",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['monitor:job:list'], permissions: ["monitor:job:list"],
children: [ children: [
{ {
path: 'index/:jobId(\\d+)', path: "index/:jobId(\\d+)",
component: () => import('@/views/monitor/job/log'), component: () => import("@/views/monitor/job/log"),
name: 'JobLog', name: "JobLog",
meta: { title: '调度日志', activeMenu: '/monitor/job' } meta: { title: "调度日志", activeMenu: "/monitor/job" },
} },
] ],
}, },
{ {
path: '/tool/gen-edit', path: "/tool/gen-edit",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['tool:gen:edit'], permissions: ["tool:gen:edit"],
children: [ children: [
{ {
path: 'index/:tableId(\\d+)', path: "index/:tableId(\\d+)",
component: () => import('@/views/tool/gen/editTable'), component: () => import("@/views/tool/gen/editTable"),
name: 'GenEdit', name: "GenEdit",
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
} },
] ],
} },
] ];
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
let routerPush = Router.prototype.push; let routerPush = Router.prototype.push;
let routerReplace = Router.prototype.replace; let routerReplace = Router.prototype.replace;
// push // push
Router.prototype.push = function push(location) { Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err) return routerPush.call(this, location).catch((err) => err);
} };
// replace // replace
Router.prototype.replace = function push(location) { Router.prototype.replace = function push(location) {
return routerReplace.call(this, location).catch(err => err) return routerReplace.call(this, location).catch((err) => err);
} };
export default new Router({ export default new Router({
// mode: 'history', // 去掉url中的# // mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes,
}) });

@ -14,13 +14,10 @@
label="序号" label="序号"
type="index" type="index"
header-align="center" header-align="center"
width="70"> width="70"
</el-table-column>
<el-table-column
prop="content"
label="参与活动"
width="280"
> >
</el-table-column>
<el-table-column prop="content" label="参与活动" width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="activity"> <div class="activity">
<div>{{ scope.row.name }}</div> <div>{{ scope.row.name }}</div>
@ -35,35 +32,25 @@
width="180" width="180"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="duration" label="服务时长"> </el-table-column>
prop="duration" <el-table-column prop="address" label="参加地址"> </el-table-column>
label="服务时长" <el-table-column prop="activityTime" label="参加时间">
>
</el-table-column>
<el-table-column
prop="address"
label="参加地址"
>
</el-table-column>
<el-table-column
prop="activityTime"
label="参加时间"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.activityTime.split(' ')[0] }}</div> <div>{{ scope.row.activityTime.split(" ")[0] }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" width="250">
label="操作"
width="250"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tabs-btns"> <div class="tabs-btns">
<div class="look" @click="look(scope.row)"> <div class="look" @click="look(scope.row)">
<img src="@/assets/images/look.png" alt=""> <img src="@/assets/images/look.png" alt="" />
<span>查看</span> <span>查看</span>
</div> </div>
<div class="look" @click="participation(scope.row)" v-if="scope.row.involveStaus == 2"> <div
class="look"
@click="participation(scope.row)"
v-if="scope.row.involveStaus == 2"
>
<!-- <img src="@/assets/images/look.png" alt=""> --> <!-- <img src="@/assets/images/look.png" alt=""> -->
<span>报名</span> <span>报名</span>
</div> </div>
@ -96,7 +83,7 @@
</div> </div>
<div class="itemE"> <div class="itemE">
<div>活动时间:</div> <div>活动时间:</div>
<div>{{ dialogContent.activityTime.split(' ')[0] }}</div> <div>{{ dialogContent.activityTime.split(" ")[0] }}</div>
</div> </div>
</div> </div>
<div class="mainsEvents"> <div class="mainsEvents">
@ -117,7 +104,13 @@
<div class="itemE"> <div class="itemE">
<div>活动标签:</div> <div>活动标签:</div>
<div class="mainTag"> <div class="mainTag">
<div v-for="item in dialogContent.label">{{ item.name }}</div> <div
v-show="item != ''"
v-for="(item, index) in dialogContent.label"
:key="index"
>
{{ item }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -125,78 +118,90 @@
</div> </div>
</template> </template>
<script> <script>
import myPagination from "@/views/components/myPagination/index.vue" import myPagination from "@/views/components/myPagination/index.vue";
import myDialog from "@/views/components/dialog/index.vue" import myDialog from "@/views/components/dialog/index.vue";
import { mapState } from "vuex"; import { mapState } from "vuex";
import { Loading } from "element-ui"; import { Loading } from "element-ui";
export default { export default {
components:{myPagination,myDialog}, components: { myPagination, myDialog },
data() { data() {
return { return {
tableData: [], tableData: [],
pages:{ pages: {
pageSize:10, pageSize: 10,
pageNum:1 pageNum: 1,
}, },
total:0, total: 0,
loading:false, loading: false,
input:{ input: {
name:"" name: "",
}, },
loadingTwo:false, loadingTwo: false,
dialogContent:{ dialogContent: {
name:'', name: "",
content:'', content: "",
publisher:'', publisher: "",
activityTime:'', activityTime: "",
address:'', address: "",
label:[] label: [],
} },
} arr: [
"ageRange",
"sexRange",
"politicalRange",
"educationRange",
"housingRange",
"industryRange",
"interestRange",
"professionalRange",
"schoolRange",
"nationalityRange",
],
};
}, },
props:{ props: {
value:{ value: {
type:String, type: String,
default:'' default: "",
} },
}, },
watch:{ watch: {
value:{ value: {
handler(newInput,oldInput) { handler(newInput, oldInput) {
// //
this.input.name = newInput; this.input.name = newInput;
this.pages= { this.pages = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}; };
this.getList() this.getList();
}, },
immediate:true, immediate: true,
} },
}, },
methods:{ methods: {
// //
async getList(params){ async getList(params) {
this.loading = true; this.loading = true;
if(params == '1') { if (params == "1") {
this.pages= { this.pages = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}; };
this.input.name = ''; this.input.name = "";
} }
let obj = { ...this.pages,...this.input } let obj = { ...this.pages, ...this.input };
let data = await this.$api.huodongtuijian.list(obj); let data = await this.$api.huodongtuijian.list(obj);
if(data.code == 200) { if (data.code == 200) {
this.loading = false; this.loading = false;
this.tableData = data.rows; this.tableData = data.rows;
this.total = data.total; this.total = data.total;
} }
}, },
// //
pagesChange(pages){ pagesChange(pages) {
// console.log(pages) // console.log(pages)
this.getList(pages) this.getList(pages);
}, },
// tabsclass // tabsclass
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
@ -210,59 +215,69 @@ export default {
if (columnIndex === 0) { if (columnIndex === 0) {
return `text-align:center`; return `text-align:center`;
} else { } else {
return ''; return "";
} }
}, },
// //
async look(row){ //
this.$refs.chakan.open(); labelgenerate(data = {}) {
let arrlist = [];
for (let key3 of this.arr) {
for (let key4 in data) {
if (key3 == key4) {
let a = data[key3];
arrlist.push(a);
}
}
}
return arrlist;
},
async look(row) {
this.loadingTwo = true; this.loadingTwo = true;
let data = await this.$api.huodongtuijian.activity(row.id); let data = await this.$api.huodongtuijian.activity(row.id);
if(data.code == 200){ if (data.code == 200) {
this.loadingTwo = false; this.loadingTwo = false;
let {name,content,publisher,activityTime,address,ageRange,sexRange,politicalRange,educationRange,housingRange,industryRange,interestRange,professionalRange,schoolRange} = data.data; let arr = this.labelgenerate(data.data);
let arr = []; this.dialogContent = {
arr.push(ageRange,sexRange,politicalRange,educationRange,housingRange,industryRange,interestRange,professionalRange,schoolRange) name: data.data.name,
let arrtwo = [] content: data.data.content,
arr.forEach((item)=>{ publisher: data.data.publisher,
let obj = {} activityTime: data.data.activityTime,
if(item) { address: data.data.address,
obj['name'] = item label: arr,
arrtwo.push(obj) };
} console.log(this.dialogContent);
}) this.$refs.chakan.open();
console.log(arrtwo)
this.dialogContent = {name,content,publisher,activityTime,address,label:arrtwo};
} }
}, },
// //
participation(row){ participation(row) {
// this.$refs.participation.open(); // this.$refs.participation.open();
this.$confirm('是否确定报名活动?', '确认信息', { this.$confirm("是否确定报名活动?", "确认信息", {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消' cancelButtonText: "取消",
})
.then(() => {
this.action(row)
}) })
.catch(action => { .then(() => {
console.log(action) this.action(row);
}); })
.catch((action) => {
console.log(action);
});
}, },
// //
async action(row){ async action(row) {
let downloadLoadingInstance = Loading.service({ let downloadLoadingInstance = Loading.service({
text: "正在申请报名活动,请稍后", text: "正在申请报名活动,请稍后",
spinner: "el-icon-loading", spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)", background: "rgba(0, 0, 0, 0.7)",
}); });
let obj = { let obj = {
activityId: row.id activityId: row.id,
} };
let data = await this.$api.huodongtuijian.zyzreport(obj) let data = await this.$api.huodongtuijian.zyzreport(obj);
// alert('submit!'); // alert('submit!');
if(data.code == 200) { if (data.code == 200) {
downloadLoadingInstance.close(); downloadLoadingInstance.close();
this.$message({ this.$message({
message: "申请报名成功", message: "申请报名成功",
@ -272,14 +287,14 @@ export default {
} }
}, },
// //
close(){ close() {
this.$refs.participation.Close(); this.$refs.participation.Close();
} },
}, },
mounted(){ mounted() {
this.getList(); this.getList();
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tables { .tables {
@ -293,14 +308,14 @@ export default {
line-height: 20px; line-height: 20px;
&:nth-child(1) { &:nth-child(1) {
font-size: 14px; font-size: 14px;
font-family: 'Alibaba PuHuiTi'; font-family: "Alibaba PuHuiTi";
font-weight: 400; font-weight: 400;
color: #4D4949; color: #4d4949;
} }
&:nth-child(2) { &:nth-child(2) {
width: 180px; width: 180px;
font-size: 14px; font-size: 14px;
font-family: 'Alibaba PuHuiTi'; font-family: "Alibaba PuHuiTi";
font-weight: 400; font-weight: 400;
color: #999191; color: #999191;
white-space: nowrap; white-space: nowrap;
@ -314,18 +329,18 @@ export default {
box-sizing: border-box; box-sizing: border-box;
// text-align: center; // text-align: center;
font-size: 14px; font-size: 14px;
font-family: 'Alibaba PuHuiTi'; font-family: "Alibaba PuHuiTi";
font-weight: 400; font-weight: 400;
color: #525966; color: #525966;
padding: 2px 0; padding: 2px 0;
} }
th { th {
height: 45px; height: 45px;
background-color: #F7F5F5; background-color: #f7f5f5;
font-size: 15px; font-size: 15px;
font-family: 'Alibaba PuHuiTi'; font-family: "Alibaba PuHuiTi";
font-weight: bold; font-weight: bold;
color: #4D4949; color: #4d4949;
.el-checkbox { .el-checkbox {
display: none; display: none;
} }
@ -338,7 +353,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
// justify-content: center; // justify-content: center;
.look{ .look {
display: flex; display: flex;
// align-items: center; // align-items: center;
margin-right: 30px; margin-right: 30px;
@ -351,7 +366,7 @@ export default {
font-size: 15px; font-size: 15px;
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: 400; font-weight: 400;
color: #045FFD; color: #045ffd;
} }
} }
} }

@ -24,11 +24,18 @@
<div class="leftName"> <div class="leftName">
<div>周爱</div> <div>周爱</div>
<div class="mainTag"> <div class="mainTag">
<div>{{ item.ageRange }}</div> <!-- <div>{{ item.ageRange }}</div>
<div> <div>
{{ item.sexRange }} {{ item.sexRange }}
</div> </div>
<div>{{ item.educationRange }}</div> <div>{{ item.educationRange }}</div> -->
<div
v-show="itema != ''"
v-for="(itema, index) in item.arrlist"
:key="index"
>
{{ itema }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -37,7 +44,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else class="noneStyle" >暂无数据</div> <div v-else class="noneStyle">暂无数据</div>
</div> </div>
<div class="pagination" ref="pagination"> <div class="pagination" ref="pagination">
@ -139,6 +146,18 @@ export default {
value: "", value: "",
}, },
], ],
arr: [
"ageRange",
"sexRange",
"politicalRange",
"educationRange",
"housingRange",
"industryRange",
"interestRange",
"professionalRange",
"schoolRange",
"nationalityRange",
],
}; };
}, },
created() { created() {
@ -164,10 +183,28 @@ export default {
this.form = { ...this.form, ...this.afterParams }; this.form = { ...this.form, ...this.afterParams };
this.getList(); this.getList();
}, },
//
labelgenerate(data = {}) {
let arrlist = [];
for (let key3 of this.arr) {
for (let key4 in data) {
if (key3 == key4) {
let a = data[key3];
arrlist.push(a);
}
}
}
return arrlist;
},
getList() { getList() {
this.loads = true; this.loads = true;
peopleList(this.form).then((res) => { peopleList(this.form).then((res) => {
this.arrList = res.rows; this.arrList = res.rows;
if (this.arrList.length > 0) {
this.arrList.forEach((item) => {
item.arrlist = this.labelgenerate(item);
});
}
this.total = res.total; this.total = res.total;
this.loads = false; this.loads = false;
}); });
@ -187,16 +224,16 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.noneStyle { .noneStyle {
height: 490px; height: 490px;
margin-bottom: 12px; margin-bottom: 12px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-family: "Alibaba-PuHuiTi-Medium.otf"; font-family: "Alibaba-PuHuiTi-Medium.otf";
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
} }
.center-content { .center-content {
padding: 20px 30px; padding: 20px 30px;
} }
@ -258,8 +295,10 @@ export default {
} }
.mainTag { .mainTag {
display: flex; display: flex;
flex-wrap: wrap;
font-family: "Alibaba-PuHuiTi-Regular"; font-family: "Alibaba-PuHuiTi-Regular";
& > div { & > div {
margin-bottom: 5px;
margin-right: 5px; margin-right: 5px;
background-color: rgba(248, 65, 77, 0.06); background-color: rgba(248, 65, 77, 0.06);
padding: 3px 5px; padding: 3px 5px;
@ -278,7 +317,7 @@ export default {
.subMan { .subMan {
width: 49.2%; width: 49.2%;
height: 16.4%; height: 20.4%;
background: #fafafa; background: #fafafa;
border: 1px solid #f5edeb; border: 1px solid #f5edeb;
border-radius: 10px; border-radius: 10px;
@ -293,8 +332,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.leftAvatar { .leftAvatar {
height: 55px; min-height: 100%;
width: 55px; width: 77px;
background-size: 100% 100%; background-size: 100% 100%;
border-radius: 10px; border-radius: 10px;
} }
@ -304,8 +343,11 @@ export default {
font-family: "Alibaba-PuHuiTi-Medium.otf"; font-family: "Alibaba-PuHuiTi-Medium.otf";
color: #4c4949; color: #4c4949;
font-size: 18px; font-size: 18px;
margin-bottom: 12px; margin-bottom: 5px;
} }
& > div:nth-of-type(2) {
margin-bottom: -10px;
}
} }
} }
.rightSub { .rightSub {

@ -31,17 +31,13 @@
</div> </div>
<div class="itemE"> <div class="itemE">
<div>活动标签:</div> <div>活动标签:</div>
<div class="mainTag"> <div class="mainTag mainTag-label">
<div v-if="detailData.ageRange != ''"> <div
{{ detailData.ageRange }} v-for="(item, index) in detailDatalist"
</div> :key="index"
<div> v-show="item != ''"
{{ >
detailData.sexRange == "" ? "男女不限" : detailData.sexRange {{ item }}
}}
</div>
<div v-if="detailData.educationRange != ''">
{{ detailData.educationRange }}
</div> </div>
</div> </div>
</div> </div>
@ -75,12 +71,12 @@
<div class="leftName"> <div class="leftName">
<div>{{ item.id }}</div> <div>{{ item.id }}</div>
<div class="mainTag"> <div class="mainTag">
<div v-if="item.ageRange != ''">{{ item.ageRange }}</div> <div
<div v-if="item.sexRange != ''"> v-show="item != ''"
{{ item.sexRange }} v-for="(item, index) in item.arrlist"
</div> :key="index"
<div v-if="item.educationRange != ''"> >
{{ item.educationRange }} {{ item }}
</div> </div>
</div> </div>
</div> </div>
@ -130,10 +126,12 @@
<div class="leftName"> <div class="leftName">
<div>周爱</div> <div>周爱</div>
<div class="mainTag"> <div class="mainTag">
<div v-if="item.ageRange != ''">{{ item.ageRange }}</div> <div
<div v-if="item.sexRange != ''">{{ item.sexRange }}</div> v-show="item != ''"
<div v-if="item.educationRange != ''"> v-for="(item, index) in item.arrlist"
{{ item.educationRange }} :key="index"
>
{{ item }}
</div> </div>
</div> </div>
</div> </div>
@ -253,6 +251,7 @@ export default {
], ],
dialogVisible: false, dialogVisible: false,
detailData: {}, detailData: {},
detailDatalist: [],
load1: true, load1: true,
personList: [], personList: [],
personTotal: 0, personTotal: 0,
@ -279,6 +278,18 @@ export default {
activityId: "", activityId: "",
}, },
peopelDetail: false, peopelDetail: false,
arr: [
"ageRange",
"sexRange",
"politicalRange",
"educationRange",
"housingRange",
"industryRange",
"interestRange",
"professionalRange",
"schoolRange",
"nationalityRange",
],
}; };
}, },
props: {}, props: {},
@ -294,6 +305,7 @@ export default {
} }
} }
} }
this.detailDatalist = this.labelgenerate(this.detailData);
if (this.personParams.sexRange == "") { if (this.personParams.sexRange == "") {
this.personParams.sexRange = "男,女"; this.personParams.sexRange = "男,女";
} }
@ -303,9 +315,23 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}); });
}, },
//
labelgenerate(data = {}) {
let arrlist = [];
for (let key3 of this.arr) {
for (let key4 in data) {
if (key3 == key4) {
let a = data[key3];
arrlist.push(a);
}
}
}
return arrlist;
},
// //
closeDetail() { closeDetail() {
this.detailData = {}; this.detailData = {};
this.detailDatalist = [];
this.dialogVisible = false; this.dialogVisible = false;
}, },
getPersonData() { getPersonData() {
@ -313,6 +339,12 @@ export default {
this.load1 = true; this.load1 = true;
peopleList(this.personParams).then((res) => { peopleList(this.personParams).then((res) => {
this.personList = res.rows; this.personList = res.rows;
if (this.personList.length > 0) {
this.personList.forEach((item) => {
item.arrlist = this.labelgenerate(item);
});
}
this.personTotal = res.total; this.personTotal = res.total;
this.load1 = false; this.load1 = false;
}); });
@ -322,6 +354,11 @@ export default {
// //
canyuList(this.participationParams).then((res) => { canyuList(this.participationParams).then((res) => {
this.participationList = res.rows; this.participationList = res.rows;
if (this.participationList.length > 0) {
this.participationList.forEach((item) => {
item.arrlist = this.labelgenerate(item);
});
}
this.participationTotal = res.total; this.participationTotal = res.total;
this.load2 = false; this.load2 = false;
}); });
@ -393,10 +430,17 @@ export default {
::v-deep .titlePagin .el-pagination { ::v-deep .titlePagin .el-pagination {
padding: 0; padding: 0;
} }
.mainTag-label {
position: absolute;
width: 300px;
right: -30px;
}
.mainTag { .mainTag {
display: flex; display: flex;
flex-wrap: wrap;
font-family: "Alibaba-PuHuiTi-Regular"; font-family: "Alibaba-PuHuiTi-Regular";
& > div { & > div {
margin-bottom: 5px;
margin-right: 5px; margin-right: 5px;
background-color: rgba(248, 65, 77, 0.06); background-color: rgba(248, 65, 77, 0.06);
padding: 3px 5px; padding: 3px 5px;
@ -474,6 +518,7 @@ export default {
margin-bottom: 12px; margin-bottom: 12px;
.itemE { .itemE {
position: relative;
width: 50%; width: 50%;
display: flex; display: flex;
& > div:nth-of-type(1) { & > div:nth-of-type(1) {
@ -496,8 +541,11 @@ export default {
width: 12%; width: 12%;
} }
& > div:nth-of-type(2) { & > div:nth-of-type(2) {
width: 88%; width: 50%;
color: #606266; color: #606266;
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 溢出显示省略号 */
} }
} }
.noneStyle { .noneStyle {
@ -512,12 +560,12 @@ export default {
} }
.mainPeople { .mainPeople {
overflow: auto; overflow: auto;
height: 200px; // height: 200px;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 12px; margin-bottom: 12px;
.subMan { .subMan {
width: 100%; width: 100%;
height: 95px; min-height: 95px;
background: #fafafa; background: #fafafa;
border: 1px solid #f5edeb; border: 1px solid #f5edeb;
border-radius: 10px; border-radius: 10px;
@ -532,18 +580,23 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.leftAvatar { .leftAvatar {
height: 65px; width: 20%;
width: 65px; min-height: 95px;
background-size: 100% 100%; background-size: 100% 100%;
border-radius: 10px; border-radius: 10px;
} }
.leftName { .leftName {
width: 80%;
margin-left: 15px; margin-left: 15px;
& > div:nth-of-type(1) { & > div:nth-of-type(1) {
font-family: "Alibaba-PuHuiTi-Medium.otf"; font-family: "Alibaba-PuHuiTi-Medium.otf";
color: #4c4949; color: #4c4949;
font-size: 18px; font-size: 18px;
margin-bottom: 18px; margin-bottom: 10px;
}
& > div:nth-of-type(2) {
margin-bottom: -15px;
} }
} }
} }
@ -603,4 +656,4 @@ export default {
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: #f4f1f1; background: #f4f1f1;
} }
</style> </style>

@ -0,0 +1,402 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="字典名称" prop="dictType">
<el-select v-model="queryParams.dictType">
<el-option
v-for="item in typeOptions"
:key="item.dictId"
:label="item.dictName"
:value="item.dictType"
/>
</el-select>
</el-form-item>
<el-form-item label="字典标签" prop="dictLabel">
<el-input
v-model="queryParams.dictLabel"
placeholder="请输入字典标签"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="数据状态" clearable>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>新增</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-close"
size="mini"
@click="handleClose"
>关闭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel">
<template slot-scope="scope">
<span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
</template>
</el-table-column>
<el-table-column label="字典键值" align="center" prop="dictValue" />
<el-table-column label="字典排序" align="center" prop="dictSort" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']"
>删除</el-button> -->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" />
</el-form-item>
<el-form-item label="数据标签" prop="dictLabel">
<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
</el-form-item>
<el-form-item label="数据键值" prop="dictValue">
<el-input v-model="form.dictValue" placeholder="请输入数据键值" />
</el-form-item>
<el-form-item label="样式属性" prop="cssClass">
<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
</el-form-item>
<el-form-item label="显示排序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="回显样式" prop="listClass">
<el-select v-model="form.listClass">
<el-option
v-for="item in listClassOptions"
:key="item.value"
:label="item.label + '(' + item.value + ')'"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
export default {
name: "Data",
dicts: ['sys_normal_disable'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dataList: [],
//
defaultDictType: "",
//
title: "",
//
open: false,
//
listClassOptions: [
{
value: "default",
label: "默认"
},
{
value: "primary",
label: "主要"
},
{
value: "success",
label: "成功"
},
{
value: "info",
label: "信息"
},
{
value: "warning",
label: "警告"
},
{
value: "danger",
label: "危险"
}
],
//
typeOptions: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
},
//
form: {},
//
rules: {
dictLabel: [
{ required: true, message: "数据标签不能为空", trigger: "blur" }
],
dictValue: [
{ required: true, message: "数据键值不能为空", trigger: "blur" }
],
dictSort: [
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
]
}
};
},
created() {
const dictId = this.$route.params && this.$route.params.dictId;
this.getType(dictId);
this.getTypeList();
},
methods: {
/** 查询字典类型详细 */
getType(dictId) {
getType(dictId).then(response => {
this.queryParams.dictType = response.data.dictType;
this.defaultDictType = response.data.dictType;
this.getList();
});
},
/** 查询字典类型列表 */
getTypeList() {
getDictOptionselect().then(response => {
this.typeOptions = response.data;
});
},
/** 查询字典数据列表 */
getList() {
this.loading = true;
listData(this.queryParams).then(response => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
dictCode: undefined,
dictLabel: undefined,
dictValue: undefined,
cssClass: undefined,
listClass: 'default',
dictSort: 0,
status: "0",
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 返回按钮操作 */
handleClose() {
const obj = { path: "/volunteer/zyzsjgl/zdgl" };
this.$tab.closeOpenPage(obj);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.dictType = this.defaultDictType;
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加字典数据";
this.form.dictType = this.queryParams.dictType;
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictCode)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictCode = row.dictCode || this.ids
getData(dictCode).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改字典数据";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictCode != undefined) {
updateData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const dictCodes = row.dictCode || this.ids;
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
return delData(dictCodes);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/data/export', {
...this.queryParams
}, `data_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -52,7 +52,7 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
@ -61,8 +61,8 @@
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:dict:add']" v-hasPermi="['system:dict:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -93,7 +93,7 @@
@click="handleExport" @click="handleExport"
v-hasPermi="['system:dict:export']" v-hasPermi="['system:dict:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
@ -113,7 +113,7 @@
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" /> <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true"> <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type"> <router-link :to="'/volunteer/zyzsjgl/zdgl/' + scope.row.dictId" class="link-type">
<span>{{ scope.row.dictType }}</span> <span>{{ scope.row.dictType }}</span>
</router-link> </router-link>
</template> </template>
@ -138,13 +138,13 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']" v-hasPermi="['system:dict:edit']"
>修改</el-button> >修改</el-button>
<el-button <!-- <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']" v-hasPermi="['system:dict:remove']"
>删除</el-button> >删除</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -189,10 +189,11 @@
<script> <script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import delgdata from "./data.vue"
export default { export default {
name: "Dict", name: "Dict",
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
components:{delgdata},
data() { data() {
return { return {
// //

Loading…
Cancel
Save