md
This commit is contained in:
parent
e585d118f7
commit
bff16210f5
@ -1,472 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<!--
|
||||
<el-form-item label="" prop="orderFrom">
|
||||
<el-select v-model="queryParams.orderFrom" placeholder="平台" clearable filterable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in orderFromOptions"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="pri">
|
||||
<el-select v-model="queryParams.pri" clearable="" @change="handleQuery" placeholder="任务状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_pri_level"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
-->
|
||||
|
||||
<el-form-item label="" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="审核状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="message">
|
||||
<el-input
|
||||
v-model="queryParams.message"
|
||||
placeholder="信息"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="delFlag">
|
||||
<el-input
|
||||
v-model="queryParams.delFlag"
|
||||
placeholder="删除标志(0代表存在"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="备注"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['im:imFriend:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['im:imFriend:edit']"
|
||||
>修改</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['im:imFriend:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['im:imFriend:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="imFriendList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
<span v-text="getIndex(scope.$index)"> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--
|
||||
<el-table-column label="xxx" align="left" prop="xxx" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleView(scope.row)">{{scope.row.orderSn}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="结算状态" align="center" prop="settleStatus" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.settleStatus == 0" style="color:red;">
|
||||
<span class="el-tag el-tag--info">未结算</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 10" style="color:red;">
|
||||
<span class="el-tag">待确认</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 11" style="color:green;">
|
||||
<span class="el-tag el-tag--success el-tag--light">已确认</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 20" >
|
||||
<span class="el-tag el-tag--warning el-tag--light">待打款</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 21" style="color:green;">
|
||||
<span class="el-tag el-tag--success el-tag--light">已打款</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 40" style="color:red;">
|
||||
<span class="el-tag el-tag--danger">已拒绝</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<el-table-column label="审核状态" align="center" prop="state" min-width="100" />
|
||||
<el-table-column label="信息" align="center" prop="message" min-width="100" />
|
||||
<el-table-column label="删除标志(0代表存在" align="center" prop="delFlag" min-width="100" />
|
||||
<el-table-column label="备注" align="center" prop="remark" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['im:imFriend:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['im:imFriend:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改IM朋友对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入审核状态" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="信息" prop="message">
|
||||
<el-input v-model="form.message" placeholder="请输入信息" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="删除标志(0代表存在" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标志(0代表存在" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<ImFriendDetail :id="id" ></ImFriendDetail>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listImFriend, getImFriend, delImFriend, addImFriend, updateImFriend } from "@/api/im/imFriend";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import ImFriendDetail from '@/views/im/imFriend/view';
|
||||
|
||||
export default {
|
||||
name: "imFriend",
|
||||
components: { elDateSimplePicker,ImFriendDetail },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 搜索下拉
|
||||
// itemOptions:[],
|
||||
// 下拉枚举
|
||||
// xxStatusOtions: [
|
||||
// {value: '0', label: 'xx1'},
|
||||
// {value: '10', label: 'xxx'},
|
||||
// ],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// IM朋友表格数据
|
||||
imFriendList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 备注时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 备注时间范围
|
||||
daterangeUpdateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
state: null,
|
||||
message: null,
|
||||
delFlag: null,
|
||||
remark: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户id不能为空", trigger: "blur" }
|
||||
],
|
||||
friendId: [
|
||||
{ required: true, message: "用户id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM朋友列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||
}
|
||||
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
||||
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
||||
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||
}
|
||||
listImFriend(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.imFriendList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userId: null,
|
||||
friendId: null,
|
||||
state: null,
|
||||
message: null,
|
||||
tenantId: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getImFriend(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/im/imFriend/viewDetail', query: { id: row.id }})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateImFriend(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addImFriend(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delImFriend(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('im/imFriend/export', {
|
||||
// ...this.queryParams
|
||||
// }, `imFriend_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listImFriend(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','用户id','用户id','审核状态','信息','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注',];
|
||||
const filterVal = ['id','userId','friendId','state','message','tenantId','delFlag','createBy','createTime','updateBy','updateTime','remark',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: 'IM朋友',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,86 +0,0 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<el-row>
|
||||
<el-button icon="el-icon-arrow-left" size="small" @click="backClick">返回</el-button>
|
||||
<el-button size="small" @click="successOrder">操作</el-button>
|
||||
</el-row>
|
||||
<el-descriptions title="基本信息:" class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="id">{{ imFriend.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户id">{{ imFriend.userId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户id">{{ imFriend.friendId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核状态">{{ imFriend.state }}</el-descriptions-item>
|
||||
<el-descriptions-item label="信息">{{ imFriend.message }}</el-descriptions-item>
|
||||
<el-descriptions-item label="租户ID">{{ imFriend.tenantId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="删除标志(0代表存在">{{ imFriend.delFlag }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者">{{ imFriend.createBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ imFriend.createTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新者">{{ imFriend.updateBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ imFriend.updateTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ imFriend.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getImFriend } from "@/api/im/imFriend";
|
||||
|
||||
export default {
|
||||
name: "imFriend",
|
||||
props:{
|
||||
id:undefined
|
||||
},
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// IM朋友表格数据
|
||||
imFriend: {}
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM朋友列表 */
|
||||
initData() {
|
||||
this.loading = true;
|
||||
getImFriend(this.id).then(response => {
|
||||
this.imFriend = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
.margin-top{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.printMeClass {
|
||||
font-family: SimHei;
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,383 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="群名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入群名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核" prop="needCheck">
|
||||
<el-select v-model="queryParams.needCheck" placeholder="请选择审核" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['im:imGroup:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['im:imGroup:edit']"
|
||||
>修改</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['im:imGroup:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['im:imGroup:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="imGroupList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="id" />
|
||||
<el-table-column label="群名称" align="center" prop="name" />
|
||||
<el-table-column label="审核" align="center" prop="needCheck">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.needCheck"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="公告" align="center" prop="announcement" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['im:imGroup:edit']"
|
||||
>修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改IM组对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="群名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入群名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="群头像" prop="avatar">
|
||||
<image-upload v-model="form.avatar" :limit="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核" prop="needCheck">
|
||||
<el-radio-group v-model="form.needCheck">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="公告" prop="announcement">
|
||||
<el-input v-model="form.announcement" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<ImGroupDetail :id="id" ></ImGroupDetail>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listImGroup, getImGroup, delImGroup, addImGroup, updateImGroup } from "@/api/im/imGroup";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import ImGroupDetail from '@/views/im/imGroup/view';
|
||||
|
||||
export default {
|
||||
name: "imGroup",
|
||||
components: { elDateSimplePicker,ImGroupDetail },
|
||||
dicts: [
|
||||
'sys_yes_no'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 搜索下拉
|
||||
// itemOptions:[],
|
||||
// 下拉枚举
|
||||
// xxStatusOtions: [
|
||||
// {value: '0', label: 'xx1'},
|
||||
// {value: '10', label: 'xxx'},
|
||||
// ],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// IM组表格数据
|
||||
imGroupList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 备注时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 备注时间范围
|
||||
daterangeUpdateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
name: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM组列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||
}
|
||||
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
||||
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
||||
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||
}
|
||||
listImGroup(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.imGroupList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
avatar: null,
|
||||
master: null,
|
||||
announcement: null,
|
||||
needCheck: "0",
|
||||
tenantId: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getImGroup(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/im/imGroup/viewDetail', query: { id: row.id }})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateImGroup(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addImGroup(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delImGroup(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('im/imGroup/export', {
|
||||
// ...this.queryParams
|
||||
// }, `imGroup_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listImGroup(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','群名称','群头像','群主','公告','需要审核吗','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注',];
|
||||
const filterVal = ['id','name','avatar','master','announcement','needCheck','tenantId','delFlag','createBy','createTime','updateBy','updateTime','remark',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: 'IM组',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,87 +0,0 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<el-row>
|
||||
<el-button icon="el-icon-arrow-left" size="small" @click="backClick">返回</el-button>
|
||||
<el-button size="small" @click="successOrder">操作</el-button>
|
||||
</el-row>
|
||||
<el-descriptions title="基本信息:" class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="id">{{ imGroup.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="群名称">{{ imGroup.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="群头像">{{ imGroup.avatar }}</el-descriptions-item>
|
||||
<el-descriptions-item label="群主">{{ imGroup.master }}</el-descriptions-item>
|
||||
<el-descriptions-item label="公告">{{ imGroup.announcement }}</el-descriptions-item>
|
||||
<el-descriptions-item label="需要审核吗">{{ imGroup.needCheck }}</el-descriptions-item>
|
||||
<el-descriptions-item label="租户ID">{{ imGroup.tenantId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="删除标志(0代表存在">{{ imGroup.delFlag }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者">{{ imGroup.createBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ imGroup.createTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新者">{{ imGroup.updateBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ imGroup.updateTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ imGroup.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getImGroup } from "@/api/im/imGroup";
|
||||
|
||||
export default {
|
||||
name: "imGroup",
|
||||
props:{
|
||||
id:undefined
|
||||
},
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// IM组表格数据
|
||||
imGroup: {}
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM组列表 */
|
||||
initData() {
|
||||
this.loading = true;
|
||||
getImGroup(this.id).then(response => {
|
||||
this.imGroup = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
.margin-top{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.printMeClass {
|
||||
font-family: SimHei;
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,472 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<!--
|
||||
<el-form-item label="" prop="orderFrom">
|
||||
<el-select v-model="queryParams.orderFrom" placeholder="平台" clearable filterable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in orderFromOptions"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="pri">
|
||||
<el-select v-model="queryParams.pri" clearable="" @change="handleQuery" placeholder="任务状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_pri_level"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
-->
|
||||
|
||||
<el-form-item label="" prop="state">
|
||||
<el-input
|
||||
v-model="queryParams.state"
|
||||
placeholder="审核状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="message">
|
||||
<el-input
|
||||
v-model="queryParams.message"
|
||||
placeholder="申请信息"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="delFlag">
|
||||
<el-input
|
||||
v-model="queryParams.delFlag"
|
||||
placeholder="删除标志(0代表存在"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="备注"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['im:imGroupUser:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['im:imGroupUser:edit']"
|
||||
>修改</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['im:imGroupUser:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['im:imGroupUser:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="imGroupUserList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
<span v-text="getIndex(scope.$index)"> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--
|
||||
<el-table-column label="xxx" align="left" prop="xxx" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleView(scope.row)">{{scope.row.orderSn}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="结算状态" align="center" prop="settleStatus" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.settleStatus == 0" style="color:red;">
|
||||
<span class="el-tag el-tag--info">未结算</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 10" style="color:red;">
|
||||
<span class="el-tag">待确认</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 11" style="color:green;">
|
||||
<span class="el-tag el-tag--success el-tag--light">已确认</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 20" >
|
||||
<span class="el-tag el-tag--warning el-tag--light">待打款</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 21" style="color:green;">
|
||||
<span class="el-tag el-tag--success el-tag--light">已打款</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 40" style="color:red;">
|
||||
<span class="el-tag el-tag--danger">已拒绝</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<el-table-column label="审核状态" align="center" prop="state" min-width="100" />
|
||||
<el-table-column label="申请信息" align="center" prop="message" min-width="100" />
|
||||
<el-table-column label="删除标志(0代表存在" align="center" prop="delFlag" min-width="100" />
|
||||
<el-table-column label="备注" align="center" prop="remark" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['im:imGroupUser:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['im:imGroupUser:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改IM组用户对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核状态" prop="state">
|
||||
<el-input v-model="form.state" placeholder="请输入审核状态" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请信息" prop="message">
|
||||
<el-input v-model="form.message" placeholder="请输入申请信息" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="删除标志(0代表存在" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标志(0代表存在" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<ImGroupUserDetail :id="id" ></ImGroupUserDetail>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listImGroupUser, getImGroupUser, delImGroupUser, addImGroupUser, updateImGroupUser } from "@/api/im/imGroupUser";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import ImGroupUserDetail from '@/views/im/imGroupUser/view';
|
||||
|
||||
export default {
|
||||
name: "imGroupUser",
|
||||
components: { elDateSimplePicker,ImGroupUserDetail },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 搜索下拉
|
||||
// itemOptions:[],
|
||||
// 下拉枚举
|
||||
// xxStatusOtions: [
|
||||
// {value: '0', label: 'xx1'},
|
||||
// {value: '10', label: 'xxx'},
|
||||
// ],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// IM组用户表格数据
|
||||
imGroupUserList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 备注时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 备注时间范围
|
||||
daterangeUpdateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
state: null,
|
||||
message: null,
|
||||
delFlag: null,
|
||||
remark: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
groupId: [
|
||||
{ required: true, message: "群id不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "用户id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM组用户列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||
}
|
||||
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
||||
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
||||
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||
}
|
||||
listImGroupUser(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.imGroupUserList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
groupId: null,
|
||||
userId: null,
|
||||
state: null,
|
||||
message: null,
|
||||
tenantId: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getImGroupUser(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/im/imGroupUser/viewDetail', query: { id: row.id }})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateImGroupUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addImGroupUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delImGroupUser(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('im/imGroupUser/export', {
|
||||
// ...this.queryParams
|
||||
// }, `imGroupUser_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listImGroupUser(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','群id','用户id','审核状态','申请信息','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注',];
|
||||
const filterVal = ['id','groupId','userId','state','message','tenantId','delFlag','createBy','createTime','updateBy','updateTime','remark',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: 'IM组用户',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,86 +0,0 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<el-row>
|
||||
<el-button icon="el-icon-arrow-left" size="small" @click="backClick">返回</el-button>
|
||||
<el-button size="small" @click="successOrder">操作</el-button>
|
||||
</el-row>
|
||||
<el-descriptions title="基本信息:" class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="id">{{ imGroupUser.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="群id">{{ imGroupUser.groupId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="用户id">{{ imGroupUser.userId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="审核状态">{{ imGroupUser.state }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请信息">{{ imGroupUser.message }}</el-descriptions-item>
|
||||
<el-descriptions-item label="租户ID">{{ imGroupUser.tenantId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="删除标志(0代表存在">{{ imGroupUser.delFlag }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建者">{{ imGroupUser.createBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ imGroupUser.createTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新者">{{ imGroupUser.updateBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ imGroupUser.updateTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ imGroupUser.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getImGroupUser } from "@/api/im/imGroupUser";
|
||||
|
||||
export default {
|
||||
name: "imGroupUser",
|
||||
props:{
|
||||
id:undefined
|
||||
},
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// IM组用户表格数据
|
||||
imGroupUser: {}
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM组用户列表 */
|
||||
initData() {
|
||||
this.loading = true;
|
||||
getImGroupUser(this.id).then(response => {
|
||||
this.imGroupUser = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
.margin-top{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.printMeClass {
|
||||
font-family: SimHei;
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,450 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<!--
|
||||
<el-form-item label="" prop="orderFrom">
|
||||
<el-select v-model="queryParams.orderFrom" placeholder="平台" clearable filterable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in orderFromOptions"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="pri">
|
||||
<el-select v-model="queryParams.pri" clearable="" @change="handleQuery" placeholder="任务状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_pri_level"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
-->
|
||||
|
||||
<el-form-item label="" prop="sendTime">
|
||||
<el-input
|
||||
v-model="queryParams.sendTime"
|
||||
placeholder="发送时间"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="content">
|
||||
<el-input
|
||||
v-model="queryParams.content"
|
||||
placeholder="内容"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="type">
|
||||
<el-input
|
||||
v-model="queryParams.type"
|
||||
placeholder="类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="readStatus">
|
||||
<el-input
|
||||
v-model="queryParams.readStatus"
|
||||
placeholder="读状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['im:imMessage:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['im:imMessage:edit']"
|
||||
>修改</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['im:imMessage:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['im:imMessage:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="imMessageList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
<span v-text="getIndex(scope.$index)"> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--
|
||||
<el-table-column label="xxx" align="left" prop="xxx" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleView(scope.row)">{{scope.row.orderSn}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="结算状态" align="center" prop="settleStatus" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.settleStatus == 0" style="color:red;">
|
||||
<span class="el-tag el-tag--info">未结算</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 10" style="color:red;">
|
||||
<span class="el-tag">待确认</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 11" style="color:green;">
|
||||
<span class="el-tag el-tag--success el-tag--light">已确认</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 20" >
|
||||
<span class="el-tag el-tag--warning el-tag--light">待打款</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 21" style="color:green;">
|
||||
<span class="el-tag el-tag--success el-tag--light">已打款</span>
|
||||
</div>
|
||||
<div v-if="scope.row.settleStatus == 40" style="color:red;">
|
||||
<span class="el-tag el-tag--danger">已拒绝</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<el-table-column label="接收人" align="center" prop="toId" min-width="100" />
|
||||
<el-table-column label="发送人" align="center" prop="fromId" min-width="100" />
|
||||
<el-table-column label="发送时间" align="center" prop="sendTime" min-width="100" />
|
||||
<el-table-column label="内容" align="center" prop="content" min-width="100" />
|
||||
<el-table-column label="类型" align="center" prop="type" min-width="100" />
|
||||
<el-table-column label="读状态" align="center" prop="readStatus" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['im:imMessage:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['im:imMessage:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page-sizes="[20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-size="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改IM消息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="发送时间" prop="sendTime">
|
||||
<el-input v-model="form.sendTime" placeholder="请输入发送时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input v-model="form.content" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-input v-model="form.type" placeholder="请输入类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="读状态" prop="readStatus">
|
||||
<el-input v-model="form.readStatus" placeholder="请输入读状态" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<ImMessageDetail :id="id" ></ImMessageDetail>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listImMessage, getImMessage, delImMessage, addImMessage, updateImMessage } from "@/api/im/imMessage";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import ImMessageDetail from '@/views/im/imMessage/view';
|
||||
|
||||
export default {
|
||||
name: "imMessage",
|
||||
components: { elDateSimplePicker,ImMessageDetail },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 搜索下拉
|
||||
// itemOptions:[],
|
||||
// 下拉枚举
|
||||
// xxStatusOtions: [
|
||||
// {value: '0', label: 'xx1'},
|
||||
// {value: '10', label: 'xxx'},
|
||||
// ],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// IM消息表格数据
|
||||
imMessageList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
sendTime: null,
|
||||
content: null,
|
||||
type: null,
|
||||
readStatus: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM消息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listImMessage(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.imMessageList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
toId: null,
|
||||
fromId: null,
|
||||
sendTime: null,
|
||||
content: null,
|
||||
type: null,
|
||||
readStatus: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getImMessage(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/im/imMessage/viewDetail', query: { id: row.id }})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateImMessage(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addImMessage(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delImMessage(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('im/imMessage/export', {
|
||||
// ...this.queryParams
|
||||
// }, `imMessage_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listImMessage(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','接收人','发送人','发送时间','内容','类型','读状态',];
|
||||
const filterVal = ['id','toId','fromId','sendTime','content','type','readStatus',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: 'IM消息',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
}
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,81 +0,0 @@
|
||||
<template>
|
||||
<div class="">
|
||||
<el-row>
|
||||
<el-button icon="el-icon-arrow-left" size="small" @click="backClick">返回</el-button>
|
||||
<el-button size="small" @click="successOrder">操作</el-button>
|
||||
</el-row>
|
||||
<el-descriptions title="基本信息:" class="margin-top" :column="1" border>
|
||||
<el-descriptions-item label="id">{{ imMessage.id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="接收人">{{ imMessage.toId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发送人">{{ imMessage.fromId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="发送时间">{{ imMessage.sendTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="内容">{{ imMessage.content }}</el-descriptions-item>
|
||||
<el-descriptions-item label="类型">{{ imMessage.type }}</el-descriptions-item>
|
||||
<el-descriptions-item label="读状态">{{ imMessage.readStatus }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getImMessage } from "@/api/im/imMessage";
|
||||
|
||||
export default {
|
||||
name: "imMessage",
|
||||
props:{
|
||||
id:undefined
|
||||
},
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// IM消息表格数据
|
||||
imMessage: {}
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询IM消息列表 */
|
||||
initData() {
|
||||
this.loading = true;
|
||||
getImMessage(this.id).then(response => {
|
||||
this.imMessage = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
||||
.margin-top{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.printMeClass {
|
||||
font-family: SimHei;
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user