中台系统设置部分Bug;首页通知中心接口

This commit is contained in:
Lx 2024-10-18 18:17:40 +08:00
parent eabfb9bd1f
commit 435b10db7b
4 changed files with 68 additions and 43 deletions

View File

@ -466,7 +466,7 @@
<div class="d-s" style="justify-content: space-between">
</div>
<div class="d-s" style="justify-content: space-between">
<el-form-item label="背景图" style="width: 45%;">
<el-form-item label="背景图" required style="width: 45%;" prop="backgroundImage">
<imgUpload :limit="1" v-model="ruleForm.backgroundImage"></imgUpload>
</el-form-item>
<el-form-item label="备注" style="width: 50%;">
@ -772,6 +772,7 @@ export default {
getNumLimit: [{required: true, message: '请输入每人领券限制'}],
tfTotal: [{required: true, message: '请输入投放总数'}],
dayGetLimit: [{required: true, message: '请输入每日领券限制'}],
backgroundImage: [{required: true, message: '请上传背景图'}],
//
useType: [
{

View File

@ -8,55 +8,53 @@
<div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" style="width: 100%" :inline="true" >
<el-form-item label="" prop="deptName">
<el-input
v-model="queryParams.content"
placeholder="请输入选择通知内容的关键词"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="notificationType">
<el-select v-model="queryParams.notificationType" placeholder="请选择通知类型" clearable style="width: 240px;">
<el-option label="到期提醒" value="到期提醒"></el-option>
<el-option label="库存预警" value="库存预警"></el-option>
<!-- 添加其他选项 -->
</el-select>
</el-form-item>
<el-form-item label="" prop="payUser">
<el-input
v-model="queryParams.payUser"
placeholder="请输入通知内容的关键词"
clearable
/>
</el-form-item>
<el-form-item label="" prop="payUser">
<el-input
v-model="queryParams.payUser"
placeholder="请选择通知类型"
clearable
/>
</el-form-item>
<el-form-item >
</el-form-item>
</el-form>
<div style="height: 32px;width: 20%;display: flex;justify-content: flex-end">
<el-button type="primary" icon="el-icon-search" @click="">查询</el-button>
<el-button icon="el-icon-refresh" @click="">重置</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
<div class="table-box">
<el-table
:data="list"
:data="tableData"
border
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column label="通知类型" align="center" prop="orderNo" width="220"/>
<el-table-column label="通知内容" align="center" prop="terminal"/>
<el-table-column label="创建人" align="center" prop="terminal"/>
<el-table-column label="创建时间" align="center" prop="terminal"/>
<el-table-column label="发送时间" align="center" prop="terminal"/>
<el-table-column label="通知类型" align="center" prop="notificationType" width="220"/>
<el-table-column label="通知内容" align="center" prop="templateContent"/>
<el-table-column label="创建人" align="center" prop="createName"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<el-table-column label="发送时间" align="center" prop="createTime"/>
</el-table>
<div class="pagination-box">
<el-pagination
background
layout="prev, pager, next"
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@current-change="getList">
</el-pagination>
@pagination="getList"
/>
</div>
</div>
@ -64,11 +62,13 @@
</div>
</template>
<script>
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
export default {
name: "order_Goods",
data() {
return {
List:[],
tableData: [],
beginTime:'',
endTime:'',
queryParams: {
@ -79,9 +79,26 @@ export default {
}
},
created() {
this.getList()
},
methods:{
handleQuery(){
this.getList()
},
resetQuery(){
this.queryParams = {
page: 1,
pageSize: 10,
deviceName:'',
},
this.getList()
},
getList(){
getNotificationlogList(this.queryParams).then(res=>{
this.tableData = res.data.records;
this.total = res.data.total
})
},
goback(){
this.$router.go(-1)

View File

@ -126,7 +126,7 @@
</el-form-item>
<!-- 通知模板 -->
<el-form-item label="通知模板" prop="templateContent">
<el-form-item label="通知内容" prop="templateContent">
<el-input type="textarea" v-model="form.templateContent" placeholder="请输入通知内容" :maxlength="200"
show-word-limit style="width: 300px;"></el-input>
</el-form-item>
@ -147,9 +147,9 @@
align-items: center; /* 垂直居中 */ ">
<img src="../../notify/page/img/icon-adduser@3x.png">
</div>
<div v-for="item in form.recipientUser" :key="item.id">
<div v-for="item in form.recipientUser" :key="item.staffId">
<el-badge value="x" class="item" style="margin-left: 10px">
<el-button @click="clickUser(item.id)" size="mini">{{ item.userName }}</el-button>
<el-button @click="clickUser(item.staffId)" size="mini">{{ item.userName }}</el-button>
</el-badge>
</div>
</div>
@ -157,9 +157,9 @@
</el-form-item>
<!-- 模板状态 -->
<el-form-item label="模板状态" prop="templateStatus">
<el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
</el-form-item>
<!-- <el-form-item label="模板状态" prop="templateStatus" >-->
<!-- <el-switch v-model="form.templateStatus" active-color="#13ce66" inactive-color="#ff4949"></el-switch>-->
<!-- </el-form-item>-->
</el-form>
<div style="margin-left: 160px;">
<el-button style="margin-right: 20px" type="primary" @click="userEnter1('form')">确定</el-button>
@ -328,10 +328,12 @@ export default {
this.form.recipientUser.push({
id: item.acctId,
userName: item.accountName,
realName: item.realName,
})
this.getroleStaff.push({
id: item.acctId,
userName: item.accountName,
realName: item.realName,
})
})
@ -462,7 +464,7 @@ export default {
},
handleSelectionChange(val) {
console.log("valval", val)
this.linshicunshu = [],
this.linshicunshu = []
// this.form.recipientUser = []
@ -507,8 +509,8 @@ export default {
}
);
},
clickUser(id) {
this.form.recipientUser = this.form.recipientUser.filter(item => item.id !== id);
clickUser(staffId) {
this.form.recipientUser = this.form.recipientUser.filter(item => item.staffId !== staffId);
},
@ -519,11 +521,13 @@ export default {
},
userEnter() {
this.open1 = false
// if(this.form.recipientUser === null){
// this.form.recipientUser = []
// }
console.log("this.linshicunshu", this.linshicunshu)
// this.form.recipientUser = [],
this.form.recipientUser.push(...this.linshicunshu)
console.log("this.recipientUser", this.form.recipientUser)
this.cenDis()
// this.form.recipientUser.push(...this.getroleStaff)
},
toggleSelection(rows) {

View File

@ -50,6 +50,9 @@ id,notify_id,sent_to,sent_at,status,error_message
<if test="entity.notificationType != null and entity.notificationType != ''">
and sn.notification_type = #{entity.notificationType}
</if>
<if test="entity.content != null and entity.content != ''">
and sn.template_content LIKE CONCAT('%', #{entity.content}, '%')
</if>
</where>
ORDER BY snl.create_time DESC
</select>