|
@@ -13,10 +13,26 @@
|
|
|
<!--
|
|
<!--
|
|
|
要resetFields起作用,必须配置:model和prop
|
|
要resetFields起作用,必须配置:model和prop
|
|
|
-->
|
|
-->
|
|
|
- <el-form ref="queryForm" :model="queryModel" inline class="demo-form-inline">
|
|
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ ref="queryForm"
|
|
|
|
|
+ :model="queryModel"
|
|
|
|
|
+ inline
|
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
|
+ >
|
|
|
<el-form-item label="标题" prop="title">
|
|
<el-form-item label="标题" prop="title">
|
|
|
<el-input type="text" size="mini" v-model="queryModel.title"></el-input>
|
|
<el-input type="text" size="mini" v-model="queryModel.title"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="类型" prop="title">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="queryModel.type"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ style="width: 90%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option label="全部" value=""></el-option>
|
|
|
|
|
+ <el-option label="站内消息" value="1"></el-option>
|
|
|
|
|
+ <el-option label="微信消息" value="2"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
@@ -24,26 +40,36 @@
|
|
|
icon="ios-search"
|
|
icon="ios-search"
|
|
|
@click="changePage(1)"
|
|
@click="changePage(1)"
|
|
|
:loading="loading"
|
|
:loading="loading"
|
|
|
- >查询</el-button>
|
|
|
|
|
|
|
+ >查询</el-button
|
|
|
|
|
+ >
|
|
|
<el-button
|
|
<el-button
|
|
|
type="info"
|
|
type="info"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
style="margin-left: 8px"
|
|
style="margin-left: 8px"
|
|
|
@click="handleReset('queryForm')"
|
|
@click="handleReset('queryForm')"
|
|
|
- >重置</el-button>
|
|
|
|
|
|
|
+ >重置</el-button
|
|
|
|
|
+ >
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<el-divider></el-divider>
|
|
<el-divider></el-divider>
|
|
|
<el-row class="button-group">
|
|
<el-row class="button-group">
|
|
|
- <el-button type="primary" size="small" plain icon="el-icon-circle-plus" @click="handleAdd">新增</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ plain
|
|
|
|
|
+ icon="el-icon-circle-plus"
|
|
|
|
|
+ @click="handleAdd"
|
|
|
|
|
+ >新增</el-button
|
|
|
|
|
+ >
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
|
plain
|
|
plain
|
|
|
icon="el-icon-remove"
|
|
icon="el-icon-remove"
|
|
|
- :disabled="multipleSelection.length==0"
|
|
|
|
|
|
|
+ :disabled="multipleSelection.length == 0"
|
|
|
@click="handleBatchDelete"
|
|
@click="handleBatchDelete"
|
|
|
- >删除选中项</el-button>
|
|
|
|
|
|
|
+ >删除选中项</el-button
|
|
|
|
|
+ >
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-table
|
|
<el-table
|
|
|
ref="formTable"
|
|
ref="formTable"
|
|
@@ -55,17 +81,51 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column prop="title" label="发送单位" width="300"></el-table-column>
|
|
|
|
|
- <el-table-column prop="noticeCompany" label="标题" width="300"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="type" label="发送类型" width="100">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <span v-if="row.type == 1" style="color: green">站内消息</span>
|
|
|
|
|
+ <span v-else-if="row.type == 2" style="color: red">微信</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="title" label="标题" width="300"></el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="noticeCompany"
|
|
|
|
|
+ label="接收单位"
|
|
|
|
|
+ width="300"
|
|
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column prop="point" label="积分" width="80"></el-table-column>
|
|
<el-table-column prop="point" label="积分" width="80"></el-table-column>
|
|
|
<el-table-column prop="status" label="审核" width="120">
|
|
<el-table-column prop="status" label="审核" width="120">
|
|
|
- <template slot-scope="{row}">{{row.status? "已审核" : "未审核"}}</template>
|
|
|
|
|
|
|
+ <template slot-scope="{ row }">{{
|
|
|
|
|
+ row.status ? "已审核" : "未审核"
|
|
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="createTime" label="发送时间" width="280"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="sendWechat" label="发送状态" width="120">
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <span v-if="row.type == 2">
|
|
|
|
|
+ {{ row.sendWechat ? "已发送微信消息" : "未发送" }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="createTime"
|
|
|
|
|
+ label="发送时间"
|
|
|
|
|
+ width="280"
|
|
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column label="操作" width="480">
|
|
<el-table-column label="操作" width="480">
|
|
|
- <template slot-scope="{row}">
|
|
|
|
|
- <el-button size="mini" type="warning" @click="handleEdit(row)">修改</el-button>
|
|
|
|
|
- <el-button size="mini" type="danger" @click="handleDelete(row)">删除</el-button>
|
|
|
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="sendWechat(row)"
|
|
|
|
|
+ v-if="row.type == '2' && row.sendWechat == 0"
|
|
|
|
|
+ >发送消息</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button size="mini" type="warning" @click="handleEdit(row)"
|
|
|
|
|
+ >修改</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button size="mini" type="danger" @click="handleDelete(row)"
|
|
|
|
|
+ >删除</el-button
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -101,6 +161,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
queryModel: {
|
|
queryModel: {
|
|
|
title: "",
|
|
title: "",
|
|
|
|
|
+ type: "",
|
|
|
},
|
|
},
|
|
|
loading: false,
|
|
loading: false,
|
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -134,6 +195,7 @@ export default {
|
|
|
formData.append("pageSize", self.pageSize);
|
|
formData.append("pageSize", self.pageSize);
|
|
|
|
|
|
|
|
formData.append("title", self.queryModel.title);
|
|
formData.append("title", self.queryModel.title);
|
|
|
|
|
+ formData.append("type", self.queryModel.type);
|
|
|
|
|
|
|
|
if (this.field != null) {
|
|
if (this.field != null) {
|
|
|
formData.append("field", this.field);
|
|
formData.append("field", this.field);
|
|
@@ -250,6 +312,31 @@ export default {
|
|
|
this.changePage(this.pageIndex);
|
|
this.changePage(this.pageIndex);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ sendWechat(record) {
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var formData = new FormData();
|
|
|
|
|
+
|
|
|
|
|
+ formData.append("id", record.id);
|
|
|
|
|
+ this.$confirm("确认发送微信通知?", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ self.loading = true;
|
|
|
|
|
+ messageNoticeApi.sendWechat(formData).then(function (response) {
|
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
|
+ self.changePage(self.pageIndex);
|
|
|
|
|
+
|
|
|
|
|
+ self.$message({
|
|
|
|
|
+ type: "success",
|
|
|
|
|
+ message: "发送成功!",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
mounted: function () {
|
|
mounted: function () {
|
|
|
var self = this;
|
|
var self = this;
|