目录代码整合
This commit is contained in:
592
packages/party/AppMeetingChinaunion/AppMeetingChinaunion.vue
Normal file
592
packages/party/AppMeetingChinaunion/AppMeetingChinaunion.vue
Normal file
@@ -0,0 +1,592 @@
|
||||
<template>
|
||||
<section class="AppMeetingChinaunion">
|
||||
<ai-list v-if="showList">
|
||||
<ai-title title="三会一课" isShowBottomBorder slot="title">
|
||||
<template #rightBtn>
|
||||
<ai-party :instance="instance" v-model="partyId" :topOrgId="topOrgId" :name.sync="partyOrgLabel"
|
||||
style="display:inline-block" @origin="changeParty" customClicker
|
||||
url="/app/partyOrganization/queryAllChildren">
|
||||
<el-input size="small" v-model="partyOrgLabel" readonly placeholder="选择党组织">
|
||||
<el-row slot="append" type="flex" class="partyPicker">
|
||||
<i class="iconfont icondangyuan"/>
|
||||
<div v-text="`切换党组织`"/>
|
||||
</el-row>
|
||||
</el-input>
|
||||
</ai-party>
|
||||
<el-button icon="iconfont iconNav_DataCenter" size="small" type="primary" @click="showStatistics()">会议统计
|
||||
</el-button>
|
||||
<!-- <el-button icon="iconfont iconSetting" size="small" type="primary" @click="toMeetSet()">设置</el-button> -->
|
||||
</template>
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-select size="small" v-model="search.meetingClassification" placeholder="会议分类"
|
||||
@change="$forceUpdate(),page.current=1,getAppThreeMeetingInfo()" clearable>
|
||||
<el-option v-for="(op,j) in dict.getDict('meetingClassification')" :key="j" :label="op.dictName"
|
||||
:value="op.dictValue"/>
|
||||
</el-select>
|
||||
<el-select size="small" v-model="search.postStatus" placeholder="发布状态"
|
||||
@change="$forceUpdate(),page.current=1,getAppThreeMeetingInfo()" clearable>
|
||||
<el-option v-for="(op,j) in dict.getDict('postStatus')" :key="j" :label="op.dictName"
|
||||
:value="op.dictValue"/>
|
||||
</el-select>
|
||||
<ai-search label="学习日期">
|
||||
<el-date-picker size="small" placeholder="请选择" type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 258px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="stuTime"
|
||||
@change="page.current=1,getAppThreeMeetingInfo()"/>
|
||||
</ai-search>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" v-model="search.meetingAgenda" placeholder="会议标题/创建人"
|
||||
suffix-icon="iconfont iconSearch" v-throttle="() => {page.current = 1, getAppThreeMeetingInfo()}" clearable @clear="search.meetingAgenda = '', page.current=1,getAppThreeMeetingInfo()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" v-if="$permissions('app_appthreemeetinginfo_edit')"
|
||||
@click="add">添加
|
||||
</el-button>
|
||||
<!-- <el-button icon="iconfont iconAdd" v-if="$permissions('app_appthreemeetinginfo_makeup')"
|
||||
@click="supplement">补录
|
||||
</el-button> -->
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<el-table ref="multipleTable" :data="tableData" style="margin-top:16px;"
|
||||
header-cell-class-name="table-header"
|
||||
tooltip-effect="dark" row-class-name="table-row" cell-class-name="table-cell">
|
||||
<el-table-column prop="meetingAgenda" label="会议名称" show-overflow-tooltip align="center">
|
||||
<div slot-scope="{row}">
|
||||
{{ row.meetingAgenda || "-" }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="meetingClassification" label="会议分类" align="center" show-overflow-tooltip>
|
||||
<div slot-scope="{row}" v-if="row.meetingClassification.length">
|
||||
<span v-for="(i,index) in dict.getDict('meetingClassification')" :key="index">
|
||||
<span v-for="(b,indexs) in row.meetingClassification" :key="indexs" v-if="i.dictValue == b">
|
||||
{{ i.dictName }}
|
||||
<span v-if="indexs < (row.meetingClassification.length - 1) ">,</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="organizationName" label="所属组织" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip effect="light" placement="top" content="请进入详情查看更多组织"
|
||||
v-if="scope.row.organizationName.length > 1">
|
||||
<span>{{ scope.row.organizationName[0] }}...</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ scope.row.organizationName[0] || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间" align="center">
|
||||
<div slot-scope="{row}"> {{ row.startTime || '-' }}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间" align="center">
|
||||
<div slot-scope="{row}">
|
||||
{{ row.endTime || '-' }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createUserName" label="创建人" align="center">
|
||||
<div slot-scope="{row}">
|
||||
{{ row.createUserName || "-" }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="postStatus" label="发布状态" align="center">
|
||||
<div slot-scope="{row}" :style="{color:color[row.postStatus]}">
|
||||
{{ dict.getLabel('postStatus', row.postStatus) || '-' }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作" align="center" width="160px" fixed="right">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" title="编辑" @click="gotoDetail(row)" v-if="row.postStatus=='0'">编辑</el-button>
|
||||
<el-button type="text" title="详情" @click="gotoDetail(row)" v-else>详情</el-button>
|
||||
<el-button type="text" title="删除" @click="delMeeting(row)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div slot="empty" class="no-data" style="height:160px;"/>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<el-pagination background
|
||||
:current-page="page.current"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
layout="total,prev, pager, next,sizes, jumper"
|
||||
:total="page.total"/>
|
||||
</div>
|
||||
</template>
|
||||
</ai-list>
|
||||
<div v-if="!$permissions('app_appthreemeetinginfo_detail')" class="no-permission"
|
||||
style="display: flex;flex-direction:column;align-items: center;justify-content: center;height: calc(100% - 148px);font-size: 14px;">
|
||||
<div style="height: 170px;"></div>
|
||||
<p>暂无使用该应用的权限</p>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogTableVisible" title="会议数据统计" width="520px" class="mask label-110"
|
||||
:close-on-click-modal='false'>
|
||||
<div class="content input-240">
|
||||
<div class="flex">
|
||||
<el-date-picker
|
||||
v-model="searchYear"
|
||||
type="year"
|
||||
size="small"
|
||||
style="width: 200px; margin-right: 10px;"
|
||||
value-format="yyyy"
|
||||
@change="getMeetStatistics"
|
||||
placeholder="选择年份">
|
||||
</el-date-picker>
|
||||
<el-select style="width: 200px" v-model="searchMonth" placeholder="全部" size="small" clearable
|
||||
class="timeSelect"
|
||||
@change="getMeetStatistics">
|
||||
<el-option v-for="(op,j) in dict.getDict('monthList')" :key="j" :label="op.dictName"
|
||||
:value="op.dictValue"/>
|
||||
</el-select>
|
||||
</div>
|
||||
<ul class="totalTitle">
|
||||
<li v-for="(item,index) in totalTitleList" :key="index">
|
||||
<span>{{ item.num }}</span>
|
||||
<span>{{ item.title }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<el-row type="flex" justify="space-between" style="margin-top: 40px;">
|
||||
<el-col style="width: 160px;height: 160px;">
|
||||
<pieChart :chart-data="pieChart" :colorList="colorList"></pieChart>
|
||||
</el-col>
|
||||
<el-col class="pieList">
|
||||
<ul>
|
||||
<li v-for="(item,index) in pieData.dataStatistics" :key="index">
|
||||
<div class="colorWrap">
|
||||
<div :style="{background:colorList[index]}"></div>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<span class="num">{{ item.v1 }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<el-button class="delete-btn" @click="dialogTableVisible = false" size="mini">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<appThreeMeetingUser :instance="instance" :dict="dict" v-if="showMeetingUser" :meetingId="meetingId"
|
||||
:meetingStatus="meetingStatus"
|
||||
:detail="detail"/>
|
||||
<add :instance="instance" :dict="dict" :detail="detail" v-if="showAdd"/>
|
||||
<meetingDetail :instance="instance" :dict="dict" :detail="detail" v-if="showDetail"/>
|
||||
<meetingSet :instance="instance" :dict="dict" :partyId="partyId" :partyName="search.partyName"
|
||||
v-if="showSet"/>
|
||||
<supplement :instance="instance" :dict="dict" v-if="showSupplement"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import moment from "dayjs";
|
||||
import appThreeMeetingUser from "./components/appThreeMeetingUser";
|
||||
import meetingSet from "./components/meetingSet";
|
||||
import supplement from "./components/supplement";
|
||||
import pieChart from "./components/pieChart";
|
||||
import add from "./components/add";
|
||||
import meetingDetail from "./components/meetingDetail";
|
||||
|
||||
export default {
|
||||
name: "AppMeetingChinaunion",
|
||||
label: "三会一课",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
components: {appThreeMeetingUser, meetingSet, supplement, pieChart, add, meetingDetail},
|
||||
data() {
|
||||
return {
|
||||
searchTime: '',
|
||||
tableData: [],
|
||||
search: {
|
||||
meetingAgenda: "",
|
||||
meetingClassification: "",
|
||||
postStatus: "",
|
||||
partyName: "",
|
||||
searchParamYM: '',
|
||||
},
|
||||
partyId: '',
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
},
|
||||
detail: {},
|
||||
showSet: false, //设置
|
||||
showMeetingUser: false, //统计
|
||||
showSupplement: false, //补录
|
||||
showDetail: false, //详情
|
||||
showAdd: false, //添加
|
||||
showList: true, //列表
|
||||
meetingId: "",//会议id
|
||||
meetingStatus: '', //会议状态
|
||||
partyType: '', //2表示支部可进支部党组织设置
|
||||
dialogTableVisible: false,
|
||||
topOrgId: '',
|
||||
stuTime: "",
|
||||
searchMonth: "",
|
||||
searchYear: String(new Date().getFullYear()),
|
||||
colorList: ["#FF4466", "#37A62B", "#4B87FE", "#FFAA44"],
|
||||
totalTitleList: [],
|
||||
pieData: {},
|
||||
pieChart: [],
|
||||
partyOrgLabel: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.detail = {};
|
||||
this.showList = false;
|
||||
this.showAdd = true;
|
||||
},
|
||||
supplement() {
|
||||
this.showList = false;
|
||||
this.showSupplement = true;
|
||||
},
|
||||
showStatistics() {
|
||||
if (this.partyType != '2') {
|
||||
return this.$message.error("所属组织不是支部党组织");
|
||||
}
|
||||
this.dialogTableVisible = true
|
||||
this.getMeetStatistics();
|
||||
},
|
||||
/**
|
||||
* 获取统计
|
||||
* */
|
||||
getMeetStatistics() {
|
||||
this.instance.post(`/app/appthreemeetinginfo/statistics-branch-Per-month?month=${this.searchMonth}&year=${this.searchYear || ''}&partyOrgId=${this.partyId}`).then(res => {
|
||||
if (res && res.data) {
|
||||
const {type0, type1, type2, type3, total} = res.data;
|
||||
let chartData = [];
|
||||
this.totalTitleList = [
|
||||
{title: "共计会议", num: total},
|
||||
{title: "支部党员大会", num: type0},
|
||||
{title: "支部委员会", num: type1},
|
||||
{title: "党小组会", num: type2},
|
||||
{title: "党课", num: type3}
|
||||
]
|
||||
res.data.dataStatistics.map(e => {
|
||||
chartData.push({value: e.v1, name: e.name})
|
||||
})
|
||||
this.pieChart = chartData;
|
||||
this.pieData = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 切换党组织
|
||||
* @param e
|
||||
*/
|
||||
changeParty(e) {
|
||||
if (!e.length) return
|
||||
this.partyType = e[0].partyType
|
||||
this.page.current = 1
|
||||
this.search.partyName = e[0].name
|
||||
this.getAppThreeMeetingInfo()
|
||||
},
|
||||
delMeeting(item) {
|
||||
this.$confirm(`是否要删除会议?`, {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/appthreemeetinginfo/delete?ids=${item.id}`, null, {}).then(res => {
|
||||
if (res && res.code == 0) {
|
||||
this.$message.success("删除成功!")
|
||||
this.getAppThreeMeetingInfo()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//分页
|
||||
handleCurrentChange(val) {
|
||||
this.page.current = val;
|
||||
this.getAppThreeMeetingInfo();
|
||||
},
|
||||
//分页
|
||||
handleSizeChange(val) {
|
||||
this.page.size = val
|
||||
this.page.current = 1
|
||||
this.getAppThreeMeetingInfo()
|
||||
},
|
||||
|
||||
//重置
|
||||
resetSearch() {
|
||||
this.page.current = 1
|
||||
this.page.size = 10
|
||||
this.searchTime = ''
|
||||
this.stuTime = ""
|
||||
this.search.meetingClassification = "";
|
||||
this.search.postStatus = "";
|
||||
this.search.meetingAgenda = "";
|
||||
this.$nextTick(() => {
|
||||
this.getAppThreeMeetingInfo()
|
||||
})
|
||||
},
|
||||
//列表
|
||||
getAppThreeMeetingInfo() {
|
||||
const date = this.stuTime ? {
|
||||
startTimeStart: this.stuTime[0],
|
||||
startTimeEnd: this.stuTime[1]
|
||||
} : {}
|
||||
this.instance.post("/app/appthreemeetinginfo/list", null, {
|
||||
params: {
|
||||
...this.search,
|
||||
...this.page,
|
||||
...date,
|
||||
organizationId: this.partyId,
|
||||
}
|
||||
}).then(res => {
|
||||
if (res && res.code == 0) {
|
||||
if (res.data.records.length) {
|
||||
res.data.records.map((item) => {
|
||||
item.organizationName = item.organizationName.split('/')
|
||||
})
|
||||
}
|
||||
this.tableData = res.data.records;
|
||||
this.page.total = res.data.total;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//返回
|
||||
goBack() {
|
||||
this.showSet = false;
|
||||
this.showMeetingUser = false;
|
||||
this.showSupplement = false;
|
||||
this.showDetail = false;
|
||||
this.showAdd = false;
|
||||
this.showList = true;
|
||||
this.getAppThreeMeetingInfo()
|
||||
},
|
||||
//跳转详请
|
||||
gotoDetail(row) {
|
||||
if (row.postStatus == '0') {
|
||||
this.detail = row;
|
||||
this.$nextTick(() => {
|
||||
this.showSet = false;
|
||||
this.showList = false;
|
||||
this.showDetail = false;
|
||||
this.showAdd = true;
|
||||
})
|
||||
} else {
|
||||
this.detail = row;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.showSet = false;
|
||||
this.showList = false;
|
||||
this.showDetail = true;
|
||||
})
|
||||
}
|
||||
// this.detail = row;
|
||||
// this.showList = false;
|
||||
// this.showDetail = true;
|
||||
},
|
||||
/**
|
||||
* 设置
|
||||
* @returns {ElMessageComponent}
|
||||
*/
|
||||
toMeetSet() {
|
||||
if (this.partyType != '2') {
|
||||
return this.$message.error("所属组织不是支部党组织");
|
||||
}
|
||||
this.showList = false;
|
||||
this.showDetail = false
|
||||
this.showSet = true;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.topOrgId = this.user.info.organizationId;
|
||||
this.partyId = this.user.info.organizationId;
|
||||
this.search.partyName = this.user.info.organizationName;
|
||||
this.dict.load('meetingClassification', 'monthList', "meetingChangeYear", "postStatus").then(() => this.resetSearch());
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
color() {
|
||||
return ["#A722FF", "#FF8822", "#2266FF", "#999999"]
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
formatTime(time) {
|
||||
return moment(time).format("YYYY-MM-DD HH:mm");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.AppMeetingChinaunion {
|
||||
height: 100%;
|
||||
|
||||
::v-deep .ai-partyorg {
|
||||
.el-dialog__header, .el-dialog__footer {
|
||||
line-height: 1 !important;
|
||||
}
|
||||
|
||||
.el-input-group__append {
|
||||
background: rgba(245, 245, 245, 1);
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.partyPicker {
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.pieList {
|
||||
width: 215px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 30px;
|
||||
|
||||
ul {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.colorWrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
div {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
line-height: 20px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
::v-deep .el-button [class*=iconfont] + span {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.timeSelect {
|
||||
.el-input__inner {
|
||||
width: 120px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.operation {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
display: flex;
|
||||
z-index: 1000;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f3f6f9;
|
||||
box-shadow: inset 0 1px 0 0 #eeeeee;
|
||||
|
||||
button {
|
||||
width: 92px;
|
||||
height: 32px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.mask {
|
||||
.content {
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
border: 1px solid #D8E0E8;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 28px;
|
||||
text-align: right;
|
||||
width: 88px;
|
||||
float: right;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.el-dialog__header {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table thead.is-group th {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.totalTitle {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid rgb(238, 238, 238);
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
span:nth-child(1) {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #E03416;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
1006
packages/party/AppMeetingChinaunion/components/add.vue
Normal file
1006
packages/party/AppMeetingChinaunion/components/add.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,452 @@
|
||||
<!--suppress ALL -->
|
||||
<template>
|
||||
<section class="appThreeMeetingUser init-list-table bg369">
|
||||
<ai-title title="统计详情" isShowBack @onBackClick="$parent.goBack()" isShowBottomBorder></ai-title>
|
||||
<div class="main-content">
|
||||
<el-row class="searchBar border-radius2" type="flex" justify="space-between" :style="search.style" :gutter="2" style="border-bottom: 1px solid #eee;">
|
||||
<el-col style="margin-bottom:6px">
|
||||
<el-row :gutter="8" type="flex">
|
||||
<section v-for="(item,i) in columns" :key="i">
|
||||
<el-col v-if="item.type=='select'" :span="4">
|
||||
<el-select size="small" v-model="search[item.prop]" :placeholder=" item.label" @change="$forceUpdate(),page.current=1,getAppThreeMeetingUser()" clearable>
|
||||
<el-option v-for="(op,j) in dict.getDict(item.dict)" :key="j" :label="op.dictName"
|
||||
:value="op.dictValue"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col v-else-if="item.type=='time'" :span="8" type="flex">
|
||||
<span class="dateTitle">{{item.label}}</span>
|
||||
<el-date-picker size="small" v-model="search[item.prop]" placeholder="请选择" type="daterange"
|
||||
:start-placeholder="item.prop+'开始时间'"
|
||||
:end-placeholder="item.prop+'结束日期'"></el-date-picker>
|
||||
</el-col>
|
||||
<el-col v-else-if="item.type=='num'" :span="8" style="display: flex;" type="flex">
|
||||
<span class="dateTitle">{{item.label}}</span>
|
||||
<ai-range v-model="search[item.prop]" />
|
||||
</el-col>
|
||||
</section>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col style="width: auto;display: flex;margin-bottom:6px">
|
||||
<el-col>
|
||||
<el-input size="small" v-model="search.meetingUserName" placeholder="姓名"
|
||||
prefix-icon="iconfont iconSearch" clearable @keyup.enter.native="page.current=1,getAppThreeMeetingUser()"></el-input>
|
||||
</el-col>
|
||||
<el-button size="mini" type="primary" icon="iconfont iconSearch" style="margin-left:5px;"
|
||||
@click="page.current=1,getAppThreeMeetingUser()">查询
|
||||
</el-button>
|
||||
<el-button size="mini" icon="el-icon-refresh-right" style="margin-left:5px;" @click="resetSearch">
|
||||
重置
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table ref="multipleTable" :data="tableData" style="margin-top:16px;"
|
||||
header-cell-class-name="table-header"
|
||||
tooltip-effect="light" row-class-name="table-row" cell-class-name="table-cell" @selection-change="handleSelectionChange">
|
||||
<el-table-column prop="meetingUserName" label="姓名" align="center">
|
||||
<div slot-scope="{row}">{{row.meetingUserName || "-"}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="joinStatus" label="参会情况" align="center">
|
||||
<div slot-scope="{row}"> {{dict.getLabel('joinStatus',row.joinStatus)||'-'}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="absence" label="请假原因">
|
||||
<div slot-scope="{row}">{{row.absence || "-"}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signMethod" label="签到方式" align="center">
|
||||
<div slot-scope="{row}"> {{dict.getLabel('signMethod',row.signMethod)||'-'}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signStatus" label="签到状态" align="center">
|
||||
<div slot-scope="{row}"> {{dict.getLabel('signStatus',row.signStatus)||'-'}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signTime" label="签到时间" align="center">
|
||||
<div slot-scope="{row}">{{row.signTime || "-"}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="signUserName" label="代签人" align="center">
|
||||
<div slot-scope="{row}">{{row.signUserName || "-"}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="operate" label="操作" width="240" align="center">
|
||||
<div slot-scope="{row}">
|
||||
<span class="iconfont iconqiandao icon-color89B" style="cursor: pointer;"
|
||||
title="签到" @click="changeStatus(row, 0)" v-if="row.signMethod != 1"></span>
|
||||
<span class="iconfont iconqingjia icon-color89B" style="cursor: pointer;"
|
||||
title="请假" @click="changeStatus(row, 1)"></span>
|
||||
<span class="iconfont iconRepulse icon-color89B" style="cursor: pointer;"
|
||||
title="重置" v-if="meetingStatus != 4" @click="changeStatus(row, 2)"></span>
|
||||
</div>
|
||||
<!-- <el-radio-group slot-scope="{row}" v-model="row.operation" @change="changeStatus(row)">
|
||||
<el-radio :label="0">签到</el-radio>
|
||||
<el-radio :label="1">请假</el-radio>
|
||||
<el-radio :label="2" v-if="meetingStatus != 4">重置</el-radio>
|
||||
</el-radio-group> -->
|
||||
</el-table-column>
|
||||
<div slot="empty" class="no-data" style="height:160px;"></div>
|
||||
</el-table>
|
||||
<div class="pagination">
|
||||
<el-pagination background
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
layout="total,prev, pager, next,sizes, jumper"
|
||||
:total="page.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="leaveMask" title="请假" width="520px" class="mask label-110"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="maskInit" @close="maskInit">
|
||||
<div class="content input-240">
|
||||
<el-form ref="leaveMask" :rules="rules" :model="leaveInfo" label-width="100px">
|
||||
<el-form-item label="请假原因:" class="user" prop="leaveText">
|
||||
<el-input type="textarea" :rows="3" v-model="leaveInfo.leaveText" placeholder="请输入请假原因"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<el-button class="delete-btn" @click="maskInit" mini>取消</el-button>
|
||||
<el-button type="primary" @click="confirmMask('leaveMask')" mini>确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "appThreeMeetingUser",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
meetingId:String,
|
||||
detail: Object,
|
||||
meetingStatus: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
tableData: [],
|
||||
columns: [
|
||||
{
|
||||
label: '编号',
|
||||
prop: 'id',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '会议编号',
|
||||
prop: 'meetingId',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '参会人员角色',
|
||||
prop: 'meetingUserRole',
|
||||
type: '',
|
||||
dict: 'meetingUserRole'
|
||||
},
|
||||
{
|
||||
label: '会议人员编号',
|
||||
prop: 'meetingUserId',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '会议人员姓名',
|
||||
prop: 'meetingUserName',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '参会情况',
|
||||
prop: 'joinStatus',
|
||||
type: 'select',
|
||||
dict: 'joinStatus'
|
||||
},
|
||||
{
|
||||
label: '签到状态',
|
||||
prop: 'signStatus',
|
||||
type: 'select',
|
||||
dict: 'signStatus'
|
||||
},
|
||||
{
|
||||
label: '签到方式',
|
||||
prop: 'signMethod',
|
||||
type: 'select',
|
||||
dict: 'signMethod'
|
||||
},
|
||||
{
|
||||
label: '请假原因',
|
||||
prop: 'absence',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createDate',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '签到人',
|
||||
prop: 'signUserId',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '签到时间',
|
||||
prop: 'signTime',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
{
|
||||
label: '操作',
|
||||
prop: 'operate',
|
||||
type: '',
|
||||
dict: ''
|
||||
},
|
||||
],
|
||||
search: {
|
||||
style: {},
|
||||
meetingUserName: "",
|
||||
meetingId:""
|
||||
},
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
},
|
||||
leaveMask: false,
|
||||
leaveInfo: {
|
||||
leaveText: ''
|
||||
},
|
||||
rules: {
|
||||
leaveText: [{ required: true, message: '请输入请假原因', trigger: 'blur' }]
|
||||
},
|
||||
meetingInfo: {}, //点击操作的item
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirmMask(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.signMeeting(0, 1, '', this.leaveInfo.leaveText, this.user.info.id, this.user.info.name, '', '请假成功')
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
maskInit() {
|
||||
this.leaveMask = false
|
||||
},
|
||||
changeStatus(item, operation) {
|
||||
this.meetingInfo = item
|
||||
if(this.meetingStatus == 0) { //0未发布 1已发布 2已取消 3进行中 4已结束
|
||||
this.$message({ message: '会议未发布,请发布后再操作', type: 'warning'});
|
||||
return
|
||||
}
|
||||
if(item.meetingSignMethod == 1) { //签到方式为不签到
|
||||
this.$message({ message: '签到方式选择为不签到,不可操作', type: 'warning'});
|
||||
return
|
||||
}
|
||||
if(this.meetingStatus == 1) {
|
||||
let d = new Date()
|
||||
let time = item.meetingBefore
|
||||
let beginTimestamp = new Date(time.replace(/\-/g, "\/"))
|
||||
let newTimestamp = new Date(d.getFullYear() + '/' + (d.getMonth() + 1) + '/' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes())
|
||||
if (newTimestamp < beginTimestamp) {
|
||||
this.$message({ message: '未到签到时间,不可操作', type: 'warning'});
|
||||
return
|
||||
}
|
||||
}
|
||||
if(this.meetingStatus == 2) {
|
||||
this.$message({ message: '会议已取消,不可操作', type: 'warning'});
|
||||
return
|
||||
}
|
||||
|
||||
// if(this.meetingStatus == 3) {
|
||||
// let d = new Date()
|
||||
// let time = item.meetingAfter
|
||||
// let endTimestamp = new Date(time.replace(/\-/g, "\/"))
|
||||
// let newTimestamp = new Date(d.getFullYear() + '/' + (d.getMonth() + 1) + '/' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes())
|
||||
// if (endTimestamp > newTimestamp) { //代签
|
||||
// this.operationStatus(operation)
|
||||
// }
|
||||
// }
|
||||
|
||||
if(!operation) { //0为签到
|
||||
this.$confirm('确定签到吗?', '', {
|
||||
type: 'info'
|
||||
}).then(() => {
|
||||
this.operationStatus(operation)
|
||||
}).catch(() => {
|
||||
return
|
||||
});
|
||||
}else {
|
||||
this.operationStatus(operation)
|
||||
}
|
||||
},
|
||||
operationStatus(status) {
|
||||
if(status == 0) { //签到
|
||||
let signTime = new Date().getFullYear() + '-' + this.isDate(new Date().getMonth() + 1) + '-' + this.isDate(new Date().getDate()) + ' ' + this.isDate(new Date().getHours()) + ':' + this.isDate(new Date().getMinutes()) + ':' + this.isDate(new Date().getSeconds())
|
||||
this.signMeeting(1, 0, 1, '', this.user.info.id, this.user.info.name, signTime, '签到成功')
|
||||
}
|
||||
if(status == 1) { //请假
|
||||
this.leaveMask = true
|
||||
this.leaveInfo.leaveText = ''
|
||||
}
|
||||
if(status == 2) { //重置
|
||||
this.$confirm(`确认将该成员签到状态重置吗?`, {type: 'warning'}).then(() => {
|
||||
this.signMeeting('', '', '', '', '', '', '', '重置成功')
|
||||
})
|
||||
}
|
||||
},
|
||||
isDate(num) {
|
||||
if(num < 10) {
|
||||
num = '0' + num
|
||||
}
|
||||
return num
|
||||
},
|
||||
signMeeting(signStatus, joinStatus, signMethod, absence, signUserId, signUserName, signTime, succText) {
|
||||
var params = {
|
||||
signStatus,
|
||||
joinStatus,
|
||||
signMethod,
|
||||
absence,
|
||||
signUserId,
|
||||
signUserName,
|
||||
signTime,
|
||||
id: this.meetingInfo.id,
|
||||
meetingUserId: this.meetingInfo.meetingUserId,
|
||||
meetingId: this.meetingInfo.meetingId
|
||||
}
|
||||
this.instance.post("/app/appthreemeetinguser/addOrUpdate", params).then(res => {
|
||||
if(res.code==0){
|
||||
this.maskInit()
|
||||
this.$message.success(succText)
|
||||
this.getAppThreeMeetingUser()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
isPermit(params) {
|
||||
return this.permissions ? this.permissions(params) : false
|
||||
},
|
||||
handleSelectionChange(){},
|
||||
//分页
|
||||
handleCurrentChange(val) {
|
||||
this.page.current = val;
|
||||
this.getAppThreeMeetingUser();
|
||||
},
|
||||
//分页
|
||||
handleSizeChange(val){
|
||||
this.page.size = val
|
||||
this.page.current = 1
|
||||
this.getAppThreeMeetingUser()
|
||||
},
|
||||
//重置
|
||||
resetSearch() {
|
||||
this.page.current = 1
|
||||
this.page.size = 10
|
||||
this.columns.map(c => {if(c.type) this.search[c.prop] = null})
|
||||
Object.keys(this.search).forEach((e)=>{
|
||||
this.search[e]=null;
|
||||
})
|
||||
this.getAppThreeMeetingUser()
|
||||
},
|
||||
//列表
|
||||
getAppThreeMeetingUser() {
|
||||
var meetingId = this.meetingId
|
||||
this.instance.post("/app/appthreemeetinguser/list", null, {
|
||||
params: {
|
||||
...this.search,
|
||||
...this.page,
|
||||
meetingId
|
||||
}
|
||||
}).then(res => {
|
||||
if(res.code==0){
|
||||
this.tableData=res.data.records;
|
||||
this.page.total=res.data.total;
|
||||
this.tableData.map((item) => {
|
||||
if(item.signStatus == 1) { //签到
|
||||
item.operation = 0
|
||||
}
|
||||
if(item.joinStatus == 1) { //请假
|
||||
item.operation = 1
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
//请假,签到,取消代签
|
||||
updateStatus(row,text){
|
||||
var body = {};
|
||||
if(text == '请假'){
|
||||
body = {
|
||||
id:row.id,
|
||||
joinStatus:'1'
|
||||
}
|
||||
}
|
||||
if(text == '签到'){
|
||||
body = {
|
||||
id:row.id,
|
||||
signStatus:'1'
|
||||
}
|
||||
}
|
||||
if(text == '取消代签'){
|
||||
body = {
|
||||
id:row.id,
|
||||
signStatus:'0'
|
||||
}
|
||||
}
|
||||
console.log(body)
|
||||
this.$confirm(`是否${text}?`, {type: 'warning'}).then(() => {
|
||||
this.instance.post("/app/appthreemeetinguser/addOrUpdate", body).then((res) => {
|
||||
if(res.code ==0){
|
||||
this.maskInit()
|
||||
this.getAppThreeMeetingUser()
|
||||
this.$message.success(`操作成功!`)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
if (this.dict) this.dict.load(this.columns.map(e => e.type == 'select' ? e.dict : ''))
|
||||
// console.log(this.detail)
|
||||
this.resetSearch()
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.appThreeMeetingUser{
|
||||
::v-deep .el-radio{
|
||||
margin-right: 16px!important;
|
||||
}
|
||||
::v-deep .el-radio__label{
|
||||
padding-left: 4px!important;
|
||||
}
|
||||
.operation {
|
||||
overflow: hidden;
|
||||
// position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f3f6f9;
|
||||
box-shadow: inset 0 1px 0 0 #eeeeee;
|
||||
}
|
||||
::v-deep .el-textarea{
|
||||
width: 362px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
718
packages/party/AppMeetingChinaunion/components/meetingDetail.vue
Normal file
718
packages/party/AppMeetingChinaunion/components/meetingDetail.vue
Normal file
@@ -0,0 +1,718 @@
|
||||
<template>
|
||||
<div class="addThreeMeeting">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="三会一课详请" isShowBack @onBackClick="$parent.goBack()" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-card title="会议详情">
|
||||
<template #content>
|
||||
<el-form size="small" label-suffix=":" label-width="100px">
|
||||
<ai-title :title="obj.meetingAgenda" isShowBottomBorder/>
|
||||
<el-form-item label="会议分类">
|
||||
<span v-for="(i,index) in dict.getDict('meetingClassification')" :key="index">
|
||||
<span v-for="(b,indexs) in obj.meetingClassification" :key="indexs"
|
||||
v-if="i.dictValue == b">
|
||||
{{ i.dictName }}
|
||||
<span v-if="indexs < (obj.meetingClassification.length - 1) ">,</span>
|
||||
</span>
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="举办方式">{{ obj.isOnline == 1 ? '线上举办' : '线下举办' }}</el-form-item>
|
||||
<el-form-item label="会议地点" v-if="obj.isOnline==0">{{ obj.meetingAddress || '-' }}</el-form-item>
|
||||
<el-form-item label="会议说明">
|
||||
<div v-html="obj.meetingDescription"/>
|
||||
</el-form-item>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-form-item label="开始时间">{{ obj.startTime || '-' }}</el-form-item>
|
||||
<el-form-item label="结束时间">{{ obj.endTime || '-' }}</el-form-item>
|
||||
</el-row>
|
||||
<el-form-item label="签到方式">{{ dict.getLabel('addSignMethod', obj.signMethod || '-') }}</el-form-item>
|
||||
<el-form-item label="签到时间">
|
||||
<span class="value" v-if="obj.signMethod == 1">
|
||||
会议开始时间前
|
||||
<span style="color:#5088FF">{{ obj.meetingBefore }}</span>
|
||||
分钟,至会议开始时间后
|
||||
<span style="color:#5088FF">{{ obj.meetingAfter }}</span> 分钟,可进行签到。
|
||||
<div>可签到时间为 <span style="color:#5088FF">({{ signStart }} ~ {{ signEnd }})</span></div>
|
||||
</span>
|
||||
<span class="value" v-else>-</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="提醒方式">
|
||||
<span class="value"
|
||||
v-if="obj.reminderMethod && obj.reminderMethod.length && obj.reminderMethod[0] !== ''">
|
||||
<span v-for="(i,index) in dict.getDict('feminderMethod')" :key="index">
|
||||
<span v-for="(b,indexs) in obj.reminderMethod" :key="indexs" v-if="i.dictValue == b">
|
||||
{{ i.dictName }}
|
||||
<span v-if="indexs < (obj.reminderMethod.length - 1) ">,</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="value" v-else>-</span></el-form-item>
|
||||
<!-- <ai-title title="附件" isShowBottomBorder>-->
|
||||
<!-- <template #rightBtn>-->
|
||||
<!-- <el-button type="text" icon="iconfont iconDownload" @click="downLoadAll">下载全部</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </ai-title>-->
|
||||
<!-- <el-form-item label-width="0">-->
|
||||
<!-- <div v-if="obj.annex.length">-->
|
||||
<!-- <div class="flie" v-for="(item, index) in obj.annex" :key="index"-->
|
||||
<!-- @click="downFile(item)">-->
|
||||
<!-- <p>-->
|
||||
<!-- <svg aria-hidden="true" style="width:24px;height:24px;">-->
|
||||
<!-- <use xlink:href="#iconAppendix_UNdownload"></use>-->
|
||||
<!-- </svg>-->
|
||||
<!-- <span>{{ item.name }}</span>-->
|
||||
<!-- </p>-->
|
||||
<!-- <span style="color:#999;">{{ (item.size / 1024).toFixed(2) + "KB" }}-->
|
||||
<!-- <span class="iconfont iconDownload" style="color:#5088FF"></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="no-data" style="height:160px;width:100%;" v-else></div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<ai-title title="人员信息" isShowBottomBorder/>
|
||||
<el-form-item label="与会组织">{{ arrLabel(obj.appThreeMeetingOrganizationList, 'name') }}</el-form-item>
|
||||
<el-form-item label="主持人">{{ arrLabel(obj.hostList, 'userName') }}</el-form-item>
|
||||
<el-form-item label="记录人">{{ arrLabel(obj.recorderList, 'userName') }}</el-form-item>
|
||||
<el-form-item label="签到负责人">{{ arrLabel(obj.chargeOfSignInList, 'userName') }}</el-form-item>
|
||||
<el-form-item label="参与人">{{ arrLabel(obj.participantList, 'userName') }}</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="会议纪要">
|
||||
<template #content>
|
||||
<el-form ref="ruleForm" size="small" label-suffix=":" label-width="120px">
|
||||
<ai-title title="会议纪要详情" isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<template v-if="editable">
|
||||
<el-button type="text" @click="cancelSummary()">取消</el-button>
|
||||
<el-button type="text" @click="confirmSummary">保存</el-button>
|
||||
</template>
|
||||
<el-button v-else type="text" icon="iconfont iconEdit" @click="editForm">修改
|
||||
</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
<el-form-item label="纪要负责人">{{ obj.recorderName || '-' }}</el-form-item>
|
||||
<el-form-item label="上次编辑时间">{{ summaryObj.createTime|formatTime }}</el-form-item>
|
||||
<template v-if="!editable">
|
||||
<el-form-item label="纪要内容">
|
||||
<div class="content" v-html="summaryObj.content ||'暂无内容'"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片">
|
||||
<span class="value" v-viewer>
|
||||
<img v-for="(item, index) in summaryObj.images" :key="index" :src="item.url"
|
||||
style="width: 84px;height:84px;margin: 0 16px 8px 0;">
|
||||
</span></el-form-item>
|
||||
</template>
|
||||
<template v-if="editable">
|
||||
<el-form-item label="纪要内容:">
|
||||
<el-input
|
||||
style="width: 90%;"
|
||||
type="textarea"
|
||||
:rows="16"
|
||||
placeholder="请输入内容"
|
||||
v-model="summaryObj.content">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片:">
|
||||
<ai-uploader :instance="instance" v-model="summaryObj.images" :limit="50"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="人员签到">
|
||||
<template #content>
|
||||
<el-form>
|
||||
<ai-title title="人员列表" isShowBottomBorder>
|
||||
<!-- <template #rightBtn v-if="obj.signMethod==1">-->
|
||||
<!-- <el-button type="text" icon="iconfont iconEwm" @click="showSignPhoto=true">获取签到码-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </template>-->
|
||||
</ai-title>
|
||||
<div class="detail-info">
|
||||
<div class="detail-left detail-info-p84">
|
||||
<ai-wrapper style="margin-top: 20px;">
|
||||
<ai-info-item label="签到负责人" isLine>
|
||||
<span class="value" v-if="obj.chargeOfSignInList && obj.chargeOfSignInList.length">
|
||||
<span v-for="(item,index) in obj.chargeOfSignInList" :key="item+index">{{ item.userName }}
|
||||
<span v-if="index < obj.chargeOfSignInList.length-1">、</span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="value" v-else>-</span>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</div>
|
||||
</div>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-select size="small" v-model="search.status" placeholder="状态" clearable @change="getSignInfo">
|
||||
<el-option v-for="(op,j) in dict.getDict('OneThreeSignStatus')" :key="j" :label="op.dictName"
|
||||
:value="op.dictValue"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="姓名" v-model="search.meetingUserName"
|
||||
prefix-icon="iconfont iconSearch" clearable @keyup.enter.native="getSignInfo"
|
||||
@clear="clear"></el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:isShowPagination="false"
|
||||
border
|
||||
@getList="getSignInfo">
|
||||
<el-table-column label="操作" slot="options" align="center" width="150">
|
||||
<template slot-scope="{row}">
|
||||
<span class="opt" @click="doSign('2',row)" v-if="row.status==0">代签</span>
|
||||
<span class="opt" style="margin-left: 16px;" @click="doSign('3',row)"
|
||||
v-if="row.status==0">请假</span>
|
||||
<span class="opt" @click="doSign('0',row)" v-if="['1','2','3'].includes(row.status)">撤消状态</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card v-if="obj.isVote == 1" title="投票统计">
|
||||
<template #content>
|
||||
<el-form>
|
||||
<ai-title title="投票统计" isShowBottomBorder/>
|
||||
<el-form-item label="投票主题">{{ obj.voteTopic }}</el-form-item>
|
||||
<el-form-item label="投票形式">{{ dict.getLabel('ThreeMeetingAnonymous', obj.anonymous) }}</el-form-item>
|
||||
<el-form-item label="截止时间">{{ obj.voteDeadline }}</el-form-item>
|
||||
<ai-echart :ops="voteOps" :data="voteStaData"/>
|
||||
<template v-if="obj.anonymous==1">
|
||||
<ai-title title="投票详情" isShowBottomBorder/>
|
||||
<ai-table :tableData="obj.participantList" :col-configs="voteConfigs" :isShowPagination="false"
|
||||
border :dict="dict" @getList="getDetailInfo"/>
|
||||
</template>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
<div class="signPhoto" v-show="showSignPhoto" @click="showSignPhoto=false"/>
|
||||
<div class="signPhotoImg" v-show="showSignPhoto" @click="showSignPhoto=false">
|
||||
<img :src="obj.signPhoto" alt="">
|
||||
<span>点击鼠标右键另存至本地</span>
|
||||
</div>
|
||||
<ai-dialog
|
||||
title="请假/代签"
|
||||
:visible.sync="dialog"
|
||||
:destroyOnClose="true"
|
||||
@onConfirm="updateState"
|
||||
width="520px">
|
||||
<el-form ref="ruleForm" label-width="90px">
|
||||
<el-form-item label="情况说明:">
|
||||
<el-input type="textarea" v-model="description" placeholder="请输入..." :rows="4"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import {mapState} from "vuex";
|
||||
import moment from 'dayjs';
|
||||
import Viewer from 'v-viewer'
|
||||
|
||||
Vue.use(Viewer)
|
||||
|
||||
export default {
|
||||
name: "meetingDetail",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
detail: Object,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
colConfigs() {
|
||||
const self = this;
|
||||
return [
|
||||
{
|
||||
prop: 'meetingUserName',
|
||||
align: 'center',
|
||||
label: '姓名',
|
||||
},
|
||||
{
|
||||
prop: 'signTime',
|
||||
align: 'center',
|
||||
label: '签到时间',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
prop: 'doUserName',
|
||||
align: 'center',
|
||||
label: '审批人/代签人'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
align: 'left',
|
||||
label: '情况说明'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
label: '状态',
|
||||
render(h, {row}) {
|
||||
return h('span', {
|
||||
style: {
|
||||
color: self.color[row.status]
|
||||
}
|
||||
}, self.$dict.getLabel('OneThreeSignStatus', row.status))
|
||||
}
|
||||
},
|
||||
{slot: 'options', label: '操作'}
|
||||
]
|
||||
},
|
||||
voteConfigs() {
|
||||
return [
|
||||
{label: "人员姓名", prop: "userName", align: 'center'},
|
||||
{label: "投票选项", prop: "myVote", formart: v => v ? (v === '1' ? '同意' : '不同意') : '-' },
|
||||
{label: "投票时间", prop: "voteTime"},
|
||||
]
|
||||
},
|
||||
voteOps() {
|
||||
return {
|
||||
legend: {
|
||||
itemWidth: 8, itemHeight: 8, itemGap: 20, orient: 'vertical',
|
||||
top: 56, left: 240, formatter: name => {
|
||||
let v1 = this.voteStaData.find(e => e['投票'] == name)?.v1 || 0
|
||||
return `{row|${name}}{v|${v1}}`
|
||||
},
|
||||
textStyle: {
|
||||
rich: {
|
||||
row: {fontSize: 14, color: '#666', width: 40},
|
||||
v: {width: 140, align: 'right'},
|
||||
}
|
||||
}
|
||||
},
|
||||
color: ['#4B87FE', '#fa4'],
|
||||
daemon: {
|
||||
center: [80, 80],
|
||||
radius: [30, 70],
|
||||
type: 'pie',
|
||||
label: {position: 'inner', formatter: '{d}%', textStyle: {color: '#fff'}},
|
||||
}
|
||||
}
|
||||
},
|
||||
voteStaData() {
|
||||
return [
|
||||
{'投票': '同意', v1: this.obj.upVote || 0},
|
||||
{'投票': '不同意', v1: this.obj.downVote || 0},
|
||||
]
|
||||
},
|
||||
color() {
|
||||
return ["#FF4466", "#2EA222", "#2266FF", "#FF8822", "#333333"]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editable: false,
|
||||
obj: {
|
||||
meetingAgenda: "",
|
||||
meetingClassification: [],
|
||||
reminderMethod: [],
|
||||
annex: [],
|
||||
appThreeMeetingOrganizationList: [],
|
||||
hostList: [],
|
||||
recorderList: [],
|
||||
chargeOfSignInList: [],
|
||||
participantList: [],
|
||||
images: []
|
||||
},
|
||||
summaryObj: {
|
||||
content: "",
|
||||
images: "",
|
||||
meetingId: "",
|
||||
},
|
||||
fileList: [],
|
||||
signStart: "",
|
||||
signEnd: "",
|
||||
areaId: "",
|
||||
dialogVisible: false,
|
||||
showConfirmBtn: false,
|
||||
tableData: [],
|
||||
search: {
|
||||
status: "",
|
||||
meetingUserName: "",
|
||||
},
|
||||
showSignPhoto: false,
|
||||
edit: false,
|
||||
sumEditDia: false,
|
||||
textarea: "",
|
||||
dialog: false,
|
||||
description: "",
|
||||
id: "",
|
||||
status: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.search.postStatus = "";
|
||||
this.search.meetingUserName = "";
|
||||
this.getSignInfo();
|
||||
},
|
||||
editAudioDia() {
|
||||
this.sumEditDia = true;
|
||||
},
|
||||
doSign(status, {id}) {
|
||||
this.status = status;
|
||||
this.id = id;
|
||||
if (status == '0') {
|
||||
this.$confirm('是否撤销当前状态?').then(() => {
|
||||
this.updateState();
|
||||
});
|
||||
} else {
|
||||
this.description = "";
|
||||
this.dialog = true;
|
||||
}
|
||||
},
|
||||
//会议签到时间计算
|
||||
countTime(total) {
|
||||
let now = new Date(total)
|
||||
let y = now.getFullYear();
|
||||
let m = now.getMonth() + 1;
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
let da = now.getDate();
|
||||
da = da < 10 ? ('0' + da) : da;
|
||||
let h = now.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
let minute = now.getMinutes();
|
||||
minute = minute < 10 ? ('0' + minute) : minute;
|
||||
let seconds = now.getSeconds();
|
||||
seconds = seconds < 10 ? ('0' + seconds) : seconds;
|
||||
return y + '-' + m + '-' + da + ' ' + h + ':' + minute + ":" + seconds;
|
||||
},
|
||||
delFile(index) {
|
||||
this.fileList.splice(index, 1);
|
||||
if (!this.showConfirmBtn && this.detail.id) {//非编辑删除文件
|
||||
this.$message.success("文件删除成功!");
|
||||
}
|
||||
},
|
||||
downFile(item) {
|
||||
window.open(item.url);
|
||||
},
|
||||
updateState() {
|
||||
this.instance.post(`/app/appthreemeetinguser/sign?id=${this.id}&status=${this.status}&description=${this.description}`).then((res) => {
|
||||
if (res?.code == 0) {
|
||||
const msg = this.status == 0 ? "撤销成功!" :
|
||||
this.status == 2 ? "代签成功!" : "请假成功!";
|
||||
this.$message.success(msg);
|
||||
this.dialog = false;
|
||||
this.getSignInfo();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//编辑取消/修改
|
||||
editForm() {
|
||||
this.editable = true;
|
||||
},
|
||||
cancelEditBtn() {
|
||||
this.editable = false;
|
||||
this.showConfirmBtn = false;
|
||||
this.getDetailInfo();
|
||||
},
|
||||
navClick(id) {
|
||||
if (id == 0) {
|
||||
this.getDetailInfo()
|
||||
} else if (id == 1) {
|
||||
this.getSummary()
|
||||
} else if (id == 2) {
|
||||
this.getSignInfo()
|
||||
}
|
||||
this.$forceUpdate()
|
||||
},
|
||||
//获取会议详请
|
||||
getDetailInfo() {
|
||||
this.detail.id&& this.instance.post(`/app/appthreemeetinginfo/queryDetailById?id=${this.detail.id}`).then(res => {
|
||||
if (res?.data) {
|
||||
res.data.annex = JSON.parse(res.data.annex);
|
||||
res.data.meetingClassification = res.data.meetingClassification.split(',');
|
||||
this.obj = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//下载全部附件
|
||||
downLoadAll() {
|
||||
this.instance.post(`/app/appthreemeetinginfo/downLoadAllFileForDetail`, null, {
|
||||
responseType: "blob",
|
||||
params: {
|
||||
id: this.detail.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.type == "application/json") {
|
||||
let reader = new FileReader(), _ = this
|
||||
reader.readAsText(res, "utf-8")
|
||||
reader.onload = e => {
|
||||
if (e.target.readyState === 2) {
|
||||
let ret = JSON.parse(e.target.result)
|
||||
_.$message.error(ret.msg)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const link = document.createElement("a");
|
||||
let blob = new Blob([res], {type: "application/vnd.ms-excel"});
|
||||
link.style.display = "none";
|
||||
link.href = URL.createObjectURL(blob);
|
||||
let num = "";
|
||||
for (let i = 0; i < 10; i++) {
|
||||
num += Math.ceil(Math.random() * 10);
|
||||
}
|
||||
link.setAttribute("download", "三会一课附件" + ".zip");
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取会议纪要信息
|
||||
getSummary() {
|
||||
this.instance.post(`/app/appthreemeetinginfoexpand/queryDetailById?id=${this.detail.id}`).then(res => {
|
||||
if (res && res.data) {
|
||||
res.data.images = JSON.parse(res.data.images);
|
||||
this.summaryObj = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取人员签到
|
||||
getSignInfo() {
|
||||
this.instance.post(`/app/appthreemeetinguser/listForSign`, null, {
|
||||
params: {
|
||||
meetingId: this.detail.id,
|
||||
...this.search,
|
||||
size: 10000
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res && res.data) {
|
||||
this.tableData = res.data.records;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancelSummary() {
|
||||
this.editable = false;
|
||||
this.getSummary();
|
||||
},
|
||||
confirmSummary() {
|
||||
let imgs = this.summaryObj.images && this.summaryObj.images.map(e => {
|
||||
return {
|
||||
url: e.url
|
||||
}
|
||||
})
|
||||
this.instance.post(`/app/appthreemeetinginfoexpand/addOrUpdate`, {
|
||||
meetingId: this.detail.id,
|
||||
content: this.summaryObj.content,
|
||||
images: JSON.stringify(imgs)
|
||||
}).then(res => {
|
||||
if (res && res.data) {
|
||||
this.$message.success("保存成功");
|
||||
this.getSummary()
|
||||
this.editable = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
arrLabel(arr, key) {
|
||||
return arr?.map(e => e?.[key] || e)?.join(" / ") || "-"
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.areaId = this.user.info.areaId;
|
||||
this.dict.load('ThreeMeetingAnonymous', 'ThreeMeetingVoteItem', "meetingClassification", "topicClassification", "feminderMethod", "addSignMethod", "postStatus", "OneThreeSignStatus").then(() => {
|
||||
this.getDetailInfo()
|
||||
this.getSignInfo()
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
obj: {
|
||||
handler(newVal) {
|
||||
if (newVal.startTime && newVal.meetingBefore) {
|
||||
let d = new Date(newVal.startTime);
|
||||
let time = d.getTime();
|
||||
let min = (Number(newVal.meetingBefore)) * 60000
|
||||
let total = time - min;
|
||||
this.signStart = this.countTime(total);
|
||||
}
|
||||
if (newVal.startTime && newVal.meetingAfter) {
|
||||
let d = new Date(newVal.startTime);
|
||||
let time = d.getTime();
|
||||
let min = (Number(newVal.meetingAfter)) * 60000
|
||||
let total = time + min;
|
||||
this.signEnd = this.countTime(total);
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
formatTime(time) {
|
||||
return time ? moment(time).format("YYYY-MM-DD HH:mm") : "-";
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.addThreeMeeting {
|
||||
height: 100%;
|
||||
|
||||
::v-deep .el-form {
|
||||
.ailist-title {
|
||||
padding: 0;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 16px;
|
||||
|
||||
.el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep.ai-detail__content--wrapper {
|
||||
.el-form {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.audio {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 16px !important;
|
||||
}
|
||||
|
||||
::v-deep .iconfont {
|
||||
color: #2266FF;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 400px;
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #D0D4DC;
|
||||
box-sizing: border-box;
|
||||
padding: 14px;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
.signPhoto {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: #000000;
|
||||
opacity: 0.2;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.signPhotoImg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin-left: calc((100% - 280px) / 2);
|
||||
margin-top: 160px;
|
||||
z-index: 200;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 320px;
|
||||
height: 320px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
line-height: 19px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.flie {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 8px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(208, 212, 220, 1);
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
|
||||
p {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.iconDelete {
|
||||
color: #8899bb;
|
||||
margin-left: 4px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.flie:hover {
|
||||
background-color: #f3f6f9;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.flie:hover .iconDelete {
|
||||
color: #ff4466;
|
||||
}
|
||||
|
||||
.tips {
|
||||
box-sizing: border-box;
|
||||
padding: 0 106px;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.opt {
|
||||
font-size: 14px;
|
||||
color: #5088FF;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wid100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
::v-deep .AiEchart {
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
314
packages/party/AppMeetingChinaunion/components/meetingSet.vue
Normal file
314
packages/party/AppMeetingChinaunion/components/meetingSet.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="三会一课设置" isShowBack @onBackClick="$parent.goBack()" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<div class="tab-tips">
|
||||
<span class="el-icon-warning"/>
|
||||
<span class="text">未按照“会议要求”开展三会一课的情况下,支部负责人主要用于接收上级领导的催办消息。</span>
|
||||
</div>
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="党组织" :value="partyName"/>
|
||||
</ai-wrapper>
|
||||
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="支部负责人">
|
||||
<template #right>
|
||||
<ai-party-member :instance="instance" v-model="peopleList"
|
||||
:action="'/app/appparty/list?partyOrgId='+partyId" @change="confirmAddUser"
|
||||
dialogTitle="添加支部负责人" customCliker>
|
||||
<el-button type="text" icon="iconfont iconAdd">添加人员</el-button>
|
||||
</ai-party-member>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-table
|
||||
:key='0'
|
||||
:data="tableDataUser"
|
||||
style="width: 100%"
|
||||
border
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="支部负责人信息为空,点击标题右侧添加按钮进行添加"
|
||||
>
|
||||
<el-table-column type="index" label="序号" align="center" width="240"></el-table-column>
|
||||
<el-table-column prop="partyName" label="姓名" align="center"></el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<div slot-scope="{row}">
|
||||
<span @click="deleteUser(row)"
|
||||
class="iconfont iconDelete icon-color89B"
|
||||
title="删除"
|
||||
style="cursor: pointer;"
|
||||
/>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="三会一课要求">
|
||||
<template #content>
|
||||
<el-table
|
||||
:key='1'
|
||||
:data="tableDataRequirement"
|
||||
style="width: 100%"
|
||||
border
|
||||
header-cell-class-name="table-header"
|
||||
align="center"
|
||||
empty-text="三会一课要求为空"
|
||||
>
|
||||
<el-table-column prop="meetingClassification" label="类型">
|
||||
<div slot-scope="{row}">{{ dict.getLabel('meetingClassification', row.meetingClassification) || '-' }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="要求">
|
||||
<div slot-scope="{row}">{{ dict.getLabel('appThreeMeetingCTCType', row.type) || '-' }}</div>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "meetingSet",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
detail: Object,
|
||||
partyId: String,
|
||||
partyName: String,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
navList: [
|
||||
{name: "支部负责人", id: "1"},
|
||||
{name: "会议要求", id: "2"}
|
||||
],
|
||||
navId: "1",
|
||||
tableDataUser: [],
|
||||
searchMsg: '',
|
||||
peopleList: [],
|
||||
chooseUser: [],
|
||||
tableDataRequirement: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.user)
|
||||
this.dict.load('appThreeMeetingCTCType', 'meetingClassification')
|
||||
this.getPartyList()
|
||||
this.getRequirement()
|
||||
},
|
||||
methods: {
|
||||
navClick(item) {
|
||||
this.navId = item.id;
|
||||
},
|
||||
//获取支部负责人table
|
||||
getPartyList() {
|
||||
this.instance.post(`/app/appthreemeetingpartyconfig/list?organizationId=${this.partyId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableDataUser = res.data.records
|
||||
this.peopleList = res.data.records.map((item) => {
|
||||
return {
|
||||
partyOrgId: item.organizationId,
|
||||
id: item.partyId,
|
||||
name: item.partyName,
|
||||
phone: item.phone
|
||||
}
|
||||
})
|
||||
// this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取会议要求列表
|
||||
getRequirement() {
|
||||
this.instance.post(`/app/appthreemeetingclassificationconfig/list`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableDataRequirement = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
//确认添加支部人员
|
||||
confirmAddUser(v) {
|
||||
let userList = v.map((item) => {
|
||||
return {
|
||||
organizationId: item.partyOrgId,
|
||||
partyId: item.id,
|
||||
partyName: item.name,
|
||||
phone: item.phone
|
||||
}
|
||||
})
|
||||
|
||||
this.instance.post(`/app/appthreemeetingpartyconfig/addOrUpdate`, userList, null).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message({message: '添加成功', type: 'success'});
|
||||
this.getPartyList()
|
||||
}
|
||||
})
|
||||
},
|
||||
//删除支部负责人
|
||||
deleteUser(item) {
|
||||
this.$confirm('是否删除该支部负责人?', '', {
|
||||
type: 'error'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/appthreemeetingpartyconfig/delete?ids=${item.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message({message: '删除成功', type: 'success'});
|
||||
this.getPartyList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .right_title .iconfont {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.mask {
|
||||
.operation {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
display: flex;
|
||||
z-index: 1000;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f3f6f9;
|
||||
box-shadow: inset 0 1px 0 0 #eeeeee;
|
||||
|
||||
button {
|
||||
width: 92px;
|
||||
height: 32px;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 16px 100px;
|
||||
|
||||
.search-info {
|
||||
line-height: 44px;
|
||||
border-bottom: 1px solid #D0D4DC;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
line-height: 20px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
width: 160px;
|
||||
height: 28px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
height: 28px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-list {
|
||||
padding: 8px 0;
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
|
||||
.user-item {
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
|
||||
.iconfont {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #5088FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-left {
|
||||
width: 160px;
|
||||
height: 100%;
|
||||
// float:left;
|
||||
position: absolute;
|
||||
left: -224px;
|
||||
|
||||
.content-left-nav {
|
||||
width: 158px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 4px;
|
||||
border: solid 1px #eeeeee;
|
||||
margin-top: 56px;
|
||||
overflow: hidden;
|
||||
|
||||
li {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
padding-left: 24px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0;
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
border-left: 3px solid transparent;
|
||||
|
||||
&:hover {
|
||||
border-left: 3px solid #5088ff;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.navActive {
|
||||
border-left: 3px solid #5088ff;
|
||||
color: #5088ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-tips {
|
||||
display: inline-block;
|
||||
width: 790px;
|
||||
height: 32px;
|
||||
line-height: 30px;
|
||||
background-color: #fff3e8;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #f82;
|
||||
box-sizing: border-box;
|
||||
color: #f82;
|
||||
margin: 16px 0;
|
||||
|
||||
.el-icon-warning {
|
||||
font-size: 16px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
78
packages/party/AppMeetingChinaunion/components/pieChart.vue
Normal file
78
packages/party/AppMeetingChinaunion/components/pieChart.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<div style="width:100%;height: 160px;"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
chartData: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
colorList: {
|
||||
type: Array,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el)
|
||||
this.setOptions(this.chartData)
|
||||
},
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '<br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
series: [{
|
||||
type: 'pie',
|
||||
radius: ['40%', '90%'],
|
||||
color: this.colorList,
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'inside',
|
||||
formatter: '{d}%',
|
||||
fontSize: '12',
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '12',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: this.chartData
|
||||
}]
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
chartData: {
|
||||
deep: true,
|
||||
handler(val) {
|
||||
this.setOptions(val)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
1155
packages/party/AppMeetingChinaunion/components/supplement.vue
Normal file
1155
packages/party/AppMeetingChinaunion/components/supplement.vue
Normal file
File diff suppressed because it is too large
Load Diff
259
packages/party/AppPartyHistoryClass/AppPartyHistoryClass.vue
Normal file
259
packages/party/AppPartyHistoryClass/AppPartyHistoryClass.vue
Normal file
@@ -0,0 +1,259 @@
|
||||
<template>
|
||||
<section class="AppFoundingHundred">
|
||||
<ai-list v-if="showList">
|
||||
<template #title>
|
||||
<ai-title title="党员学习" isShowBottomBorder></ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template slot="left">
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd"
|
||||
>添加</el-button
|
||||
>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
placeholder="请输入课程主题"
|
||||
clearable
|
||||
v-throttle="
|
||||
() => {
|
||||
(search.current = 1), getList();
|
||||
}
|
||||
"
|
||||
@clear="(search.current = 1), (search.title = ''), getList()"
|
||||
suffix-icon="iconfont iconSearch"
|
||||
>
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
stripe
|
||||
:total="total"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
style="margin-top: 10px"
|
||||
@getList="getList"
|
||||
>
|
||||
<el-table-column
|
||||
slot="options"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230px"
|
||||
fixed="right"
|
||||
>
|
||||
<div slot-scope="{ row }" class="table-options">
|
||||
<el-button
|
||||
type="text"
|
||||
:title="row.status == 0 ? '发布' : '取消发布'"
|
||||
@click="handleChange(row)"
|
||||
>{{ row.status == 0 ? "发布" : "取消发布" }}</el-button
|
||||
>
|
||||
<el-button type="text" title="添加" @click="handleAddSeries(row)"
|
||||
>添加剧集</el-button
|
||||
>
|
||||
<el-button type="text" title="详情" @click="handleDetail(row)"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button type="text" title="编辑" @click="handleEdit(row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button type="text" title="删除" @click="handleDelete(row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<component
|
||||
:is="comp"
|
||||
v-else
|
||||
:row="row"
|
||||
:instance="instance"
|
||||
:dict="dict"
|
||||
:permissions="permissions"
|
||||
@back="back"
|
||||
:isEdit="isEdit"
|
||||
></component>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import partyClassAdd from "./components/partyClassAdd";
|
||||
import seriesManage from "./components/seriesManage";
|
||||
import { mapState } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppPartyHistoryClass",
|
||||
label: "党员学习",
|
||||
components: { partyClassAdd, seriesManage },
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
comp: "",
|
||||
tableData: [],
|
||||
total: 0,
|
||||
row: {},
|
||||
showList: true,
|
||||
search: {},
|
||||
topOrgId: "",
|
||||
partyList: [],
|
||||
treeData: [],
|
||||
organizationId: "",
|
||||
organizationName: "",
|
||||
isEdit: false,
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
colConfigs() {
|
||||
return [
|
||||
{ label: "课程主题", prop: "title" },
|
||||
{
|
||||
label: "更新状态",
|
||||
render: (h, { row }) => [
|
||||
<span>
|
||||
{" "}
|
||||
{this.dict.getLabel(
|
||||
"classroomUpdateStatus",
|
||||
row.updateStatus
|
||||
)}{" "}
|
||||
</span>,
|
||||
],
|
||||
},
|
||||
{ label: "更新时间", prop: "updateDate" },
|
||||
{ label: "发布时间", prop: "createDate" },
|
||||
{
|
||||
label: "发布状态",
|
||||
render: (h, { row }) => [
|
||||
<span> {this.dict.getLabel("newsCenterStatus", row.status)} </span>,
|
||||
],
|
||||
},
|
||||
{ label: "发布组织", prop: "organizationName" },
|
||||
{ slot: "options" },
|
||||
];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleChange(row) {
|
||||
this.$confirm(`是否确定要${row.status == 0 ? "发布" : "取消发布"}?`).then(
|
||||
(_) => {
|
||||
this.instance
|
||||
.post("/app/apppartyclassroom/addOrUpdate", {
|
||||
id: row.id,
|
||||
status: row.status == 0 ? 1 : 0,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(
|
||||
`${row.status == 0 ? "发布成功" : "取消发布成功"}`
|
||||
);
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
handleAddSeries(row) {
|
||||
this.showList = false;
|
||||
this.comp = "seriesManage";
|
||||
this.row = row;
|
||||
},
|
||||
handleDelete({ id }) {
|
||||
this.$confirm("确定要删除吗?").then((_) => {
|
||||
this.instance
|
||||
.post("/app/apppartyclassroom/delete", null, {
|
||||
params: {
|
||||
ids: id,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
this.comp = "partyClassAdd";
|
||||
this.row = row;
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.showList = false;
|
||||
this.isEdit = false;
|
||||
this.comp = "partyClassAdd";
|
||||
this.row = row;
|
||||
},
|
||||
changeParty(e) {
|
||||
if (!e.length) return;
|
||||
this.organizationName = e[0]?.name;
|
||||
this.resetSearch();
|
||||
},
|
||||
resetSearch() {
|
||||
this.page.current = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 点击树节点
|
||||
handleNodeClick(data) {
|
||||
this.partyList = data;
|
||||
},
|
||||
back() {
|
||||
this.comp = "";
|
||||
this.showList = true;
|
||||
this.isEdit = false;
|
||||
|
||||
this.getList();
|
||||
},
|
||||
handleAdd() {
|
||||
this.comp = "partyClassAdd";
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
this.row = {};
|
||||
},
|
||||
getList() {
|
||||
this.instance
|
||||
.post("/app/apppartyclassroom/list", null, {
|
||||
params: {
|
||||
...this.page,
|
||||
...this.search,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.topOrgId = this.user.info?.organizationId;
|
||||
this.organizationId = this.user.info?.organizationId;
|
||||
this.organizationName = this.user.info?.organizationName;
|
||||
this.dict.load("classroomUpdateStatus", "newsCenterStatus");
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppFoundingHundred {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
256
packages/party/AppPartyHistoryClass/components/partyClassAdd.vue
Normal file
256
packages/party/AppPartyHistoryClass/components/partyClassAdd.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$emit('back')">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<div class="detail-content" v-if="isEdit">
|
||||
<el-form class="ai-form" :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
||||
<el-form-item label="课程主题" prop="title">
|
||||
<el-input size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新状态" prop="updateStatus">
|
||||
<ai-select v-model="form.updateStatus" :selectList="dict.getDict('classroomUpdateStatus')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布组织" prop="organizationName">
|
||||
<el-input size="small" v-model="form.organizationName" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%;" label="封面" prop="thumbUrl">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
v-model="form.thumbUrl"
|
||||
:limit="1"
|
||||
:cropOps="cropOps"
|
||||
is-crop>
|
||||
<template slot="tips">图片比例:1.6:1</template>
|
||||
</ai-uploader>
|
||||
</el-form-item>
|
||||
<el-form-item label="课程简介" style="width: 100%;" prop="content">
|
||||
<ai-editor v-model="form.content" :instance="instance" placeholder="请输入课程简介"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--详情-->
|
||||
<div class="village_detail" v-else>
|
||||
<img class="cover" :src="form.thumbUrl[0].url" v-if="form.thumbUrl && form.thumbUrl.length">
|
||||
<ai-wrapper label-width="100px" :columnsNumber="2">
|
||||
<ai-info-item label="课程主题" isLine>{{form.title}}</ai-info-item>
|
||||
<ai-info-item label="更新状态">{{dict.getLabel("classroomUpdateStatus",form.updateStatus)}}</ai-info-item>
|
||||
<ai-info-item label="更新集数">{{form.episodeNum}}</ai-info-item>
|
||||
<ai-info-item label="最后更新时间">{{form.updateDate}}</ai-info-item>
|
||||
<ai-info-item label="发布组织">{{form.organizationName}}</ai-info-item>
|
||||
<ai-info-item label="课程简介" isLine>
|
||||
<div v-html="form.content" style="margin-right: 80px"/>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<template v-if="isEdit">
|
||||
<el-button size="small" @click="$emit('back')">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="saveAdd(0)">保存
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="saveAdd(1)">保存并发布
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "partyClassAdd",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
row: Object,
|
||||
isEdit: Boolean,
|
||||
organizationId: String,
|
||||
},
|
||||
computed: {
|
||||
detailTitle() {
|
||||
return this.isEdit ? '编辑党员学习' : '党员学习详情'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
organizationId: '',
|
||||
title: '',
|
||||
type: '',
|
||||
content: '',
|
||||
thumbUrl: []
|
||||
},
|
||||
rules: {
|
||||
title: [{required: true, message: "请输入课程主题"}],
|
||||
organizationName: [{required: true, message: "请输入发布组织"}],
|
||||
updateStatus: [{required: true, message: "请选择更新状态", trigger: "change"}],
|
||||
thumbUrl: [{required: true, message: "请上传封面", trigger: "change"}],
|
||||
content: [{required: true, message: "请输入课程简介"}],
|
||||
},
|
||||
isDetail: true,
|
||||
count: 0,
|
||||
cropOps: {
|
||||
width: "336px",
|
||||
height: "210px"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downLoad(url) {
|
||||
window.open(url);
|
||||
},
|
||||
// 保存
|
||||
saveAdd(status) {
|
||||
if (this.count != 0) {
|
||||
this.$message.error('文件正在上传中');
|
||||
return
|
||||
}
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post('/app/apppartyclassroom/addOrUpdate', {
|
||||
...this.form,
|
||||
status,
|
||||
style: 1,
|
||||
thumbUrl: this.form.thumbUrl.length ? JSON.stringify([{
|
||||
url: this.form.thumbUrl[0].url
|
||||
}]) : ''
|
||||
}).then((res) => {
|
||||
if (res && res.code == 0) {
|
||||
this.row?.id ? this.$message.success('修改成功') : this.$message.success('添加成功');
|
||||
this.$emit("back");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 详情
|
||||
checkDetaiList(id) {
|
||||
id && this.instance.post('/app/apppartyclassroom/queryDetailById', null, {
|
||||
params: {id}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
this.form = res.data;
|
||||
this.form.thumbUrl = res.data.thumbUrl ? JSON.parse(res.data.thumbUrl) : []
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.form.organizationId = this.organizationId;
|
||||
this.dict.load('classroomUpdateStatus')
|
||||
this.checkDetaiList(this.row?.id);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.add_Party {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.detail-content {
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
width: 760px;
|
||||
margin: 18px auto 64px;
|
||||
// overflow-x: auto;
|
||||
// overflow-y: auto;
|
||||
padding-right: 3px !important;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
left: 100px;
|
||||
top: 5px;
|
||||
|
||||
li {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
b {
|
||||
color: red;
|
||||
font-size: 14px
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.village_detail {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
width: 760px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
|
||||
.village_title {
|
||||
padding: 24px;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
h3, p {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.village_file {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 8px 20px;
|
||||
|
||||
span {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
div {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fileSty {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.fileSty:hover {
|
||||
color: #5088FF;
|
||||
}
|
||||
}
|
||||
|
||||
.village_cont {
|
||||
flex: 1;
|
||||
padding: 30px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&.isDetail {
|
||||
::v-deep .ai-detail__content {
|
||||
background: #f3f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
386
packages/party/AppPartyHistoryClass/components/seriesAdd.vue
Normal file
386
packages/party/AppPartyHistoryClass/components/seriesAdd.vue
Normal file
@@ -0,0 +1,386 @@
|
||||
<template>
|
||||
<section class="add_Party" :class="{isDetail:!isEdit}">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$emit('back')">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<ai-card title="基本信息" v-if="isEdit">
|
||||
<template #content>
|
||||
<el-form class="ai-form" :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
||||
<el-form-item style="width: 100%;" label="单集名称" prop="title">
|
||||
<el-input size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%;" label="单集顺序" prop="num">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div style="flex: 1;margin-right: 20px;">
|
||||
<el-input size="small" v-model="form.num" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit/>
|
||||
</div>
|
||||
<span>已更新至{{episodeNum}}集</span>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%;" label="视频" prop="videoUrl">
|
||||
<el-upload :show-file-list="false" ref="upload1"
|
||||
action :http-request="submitUpload" :accept="accept" :limit="1">
|
||||
<div class="video" v-if="!form.videoUrl.length">
|
||||
<div class="icon">
|
||||
<ai-icon type="svg" icon="iconVideo"/>
|
||||
<span>上传视频</span>
|
||||
</div>
|
||||
<span class="tips">支持mp4格式,单个文件最大100MB</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<video class="video-com" style="width:100%; height:100%; object-fit: fill;" muted
|
||||
:src="form.videoUrl[0].url" controls="controls" v-if="form.videoUrl.length"></video>
|
||||
<el-upload :show-file-list="false" ref="upload2" action :http-request="submitUpload" :accept="accept"
|
||||
:limit="1" v-if="form.videoUrl.length">
|
||||
<el-button style="margin-top: 10px;">重新选择</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
<!--详情-->
|
||||
<ai-card title="基本信息" v-else>
|
||||
<template #content>
|
||||
<div class="village_title">
|
||||
<h3>{{ form.title }}</h3>
|
||||
<p style="font-size: 14px;color: #999;">{{ form.createDate|timeVal }} {{ form.organizationName }}</p>
|
||||
</div>
|
||||
<div class="village_file" v-if="form.files && form.files.length">
|
||||
<span>附件</span>
|
||||
<div>
|
||||
<p v-for="(item,i) in form.files" :key="i" class="fileSty" @click="downLoad(item.accessUrl)">
|
||||
{{ item.fileName }}{{ item.postfix }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<img class="cover" :src="form.thumbUrl[0].url" v-if="form.thumbUrl && form.thumbUrl.length">
|
||||
<div class="village_cont" v-html="form.content"/>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<template v-if="isEdit">
|
||||
<el-button size="small" @click="$emit('back')">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="saveAdd">保存</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mp4box from 'mp4box'
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "seriesAdd",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
row: Object,
|
||||
parentRow: Object,
|
||||
isEdit: Boolean
|
||||
},
|
||||
computed: {
|
||||
detailTitle() {
|
||||
return this.isEdit ? '编辑剧集' : '新增剧集'
|
||||
},
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
title: '',
|
||||
num: '',
|
||||
videoUrl: [],
|
||||
},
|
||||
accept: ".mp4",
|
||||
rules: {
|
||||
title: [{required: true, message: "请填写单集名称"}],
|
||||
num: [{required: true, message: "请填写单集顺序"}],
|
||||
videoUrl: [{required: true, message: "请选择视频"}],
|
||||
},
|
||||
isDetail: true,
|
||||
episodeNum: 0,
|
||||
cropOps: {
|
||||
width: "336px",
|
||||
height: "210px"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
downLoad(url) {
|
||||
window.open(url);
|
||||
},
|
||||
// 保存
|
||||
saveAdd() {
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post('/app/apppartyclassroomepisode/addOrUpdate', {
|
||||
...this.form,
|
||||
createUser: this.user.info.name,
|
||||
createUserId: this.user.info.id,
|
||||
status: 1,
|
||||
classroomId: this.parentRow?.id,
|
||||
id: !!this.row.id ? this.row.id : null,
|
||||
videoUrl: this.form.videoUrl.length ? this.form.videoUrl[0].url : ''
|
||||
}).then((res) => {
|
||||
if (res && res.code == 0) {
|
||||
this.row?.id ? this.$message.success('修改成功') : this.$message.success('添加成功');
|
||||
this.$emit("back");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitUpload(file) {
|
||||
this.$refs['upload1']?.clearFiles();
|
||||
this.$refs['upload2']?.clearFiles();
|
||||
this.$refs['ruleForm']?.clearValidate('videoFile');
|
||||
const fileType = file.file.name.split(".")[1];
|
||||
const size = file.file.size / 1024 / 1024 > 100;
|
||||
let mp4boxfile = mp4box.createFile();
|
||||
const reader = new FileReader();
|
||||
reader.readAsArrayBuffer(file.file);
|
||||
reader.onload = (e) => {
|
||||
const arrayBuffer = e.target.result;
|
||||
arrayBuffer.fileStart = 0;
|
||||
mp4boxfile.appendBuffer(arrayBuffer);
|
||||
};
|
||||
mp4boxfile.onReady = (info) => {
|
||||
let codec = info.mime.match(/codecs="(\S*),/)[1]
|
||||
if (codec.indexOf('avc') === -1) {
|
||||
return this.$message.error("视频编码格式不支持")
|
||||
}
|
||||
|
||||
if (size) {
|
||||
return this.$message.error("视频大小不能超过100M");
|
||||
}
|
||||
|
||||
if (fileType && this.accept.indexOf(fileType.toLocaleLowerCase()) > -1) {
|
||||
let formData = new FormData()
|
||||
formData.append('file', file.file);
|
||||
this.instance.post(`/admin/file/add-unlimited`, formData).then(res => {
|
||||
if (res && res.data) {
|
||||
let videoList = res.data[0].split(";");
|
||||
|
||||
this.form.videoUrl = [{
|
||||
id: videoList[1],
|
||||
url: videoList[0]
|
||||
}]
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return this.$message.error("视频格式错误");
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
// 详情
|
||||
checkDetaiList(id) {
|
||||
id && this.instance.post('/app/apppartyclassroom/queryLargestNum', null, {
|
||||
params: {id}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
this.episodeNum = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
this.instance.post('/app/apppartyclassroomepisode/queryDetailById', null, {
|
||||
params: {
|
||||
id: this.row?.id
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
this.form.title = res.data.title;
|
||||
this.form.num = res.data.num;
|
||||
this.form.videoUrl = res.data.videoUrl ? [{
|
||||
url: res.data.videoUrl
|
||||
}]: [];
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm('确定删除该文章吗').then(() => {
|
||||
this.instance.post('/app/apppartyhistory/delete', null, {
|
||||
params: {ids}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.isAdd = false;
|
||||
this.isDetailEdit = false;
|
||||
this.$message.success('删除成功');
|
||||
if ((this.total - 1) % this.searchObj.size == 0) {
|
||||
this.searchObj.current -= 1
|
||||
}
|
||||
this.searchVillageList();
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.checkDetaiList(this.parentRow?.id);
|
||||
if (this.row?.id) {
|
||||
this.getDetail();
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.add_Party {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.video {
|
||||
width: 640px;
|
||||
height: 360px;
|
||||
border-radius: 4px;
|
||||
border: 1px dashed #D0D4DC;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
span:nth-child(2) {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
font-size: 40px;
|
||||
color: #2266FF;
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
line-height: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.video-com {
|
||||
width: 640px;
|
||||
height: 360px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #D0D4DC;
|
||||
margin-top: -40px;
|
||||
}
|
||||
|
||||
::v-deep .AiIcon {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.footer_btn {
|
||||
width: 106px;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
.upload-tip {
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
left: 100px;
|
||||
top: 5px;
|
||||
|
||||
li {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
b {
|
||||
color: red;
|
||||
font-size: 14px
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.village_detail {
|
||||
margin-top: 16px;
|
||||
width: 760px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
|
||||
.village_title {
|
||||
padding: 24px;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
h3, p {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.village_file {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 8px 20px;
|
||||
|
||||
span {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
div {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fileSty {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.fileSty:hover {
|
||||
color: #5088FF;
|
||||
}
|
||||
}
|
||||
|
||||
.village_cont {
|
||||
flex: 1;
|
||||
padding: 30px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&.isDetail {
|
||||
::v-deep .ai-detail__content {
|
||||
background: #f3f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
175
packages/party/AppPartyHistoryClass/components/seriesManage.vue
Normal file
175
packages/party/AppPartyHistoryClass/components/seriesManage.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<section class="AppFoundingHundred">
|
||||
<ai-list v-if="showList">
|
||||
<template #title>
|
||||
<ai-title title="剧集管理" isShowBottomBorder :isShowBack="true" @onBackClick="$emit('back')"></ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template slot="left">
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="page.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="getList()"
|
||||
placeholder="请输入单集名称"
|
||||
clearable
|
||||
@clear="page.current = 1, page.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
stripe
|
||||
:total="total"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
style="margin-top: 10px;"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" label="操作" align="center" width="200px" fixed="right">
|
||||
<div slot-scope="{row}" class="table-options">
|
||||
<el-button type="text" title="播放" @click="handlePlay(row)">播放</el-button>
|
||||
<el-button type="text" title="编辑" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" title="删除" @click="handleDelete(row)">删除</el-button>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<component :is="comp" v-else :row="currentRow" :parentRow="row" :instance="instance" :dict="dict" :permissions="permissions"
|
||||
@back="back"
|
||||
:isEdit="isEdit"></component>
|
||||
<el-dialog
|
||||
title="播放"
|
||||
:visible.sync="dialog"
|
||||
@close="$refs['video'].pause()"
|
||||
@closed="videoUrl=''"
|
||||
width="800px">
|
||||
<video controls autoplay width="100%" height="100%" ref="video">
|
||||
<source :src="videoUrl" type="video/mp4">
|
||||
<source :src="videoUrl" type="video/webm">
|
||||
</video>
|
||||
<span slot="footer">
|
||||
<el-button @click="dialog=false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import seriesAdd from "./seriesAdd";
|
||||
|
||||
export default {
|
||||
name: "seriesManage",
|
||||
components: {seriesAdd},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
row: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
comp: "",
|
||||
tableData: [],
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
dialog: false,
|
||||
videoUrl: "",
|
||||
showList: true,
|
||||
search: {},
|
||||
isEdit: false,
|
||||
page: {
|
||||
title: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "单集名称", prop: "title"},
|
||||
{label: "单集顺序", align: 'center', prop: "num"},
|
||||
{label: "创建人", align: 'center', prop: "createUser"},
|
||||
{label: "创建时间", align: 'center', prop: "createDate"},
|
||||
{slot: "options"}
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleEdit(row) {
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
this.comp = "seriesAdd";
|
||||
this.currentRow = row;
|
||||
},
|
||||
handlePlay(row) {
|
||||
this.dialog = true;
|
||||
this.videoUrl = row.videoUrl;
|
||||
this.$nextTick(_=>{
|
||||
const video = this.$refs["video"];
|
||||
video.src = row.videoUrl;
|
||||
video.play();
|
||||
})
|
||||
},
|
||||
handleDelete({id}) {
|
||||
this.$confirm("是否确定要删除?").then(_ => {
|
||||
this.instance.post("/app/apppartyclassroomepisode/delete", null, {
|
||||
params: {
|
||||
ids: id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
back() {
|
||||
this.comp = "";
|
||||
this.showList = true;
|
||||
this.isEdit = false;
|
||||
this.getList();
|
||||
this.currentRow = {};
|
||||
},
|
||||
handleAdd() {
|
||||
this.comp = "seriesAdd";
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
this.currentRow = {};
|
||||
},
|
||||
getList() {
|
||||
this.instance.post("/app/apppartyclassroomepisode/list", null, {
|
||||
params: {
|
||||
...this.page,
|
||||
classroomId: this.row?.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.currentRow = {};
|
||||
this.getList();
|
||||
this.dict.load("newsCenterStatus")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppFoundingHundred {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
169
packages/party/AppQuestionBank/AppQuestionBank.vue
Normal file
169
packages/party/AppQuestionBank/AppQuestionBank.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<section class="AppQuestionBank">
|
||||
<ai-list v-if="showList">
|
||||
<template #title>
|
||||
<ai-title title="党史题库" isShowBottomBorder></ai-title>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template slot="left">
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
stripe
|
||||
:total="total"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
style="margin-top: 10px;"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" label="操作" align="center" width="220px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<div class="table-options">
|
||||
<el-button type="text" title="详情" @click="handleDetail(row)">详情</el-button>
|
||||
<el-button type="text" title="编辑" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" title="删除" @click="handleDelete(row)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<component :is="comp" v-else :row="row" :instance="instance" :dict="dict" :permissions="permissions" @back="back"
|
||||
:isEdit="isEdit"></component>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import questionBankAdd from "./components/questionBankAdd";
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppQuestionBank",
|
||||
label: "党史题库",
|
||||
components: {questionBankAdd},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
comp: "",
|
||||
tableData: [],
|
||||
total: 0,
|
||||
row: {},
|
||||
showList: true,
|
||||
search: {},
|
||||
isEdit: false,
|
||||
partyList: [],
|
||||
treeData: [],
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "类型", render: (h, {row}) => [< span> {row.type == 1 ? '单选题' : '多选题'} < /span>]},
|
||||
{label: "题目", prop: "title"},
|
||||
{label: "创建时间", prop: "createDate"},
|
||||
{slot: "options"}
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleDetail(row) {
|
||||
this.comp = "questionBankAdd";
|
||||
this.showList = false;
|
||||
this.isEdit = false;
|
||||
this.row = row;
|
||||
},
|
||||
changeParty(e) {
|
||||
if (!e.length) return
|
||||
this.organizationName = e[0]?.name;
|
||||
this.search.current = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 查询所有单位 树形结构
|
||||
searchSysAll(id) {
|
||||
this.instance.post('/admin/partyOrganization/queryAllChildren', null, {
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
res.data = res.data.map(a => {
|
||||
return {...a, label: a.name}
|
||||
});
|
||||
this.treeData = res.data.filter(e => e.id == this.user.info.organizationId);
|
||||
this.treeData.map(t => this.addChild(t, res.data));
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击树节点
|
||||
handleNodeClick(data) {
|
||||
this.partyList = data;
|
||||
},
|
||||
handleDelete({id}) {
|
||||
this.$confirm("是否确定要删除?").then(_ => {
|
||||
this.instance.post("/app/apppartyquestion/delete", null, {
|
||||
params: {
|
||||
ids: id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.comp = "questionBankAdd";
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
this.row = row;
|
||||
},
|
||||
back() {
|
||||
this.comp = "";
|
||||
this.showList = true;
|
||||
this.isEdit = false;
|
||||
this.row = {};
|
||||
this.getList();
|
||||
},
|
||||
handleAdd() {
|
||||
this.comp = "questionBankAdd";
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
this.row = {};
|
||||
},
|
||||
getList() {
|
||||
this.instance.post("/app/apppartyquestion/list", null, {
|
||||
params: {
|
||||
...this.page
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppQuestionBank {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
257
packages/party/AppQuestionBank/components/questionBankAdd.vue
Normal file
257
packages/party/AppQuestionBank/components/questionBankAdd.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$emit('back')">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<ai-card v-if="isEdit" title="基本信息">
|
||||
<el-form slot="content" :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
||||
<el-form-item label="题目描述" prop="title">
|
||||
<el-input size="small" v-model="form.title" type="textarea" :rows="6" clearable placeholder="请输入..."
|
||||
maxlength="1000"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="题目类型" prop="type">
|
||||
<el-radio-group v-model="form.type" @change="radioChange">
|
||||
<el-radio label="1">单选题</el-radio>
|
||||
<el-radio label="2">多选题</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="题目选项" prop="items">
|
||||
<el-row type="flex" v-for="(question,index) in form.items" :key="index" style="width: 100%; margin-bottom: 20px;">
|
||||
<div>
|
||||
<el-form-item :prop="'items.' + index + '.content'" :rules="[{ required: true, message: '选项不能为空', trigger: 'blur' }]">
|
||||
<div class="display: flex;">
|
||||
<label>{{map(index)}}</label>
|
||||
<el-input style="width: 500px; margin: 0 20px;" placeholder="请输入选项内容" size="small" v-model="question.content" clearable></el-input>
|
||||
<el-checkbox :value="question.checked" @change="handleChange(index)">设为答案</el-checkbox>
|
||||
<el-button type="text" icon="iconfont iconDelete" style="margin-top: 6px;"
|
||||
:disabled="form.items.length<=1" @click="handleDel(index)"></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-button type="text" @click="handleAdd" v-if="form.items && form.items.length<7">添加选项</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="答案解析" prop="analysis">
|
||||
<ai-editor v-model="form.analysis" :instance="instance"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-card>
|
||||
<!--详情-->
|
||||
<ai-card class="village_detail" v-else :title="form.title">
|
||||
<template #content>
|
||||
<ai-wrapper :columnsNumber="2" label-width="80px">
|
||||
<ai-info-item label="题目类型:">{{form.type==1?'单选题':'多选题'}}</ai-info-item>
|
||||
<ai-info-item label="正确答案:">
|
||||
<span
|
||||
style="color: #2EA222;">{{form.items && form.items.filter(e=>e.checked).map(e=>e.sort).join(',')}}</span>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="题目选项:" isLine>
|
||||
<div v-for="(item,index) in form.items" :key="index" style="margin-bottom: 8px">
|
||||
{{item.sort}}.{{item.content}}
|
||||
</div>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="答案解析:" isLine>
|
||||
<span v-html="form.analysis"></span>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<template v-if="isEdit">
|
||||
<el-button size="small" @click="$emit('back')">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="saveAdd(1)">保存
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "questionBankAdd",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
row: Object,
|
||||
isEdit: Boolean
|
||||
},
|
||||
computed: {
|
||||
detailTitle() {
|
||||
return this.isEdit ? '编辑党史题库' : '党史题库详情'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
title: '',
|
||||
type: '1',
|
||||
analysis: '',
|
||||
items: [{
|
||||
content: "",
|
||||
sort: "A",
|
||||
checked: false,
|
||||
}]
|
||||
},
|
||||
rules: {
|
||||
title: [{required: true, message: "请填写题目描述"}],
|
||||
type: [{required: true, message: "请选择类型"}],
|
||||
items: [{required: true, message: ""}],
|
||||
analysis: [{required: true, message: "请填写答案解析"}],
|
||||
},
|
||||
fileList: [],
|
||||
isDetail: true,
|
||||
count: 0,
|
||||
cropOps: {
|
||||
width: "336px",
|
||||
height: "210px"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
radioChange(){
|
||||
this.form.items = [...this.form.items.map(e=>({...e,checked:false}))];
|
||||
},
|
||||
handleChange(index) {
|
||||
if (this.form.type == 1) {
|
||||
this.form.items = [...this.form.items.map(e=>({...e,checked:false}))];
|
||||
this.form.items[index].checked = !this.form.items[index].checked;
|
||||
}else {
|
||||
this.form.items[index].checked = !this.form.items[index].checked;
|
||||
}
|
||||
},
|
||||
handleDel(index) {
|
||||
this.form.items.splice(index, 1);
|
||||
},
|
||||
handleAdd() {
|
||||
this.form.items.push({
|
||||
content: "",
|
||||
sort: this.map(this.form.items.length),
|
||||
checked: false,
|
||||
})
|
||||
},
|
||||
map(index) {
|
||||
return {
|
||||
"0": "A",
|
||||
"1": "B",
|
||||
"2": "C",
|
||||
"3": "D",
|
||||
"4": "E",
|
||||
"5": "F",
|
||||
"6": "G",
|
||||
}[index]
|
||||
},
|
||||
downLoad(url) {
|
||||
window.open(url);
|
||||
},
|
||||
saveAdd() {
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
if (this.form.items.length < 2) {
|
||||
return this.$message.error("题目选项至少保留两项");
|
||||
}
|
||||
const flag = this.form.items.filter(e=>e.checked).length==0
|
||||
if(flag){
|
||||
return this.$message.error("请设置题目选项答案");
|
||||
}
|
||||
this.instance.post('/app/apppartyquestion/addOrUpdate', {
|
||||
...this.form,
|
||||
items: this.form.items?.map(e => ({...e, checked: e.checked ? 1 : 0})),
|
||||
id: this.row?.id
|
||||
}).then((res) => {
|
||||
if (res && res.code == 0) {
|
||||
this.row?.id ? this.$message.success('修改成功') : this.$message.success('添加成功');
|
||||
this.$emit("back");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 详情
|
||||
checkDetaiList(id) {
|
||||
id && this.instance.post('/app/apppartyquestion/queryDetailById', null, {
|
||||
params: {id}
|
||||
}).then((res) => {
|
||||
if (res?.data) {
|
||||
const items = res.data.items?.map(e => ({...e, checked: e.checked != 0}));
|
||||
this.form = {...res.data, items};
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.dict.load('partyHistoryType0', 'partyPublicCommentStatus')
|
||||
this.checkDetaiList(this.row?.id);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cover {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 140px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.add_Party {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.detail-content {
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
width: 760px;
|
||||
margin: 18px auto 64px;
|
||||
padding-right: 3px !important;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
left: 100px;
|
||||
top: 5px;
|
||||
|
||||
li {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
b {
|
||||
color: red;
|
||||
font-size: 14px
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.village_detail {
|
||||
margin-top: 16px;
|
||||
width: 760px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #eee;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
&.isDetail {
|
||||
::v-deep .ai-detail__content {
|
||||
background: #f3f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<div class="AppPartyMember">
|
||||
<component ref="component" :is="currentPage" :selected.sync="selected" v-bind="$props"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Add from './components/Add'
|
||||
import Detail from './components/Detail'
|
||||
import {mapState} from "vuex";
|
||||
import NeighbourSetting from "./components/neighbourSetting";
|
||||
|
||||
export default {
|
||||
name: 'AppPartyMember',
|
||||
label: '党员管理',
|
||||
components: {
|
||||
NeighbourSetting,
|
||||
Add,
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions:Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selected: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
currentPage() {
|
||||
if (this.$route.hash == "#add") {
|
||||
return Add
|
||||
} else if (this.$route.hash == "#ns") {
|
||||
return NeighbourSetting
|
||||
} else if (this.$route.query.id) {
|
||||
return Detail
|
||||
} else return List
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load("yesOrNo")
|
||||
let {organizationId: id, organizationName: name} = this.user.info
|
||||
this.selected = {id, name}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppPartyMember {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,507 +0,0 @@
|
||||
<template>
|
||||
<ai-detail class="party-detail">
|
||||
<template slot="title">
|
||||
<ai-title title="党员信息详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<div>
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-avatar class="party-avatar" v-model="info.avatarUrl" :editable="false"></ai-avatar>
|
||||
<ai-info-item label="姓名">{{ info.name }}</ai-info-item>
|
||||
<ai-info-item label="性别" :value="dict.getLabel('sex', info.sex)"></ai-info-item>
|
||||
<ai-info-item label="身份证号">
|
||||
<ai-id mode="show" :value="info.idNumber" rightBtn/>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="info.birthday"></ai-info-item>
|
||||
<ai-info-item label="年龄">{{ info.age }}</ai-info-item>
|
||||
<ai-info-item label="民族" :value="dict.getLabel('nation', info.nation)"></ai-info-item>
|
||||
<ai-info-item label="籍贯" isLine :value="info.birthplaceAreaName"></ai-info-item>
|
||||
<ai-info-item label="户籍地" isLine :value="info.householdAreaName"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="审核状态">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="审核状态">
|
||||
<span :class="'audit-' + info.auditStatus">{{ dict.getLabel('auditStatus', info.auditStatus) }}</span>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="联络信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="联系方式">{{ info.phone || '-' }}</ai-info-item>
|
||||
<ai-info-item isLine label="现住址">{{
|
||||
((info.currentAreaName || '') + (info.currentAddress || '')) || '-'
|
||||
}}
|
||||
</ai-info-item>
|
||||
<ai-info-item label="所属党组织">{{ info.partyOrgName || '-' }}</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="党籍信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="党籍状态" :value="dict.getLabel('partyStatus',info.partyStatus)"/>
|
||||
<ai-info-item label="转正日期"
|
||||
:value="info.turnPositiveTime ? info.turnPositiveTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="任职日期"
|
||||
:value="info.partyStartDate ? info.partyStartDate.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="党员类型" :value="dict.getLabel('partyType', info.partyType)"></ai-info-item>
|
||||
<ai-info-item label="入党时间">{{
|
||||
info.joinPartyTime ? info.joinPartyTime.split(' ')[0] : '-'
|
||||
}}
|
||||
</ai-info-item>
|
||||
<ai-info-item label="党内兼职" :value="info.partyWork"></ai-info-item>
|
||||
<ai-info-item label="党内职务" :value="dict.getLabel('partyPosition', info.partyPosition)"></ai-info-item>
|
||||
<ai-info-item label="入党介绍人" :value="info.joinPartyIntroducer"></ai-info-item>
|
||||
<ai-info-item label="优秀党员" :value="dict.getLabel('yesOrNo', info.isOutstandingParty)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="党员简介">
|
||||
<template #content>
|
||||
<div v-text="info.personalProfile"/>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="流动信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="流动情况" :value="dict.getLabel('flowStatus', info.flowStatus)"></ai-info-item>
|
||||
<ai-info-item label="流入组织" v-if="info.flowStatus == 1" :value="info.flowOrgId"></ai-info-item>
|
||||
<ai-info-item label="流入时间" v-if="info.flowStatus == 1"
|
||||
:value="info.flowTime ? info.flowTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="流出组织" v-if="info.flowStatus == 0" :value="info.outFlow"></ai-info-item>
|
||||
<ai-info-item label="流出时间" v-if="info.flowStatus == 0"
|
||||
:value="info.inTime ? info.inTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="失联时间" v-if="info.flowStatus == 2"
|
||||
:value="info.lossTime ? info.lossTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="文化程度">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="学历" :value="dict.getLabel('education', info.education)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="五星党员" name="五星党员" lazy></el-tab-pane>
|
||||
<el-tab-pane label="工作信息" name="工作信息" lazy></el-tab-pane>
|
||||
<el-tab-pane label="违纪信息" name="违纪信息" lazy></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="add-btn">
|
||||
<span></span>
|
||||
<!-- <div @click="addForm(activeName)">
|
||||
<i class="iconfont iconAdd"></i>
|
||||
<span>添加{{ activeName }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<ai-table
|
||||
v-if="activeName === '五星党员'"
|
||||
:border="true"
|
||||
:tableData="info.starList"
|
||||
:isShowPagination="false"
|
||||
:col-configs="colConfigs1"
|
||||
:stripe="false"
|
||||
@getList="() => {}">
|
||||
<el-table-column label="评定等级" slot="level" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-rate v-model="row.level" disabled show-text :texts="textlist"></el-rate>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="editStar(row)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id, '/app/apppartyfivestar/delete')">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-table
|
||||
v-if="activeName === '工作信息'"
|
||||
:border="true"
|
||||
:tableData="info.workInfoList"
|
||||
:isShowPagination="false"
|
||||
:col-configs="colConfigs2"
|
||||
:stripe="false"
|
||||
@getList="() => {}">
|
||||
<el-table-column label="工作时间" slot="date" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.starTime && row.endTime">{{
|
||||
row.starTime.split(' ')[0]
|
||||
}} 至 {{ row.endTime.split(' ')[0] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="editJob(row)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id, '/app/apppartyworkinfo/delete')">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-table
|
||||
v-if="activeName === '违纪信息'"
|
||||
:border="true"
|
||||
:tableData="info.disciplinaryInfoList"
|
||||
:isShowPagination="false"
|
||||
:col-configs="colConfigs3"
|
||||
:stripe="false"
|
||||
@getList="() => {}">
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="editDisciplinary(row)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id, '/app/apppartydisciplinaryinfo/delete')">删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowStarForm"
|
||||
width="690px"
|
||||
:title="starId ? '修改五星党员' : '添加五星党员'"
|
||||
@close="onClose"
|
||||
@onConfirm="onStarForm">
|
||||
<el-form ref="starForm" :model="starForm" label-width="110px" label-position="right">
|
||||
<el-form-item label="评定时间" prop="starTime"
|
||||
:rules="[{ required: true, message: '请选择评定时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="starForm.starTime"
|
||||
type="month"
|
||||
placeholder="请选择评定时间"
|
||||
style="width: 230px;" format="yyyy-MM"
|
||||
:value-format="'yyyy-MM-dd'+ ' 00:00:00'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="评定等级" prop="level"
|
||||
:rules="[{ required: true, message: '请选择评定等级', trigger: 'change' }]">
|
||||
<el-rate v-model="starForm.level" show-text :texts="textlist" style="line-height: 2.5;"></el-rate>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowJobForm"
|
||||
width="690px"
|
||||
:title="jobId ? '修改工作信息' : '添加工作信息'"
|
||||
@close="onClose"
|
||||
@onConfirm="onJobForm">
|
||||
<el-form ref="jobForm" :model="jobForm" label-width="110px" label-position="right">
|
||||
<el-form-item label="工作时间" prop="date" :rules="[{ required: true, message: '请选择工作时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="jobForm.date"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份" end-placeholder="结束月份" format="yyyy-MM"
|
||||
:value-format="'yyyy-MM-dd'+ ' 00:00:00'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="company" :rules="[{ required: true, message: '请输入工作单位', trigger: 'blur' }]">
|
||||
<el-input size="small" :maxLength="30" v-model="jobForm.company" placeholder="请输入工作单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务" prop="position" :rules="[{ required: true, message: '请输入职务', trigger: 'blur' }]">
|
||||
<el-input size="small" :maxLength="30" v-model="jobForm.position" placeholder="请输入职务"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowDisciplinaryForm"
|
||||
width="690px"
|
||||
:title="disciplinaryId ? '修改违纪信息' : '添加违纪信息'"
|
||||
@close="onClose"
|
||||
@onConfirm="onDisciplinarForm">
|
||||
<el-form ref="disciplinaryForm" :model="disciplinaryForm" label-width="110px" label-position="right">
|
||||
<el-form-item label="时间" prop="starTime"
|
||||
:rules="[{ required: true, message: '请选择违纪时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="disciplinaryForm.starTime"
|
||||
type="month"
|
||||
placeholder="请选择违纪时间"
|
||||
style="width: 230px;" format="yyyy-MM"
|
||||
:value-format="'yyyy-MM-dd'+ ' 00:00:00'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="违纪原因" prop="disciplinaryInfo"
|
||||
:rules="[{ required: true, message: '请输入违纪原因', trigger: 'blur' }]">
|
||||
<el-input size="small" v-model="disciplinaryForm.disciplinaryInfo" placeholder="请输入违纪原因"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理结果" prop="result" :rules="[{ required: true, message: '请输入处理结果', trigger: 'blur' }]">
|
||||
<el-input size="small" v-model="disciplinaryForm.result" placeholder="请输入处理结果"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
isShowStarForm: false,
|
||||
isShowJobForm: false,
|
||||
jobForm: {
|
||||
date: [],
|
||||
company: '',
|
||||
position: ''
|
||||
},
|
||||
jobId: '',
|
||||
starForm: {
|
||||
starTime: '',
|
||||
level: 1
|
||||
},
|
||||
disciplinaryId: '',
|
||||
isShowDisciplinaryForm: false,
|
||||
disciplinaryForm: {
|
||||
starTime: '',
|
||||
disciplinaryInfo: '',
|
||||
result: ''
|
||||
},
|
||||
starId: '',
|
||||
activeName: '五星党员',
|
||||
textlist: ['一星党员', '二星党员', '三星党员', '四星党员', '五星党员'],
|
||||
colConfigs1: [
|
||||
{prop: 'starTime', label: '评定时间', align: 'center', formart: v => v ? v.split(' ')[0] : '-'},
|
||||
{slot: 'level'}
|
||||
],
|
||||
colConfigs2: [
|
||||
{slot: 'date'},
|
||||
{prop: 'company', label: '单位', align: 'center'},
|
||||
{prop: 'position', label: '职务', align: 'center'}
|
||||
],
|
||||
colConfigs3: [
|
||||
{prop: 'starTime', label: '时间', align: 'center', formart: v => v ? v.split(' ')[0] : '-'},
|
||||
{prop: 'disciplinaryInfo', label: '违纪原因', align: 'center'},
|
||||
{prop: 'result', label: '处理结果', align: 'center'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo() {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post(`/app/appparty/detail`, null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
if (this.info.birthday) {
|
||||
this.info.birthday = this.info.birthday.substring(0, 10)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
remove(id, apiUrl) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`${apiUrl}?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getInfo()
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
editJob(query) {
|
||||
this.jobForm = {
|
||||
...query,
|
||||
date: [query.starTime, query.endTime]
|
||||
}
|
||||
this.jobId = query.id
|
||||
|
||||
this.isShowJobForm = true
|
||||
},
|
||||
editStar(query) {
|
||||
this.starForm = {
|
||||
...query
|
||||
}
|
||||
this.starId = query.id
|
||||
|
||||
this.isShowStarForm = true
|
||||
},
|
||||
|
||||
editDisciplinary(query) {
|
||||
this.disciplinaryForm = {
|
||||
...query
|
||||
}
|
||||
this.disciplinaryId = query.id
|
||||
|
||||
this.isShowDisciplinaryForm = true
|
||||
},
|
||||
|
||||
onDisciplinarForm() {
|
||||
this.$refs.disciplinaryForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartydisciplinaryinfo/addOrUpdate`, {
|
||||
...this.disciplinaryForm,
|
||||
partyId: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShowDisciplinaryForm = false
|
||||
this.getInfo()
|
||||
this.$message.success(this.jobId ? '编辑成功' : '新增成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onJobForm() {
|
||||
this.$refs.jobForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartyworkinfo/addOrUpdate`, {
|
||||
...this.jobForm,
|
||||
starTime: this.jobForm.date[0],
|
||||
endTime: this.jobForm.date[1],
|
||||
partyId: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShowJobForm = false
|
||||
this.getInfo()
|
||||
this.$message.success(this.jobId ? '编辑成功' : '新增成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onStarForm() {
|
||||
this.$refs.starForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartyfivestar/addOrUpdate`, {
|
||||
...this.starForm,
|
||||
idNumber: this.info.idNumber,
|
||||
partyId: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShowStarForm = false
|
||||
this.getInfo()
|
||||
this.$message.success(this.starId ? '编辑成功' : '新增成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.starId = ''
|
||||
this.jobId = ''
|
||||
this.disciplinaryId = ''
|
||||
this.starForm.level = 0
|
||||
this.starForm.id = ''
|
||||
this.starForm.starTime = ''
|
||||
this.jobForm.date = []
|
||||
this.jobForm.company = ''
|
||||
this.jobForm.id = ''
|
||||
this.jobForm.position = ''
|
||||
this.disciplinaryForm.starTime = ''
|
||||
this.disciplinaryForm.id = ''
|
||||
this.disciplinaryForm.disciplinaryInfo = ''
|
||||
this.disciplinaryForm.result = ''
|
||||
},
|
||||
|
||||
addForm(type) {
|
||||
if (type === '五星党员') {
|
||||
this.isShowStarForm = true
|
||||
} else if (type === '工作信息') {
|
||||
this.isShowJobForm = true
|
||||
} else {
|
||||
this.isShowDisciplinaryForm = true
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.$router.push({})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.party-detail {
|
||||
::v-deep .AiID {
|
||||
line-height: 1.4;
|
||||
color: #222;
|
||||
|
||||
.el-button {
|
||||
height: auto;
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.party-avatar {
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.audit-0 {
|
||||
color: #FF8822 !important;
|
||||
}
|
||||
|
||||
.audit-1 {
|
||||
color: #2EA222 !important;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0 20px;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #2266FF;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
i {
|
||||
line-height: 1;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,299 +0,0 @@
|
||||
<template>
|
||||
<ai-list class="partyList">
|
||||
<template slot="title">
|
||||
<ai-title title="党员管理" isShowBottomBorder/>
|
||||
</template>
|
||||
<template #left>
|
||||
<ai-tree-menu title="组织目录" searchPlaceholder="请输入党组织名称" @search="onSearch">
|
||||
<ai-party-tree
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
:instance="instance"
|
||||
:root="user.info.organizationId"
|
||||
:current-node-key="selected.id"
|
||||
@select="onTreeChange"/>
|
||||
</ai-tree-menu>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select v-model="search.sex" placeholder="请选择性别" :selectList="dict.getDict('sex')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.nation" placeholder="请选择民族" :selectList="dict.getDict('nation')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.partyStatus" placeholder="请选择党籍状态" :selectList="dict.getDict('partyStatus')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.flowStatus" placeholder="请选择流动状态" :selectList="dict.getDict('flowStatus')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.education" placeholder="请选择文化程度" :selectList="dict.getDict('education')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.partyPosition" placeholder="请选择党内职务" :selectList="dict.getDict('partyPosition')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.disciplinary" placeholder="请选择违纪情况" :selectList="dict.getDict('disciplinary')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-search label="出生日期">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.birthStart"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 180px"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 00:00:00'"/>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.birthEnd"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 180px"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 23:59:59'"/>
|
||||
</ai-search>
|
||||
<ai-search label="入党时间">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.joinPartyStart"
|
||||
type="date"
|
||||
style="width: 180px"
|
||||
placeholder="开始日期"
|
||||
format="yyyy-MM-dd"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 00:00:00'">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.joinPartyEnd"
|
||||
type="date"
|
||||
style="width: 180px"
|
||||
placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 23:59:59'">
|
||||
</el-date-picker>
|
||||
</ai-search>
|
||||
<ai-search label="年龄">
|
||||
<ai-range v-model="search.age" ref="resetagefoo" @change="search.current = 1, getList()"
|
||||
@closeVal="search.age = []"/>
|
||||
</ai-search>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="search.con"
|
||||
size="small"
|
||||
placeholder="请输入姓名或身份证"
|
||||
clearable
|
||||
@change="search.current=1,getList()"
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button size="small" :disabled="!isShowAddBtn" type="primary" icon="iconfont iconAdd" @click="toAdd()">
|
||||
添加党员
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<ai-import :instance="instance" :dict="dict" type="appparty" name="党员管理" @success="getList()"></ai-import>
|
||||
<ai-download :instance="instance" :params="exportQuery" url="/app/appparty/export2" fileName="党员明细"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:dict="dict"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
v-loading="loading"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@handleSelectionChange="handleSelectionChange"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="220px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
<el-button type="text" @click="showNeighbourSetting(row.id)"
|
||||
v-if="permissions('app_apppartyfourresident_detail')">四邻设置
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div slot="paginationBtns" class="party-table__btns">
|
||||
<span style="margin-right: 8px;" @click="removeAll">批量删除</span>
|
||||
</div>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
permissions: Function,
|
||||
dict: Object,
|
||||
selected: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
con: '',
|
||||
age: [],
|
||||
sex: '',
|
||||
nation: '',
|
||||
partyStatus: '',
|
||||
flowStatus: '',
|
||||
education: '',
|
||||
partyPosition: '',
|
||||
birthStart: '',
|
||||
birthEnd: '',
|
||||
turnPositiveStart: '',
|
||||
turnPositiveEnd: '',
|
||||
joinPartyStart: '',
|
||||
joinPartyEnd: ''
|
||||
},
|
||||
orgName: '',
|
||||
loading: false,
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{type: 'selection', label: ''},
|
||||
{prop: 'name', label: '姓名', align: 'center'},
|
||||
{prop: 'sex', label: '性别', align: 'center', dict: 'sex'},
|
||||
{prop: 'age', label: '年龄', align: 'center'},
|
||||
// {
|
||||
// prop: 'auditStatus', label: '审核状态', align: 'center',
|
||||
// render: (h, {row}) => h('span', {class: `audit-${row.auditStatus}`}, this.dict.getLabel('auditStatus', row.auditStatus))
|
||||
// },
|
||||
{prop: 'partyStatus', label: '党籍状态', align: 'center', dict: 'partyStatus'},
|
||||
{prop: 'joinPartyTime', label: '入党日期', align: 'center'},
|
||||
{prop: 'partyPosition', label: '党内职务', align: 'center', dict: 'partyPosition'},
|
||||
{prop: 'flowStatus', label: '流动状态', align: 'center', dict: 'flowStatus'},
|
||||
],
|
||||
tableData: [],
|
||||
ids: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
orgTree() {
|
||||
return this.$refs.tree?.$refs?.partyTree
|
||||
},
|
||||
exportQuery() {
|
||||
let {id: partyOrgId} = this.selected
|
||||
return {
|
||||
ids: this.ids ? this.ids.split(',') : [],
|
||||
...this.search, partyOrgId
|
||||
}
|
||||
},
|
||||
isShowAddBtn() {
|
||||
return this.selected.isLeaf == 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load('disciplinary', 'partyType', 'sex', 'nation', 'education', 'partyStatus', 'partyPosition', 'flowStatus', 'auditStatus')
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
showNeighbourSetting(id) {
|
||||
this.$router.push({query: {id}, hash: "#ns"})
|
||||
},
|
||||
onTreeChange(e) {
|
||||
this.$emit("update:selected", e)
|
||||
this.getList(e.id)
|
||||
},
|
||||
|
||||
onSearch(v) {
|
||||
this.orgTree.filter(v)
|
||||
},
|
||||
|
||||
getList(partyOrgId) {
|
||||
if (!this.user.info.organizationId) return
|
||||
|
||||
this.loading = true
|
||||
partyOrgId = partyOrgId || this.selected.id
|
||||
this.instance.post(`/app/appparty/list`, null, {
|
||||
params: {partyOrgId, ...this.search, age: this.search.age?.join(',')}
|
||||
}).then(res => {
|
||||
this.loading = false
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
removeAll() {
|
||||
if (!this.ids) {
|
||||
return this.$message.error('请选择党员')
|
||||
}
|
||||
this.remove(this.ids)
|
||||
},
|
||||
handleSelectionChange(e) {
|
||||
this.ids = e.map(v => v.id).join(',')
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appparty/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
toDetail(id) {
|
||||
this.$router.push({query: {id}})
|
||||
},
|
||||
toAdd(id) {
|
||||
this.$router.push({query: {id}, hash: "#add"})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.partyList {
|
||||
.party-table__btns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .audit-0 {
|
||||
color: #FF8822 !important;
|
||||
}
|
||||
|
||||
::v-deep .audit-1 {
|
||||
color: #2EA222 !important;
|
||||
}
|
||||
|
||||
::v-deep .ai-list__content--right {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 1px;
|
||||
box-shadow: none;
|
||||
|
||||
.ai-list__content--right-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,224 +0,0 @@
|
||||
<template>
|
||||
<section class="neighbourSetting">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="四邻设置" isShowBottomBorder isShowBack @onBackClick="back"/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button>
|
||||
<el-button icon="iconfont iconDelete" :disabled="!search.ids" @click="handleDelete(search.ids)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索党员/四邻信息" v-model="search.name" clearable
|
||||
@change="page.current=1,getTableData()" suffix-icon="iconfont iconSearch"/>
|
||||
</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=>search.ids=v.map(e=>e.pfrId).toString()">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="handleDelete(row.pfrId)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="添加户主" :visible.sync="dialog" @closed="clearDialog" @onConfirm="submit"
|
||||
width="1200px">
|
||||
<ai-area-get v-model="form.areaId" :instance="instance" :root="user.info.areaId"
|
||||
@change="list.current=1,getResident()"/>
|
||||
<el-row type="flex" class="mar-t16">
|
||||
<ai-table ref="Residents" :tableData="residents" :total="list.total" :current.sync="list.current"
|
||||
:size.sync="list.size" class="fill" border height="360px" @getList="getResident"
|
||||
:col-configs="[{slot: 'resident'}]" layout="slot,->, prev, pager, next, jumper" :pagerCount="5">
|
||||
<el-table-column slot="resident">
|
||||
<template #header>
|
||||
<b v-text="`户主信息列表`"/>
|
||||
<el-input class="fill" v-model="list.con" size="small" placeholder="搜索姓名/身份证号" clearable
|
||||
@change="list.current=1,getResident()"/>
|
||||
</template>
|
||||
<template slot-scope="{row}">
|
||||
<el-row type="flex" justify="space-between" @click.native="handleSelectResident(row)" class="toggle"
|
||||
:class="{selected:findResident(row.id)>-1}">
|
||||
<span v-text="row.name"/>
|
||||
<span v-text="idCardNoUtil.hideId(row.idNumber)"/>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-table :tableData="form.residentList" :col-configs="[{slot:'resident'}]" :isShowPagination="false" border
|
||||
height="360px">
|
||||
<el-table-column slot="resident">
|
||||
<template #header>
|
||||
<b v-text="`已选择`"/>
|
||||
<el-button type="text" @click="form.residentList=[]">清空</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<div v-text="[row.residentName, idCardNoUtil.hideId(row.idNumber)].join(' ')"/>
|
||||
<el-button type="text" @click="form.residentList.splice($index,1)">删除</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</el-row>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "neighbourSetting",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
colConfigs() {
|
||||
return [
|
||||
{type: 'selection'},
|
||||
{label: "户主姓名", prop: "name"},
|
||||
{label: "身份证号", prop: "idNumber"},
|
||||
{label: "联系方式", prop: "phone"},
|
||||
{label: "添加时间", prop: "createTime"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: "", ids: ""},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
dialog: false,
|
||||
form: {areaId: "", residentList: []},
|
||||
residents: [],
|
||||
list: {current: 1, size: 10, total: 0},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
getTableData() {
|
||||
this.instance.post("/app/apppartyfourresident/listFourResident", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除户主?").then(() => {
|
||||
this.instance.post("/app/apppartyfourresident/delete", null, {
|
||||
params: {ids}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!")
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
submit() {
|
||||
this.instance.post("/app/apppartyfourresident/add", this.form).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
this.dialog = false
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
},
|
||||
getResident() {
|
||||
let {areaId} = this.form
|
||||
areaId = areaId || this.user.info.areaId
|
||||
this.instance.post("/app/appresident/list", null, {
|
||||
params: {householdName: 1, areaId, ...this.list, auditStatus: 1}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
// this.residents = res.data.records?.map(e => ({dictValue: e.id, dictName: e.name}))
|
||||
this.residents = res.data.records
|
||||
this.list.total = res.data.total
|
||||
this.$refs.Residents.doLayout()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectResident(row) {
|
||||
let {id: partyId} = this.$route.query
|
||||
let index = this.findResident(row.id)
|
||||
if (index > -1) {
|
||||
this.form.residentList.splice(index, 1)
|
||||
} else {
|
||||
let {id: residentId, name: residentName, idNumber} = row
|
||||
this.form.residentList.push({residentId, residentName, idNumber, partyId})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
},
|
||||
findResident(id) {
|
||||
return this.form.residentList?.findIndex(e => e.residentId == id)
|
||||
},
|
||||
clearDialog() {
|
||||
this.form = {residentList: []}
|
||||
this.residents = []
|
||||
this.list = {current: 1, size: 10, total: 0}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.search.partyId = this.$route.query.id
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.neighbourSetting {
|
||||
height: 100%;
|
||||
|
||||
.mar-t16 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
::v-deep.ai-dialog__content {
|
||||
.ai-dialog__content--wrapper {
|
||||
padding-right: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.el-row {
|
||||
width: 100%;
|
||||
|
||||
.ai-table + .ai-table {
|
||||
margin-left: 16px;
|
||||
width: 400px;
|
||||
|
||||
.ai-table__header > .cell {
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toggle {
|
||||
cursor: pointer;
|
||||
|
||||
&.selected {
|
||||
color: #26f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ai-table__header > .cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user