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

View File

@ -8,55 +8,53 @@
<div class="top_new"> <div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" style="width: 100%" :inline="true" > <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-item> </el-form-item>
</el-form> </el-form>
<div style="height: 32px;width: 20%;display: flex;justify-content: flex-end"> <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 type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div> </div>
</div> </div>
<div class="table-box"> <div class="table-box">
<el-table <el-table
:data="list" :data="tableData"
border border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <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="notificationType" width="220"/>
<el-table-column label="通知内容" align="center" prop="terminal"/> <el-table-column label="通知内容" align="center" prop="templateContent"/>
<el-table-column label="创建人" align="center" prop="createName"/>
<el-table-column label="创建人" align="center" prop="terminal"/> <el-table-column label="创建时间" align="center" prop="createTime"/>
<el-table-column label="创建时间" align="center" prop="terminal"/> <el-table-column label="发送时间" align="center" prop="createTime"/>
<el-table-column label="发送时间" align="center" prop="terminal"/>
</el-table> </el-table>
<div class="pagination-box"> <div class="pagination-box">
<el-pagination <pagination
background
layout="prev, pager, next"
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.page" :page.sync="queryParams.page"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@current-change="getList"> @pagination="getList"
</el-pagination> />
</div> </div>
</div> </div>
@ -64,11 +62,13 @@
</div> </div>
</template> </template>
<script> <script>
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
export default { export default {
name: "order_Goods", name: "order_Goods",
data() { data() {
return { return {
List:[], tableData: [],
beginTime:'', beginTime:'',
endTime:'', endTime:'',
queryParams: { queryParams: {
@ -79,9 +79,26 @@ export default {
} }
}, },
created() {
this.getList()
},
methods:{ methods:{
handleQuery(){
this.getList()
},
resetQuery(){
this.queryParams = {
page: 1,
pageSize: 10,
deviceName:'',
},
this.getList()
},
getList(){ getList(){
getNotificationlogList(this.queryParams).then(res=>{
this.tableData = res.data.records;
this.total = res.data.total
})
}, },
goback(){ goback(){
this.$router.go(-1) this.$router.go(-1)

View File

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