Merge remote-tracking branch 'origin/master'

master
xs 4 months ago
commit 052a701266

@ -82,7 +82,7 @@
<include refid="selectMesBaseMaterialInfoVo"/>
<where>
<if test="erpId != null ">and bmi.erp_id = #{erpId}</if>
<if test="materialCode != null and materialCode != ''">and bmi.material_code = #{materialCode}</if>
<if test="materialCode != null and materialCode != ''">and bmi.material_code like concat('%', #{materialCode},'%')</if>
<if test="oldMaterialCode != null and oldMaterialCode != ''">and bmi.old_material_code = #{oldMaterialCode}
</if>
<if test="materialName != null and materialName != ''">and bmi.material_name like concat('%', #{materialName},

@ -98,10 +98,11 @@ public class SysNoticeController extends BaseController
* @return
*/
@GetMapping("/workshopNoticeList")
public AjaxResult workshopNoticeList(SysNotice notice)
public TableDataInfo workshopNoticeList(SysNotice notice)
{
startPage();
List<SysNotice> list = noticeService.workshopNoticeList(notice);
return success(list);
return getDataTable(list);
}
/**

@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">
AND b.user_id = #{userId}
</if>
<if test="userId != null">
<if test="checkStatus != null and checkStatus != ''">
AND b.check_status = #{checkStatus}
</if>
</where>

@ -1,4 +1,14 @@
<template>
<div class="navbar">
<div class="right-menu">
<el-tooltip content="历史通知" class="right-menu-item hover-effect">
<span
class="exceptionHandling"
@click="getNoticeData(true)"
><i class="el-icon-message"></i>
</span>
</el-tooltip>
</div>
<el-dialog :visible.sync="visible" title="通知" width="50%">
<el-form ref="form" :model="noticeListData" label-width="100px">
<el-row>
@ -31,12 +41,59 @@
<el-button @click="visible = false">关闭</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="noticeOpen" title="历史通知记录" width="50" append-to-body>
<el-table v-loading="noticeLoading" :data="historyNoticeList" >
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
<el-table-column
label="公告标题"
align="center"
prop="noticeTitle"
:show-overflow-tooltip="true"
/>
<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="viewContent(scope.row)"
>查看内容</el-button>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="noticeOpen = false">关闭</el-button>
</span>
<pagination
v-show="noticeTotal>0"
:total="noticeTotal"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getHistoryNoticeList"
/>
</el-dialog>
</div>
</template>
<script>
import ReadOnlyEditor from "@/components/ReadOnlyEditor/index.vue";
import DownloadFile from "@/components/DownloadFile/index.vue";
import {updateUserNotice} from "@/api/system/notice";
import {updateUserNotice, workshopNoticeList} from "@/api/system/notice";
import {parseTime} from "@/utils/ruoyi";
export default {
@ -55,6 +112,26 @@ export default {
default: () => [],
},
},
data() {
return {
noticeOpen: false,
noticeLoading: false,
historyNoticeList: [],
noticeTotal: 0,
//
routerIds: [],
//
single: true,
//
multiple: true,
//
queryParams: {
pageNum: 1,
pageSize: 10,
noticeType: '1'
},
};
},
methods: {
handleFileClick(fileUrl) {
console.log('已下载文件:', fileUrl);
@ -64,7 +141,89 @@ export default {
userNotice.checkTime = null;
updateUserNotice(userNotice).then(res => {
})
},
/** 报警列表 */
getNoticeData(open) {
this.noticeOpen = open;
this.noticeLoading = true;
this.getHistoryNoticeList();
},
getHistoryNoticeList() {
workshopNoticeList(this.queryParams).then((response) => {
this.historyNoticeList = response.rows;
this.noticeTotal = response.total;
this.noticeLoading = false;
});
},
viewContent(row){
this.noticeListData = row;
this.visible = true;
}
}
};
</script>
<style lang="scss" scoped>
.right-menu {
float: right;
height: 100%;
line-height: 50px;
&:focus {
outline: none;
}
.right-menu-item {
.right-menu {
float: right;
height: 100%;
line-height: 50px;
&:focus {
outline: none;
}
.right-menu-item {
display: inline-block;
padding: 0 8px;
height: 100%;
font-size: 18px;
color: #5a5e66;
vertical-align: text-bottom;
&.hover-effect {
cursor: pointer;
transition: background .3s;
&:hover {
background: rgba(0, 0, 0, .025)
}
}
}
.avatar-container {
margin-right: 30px;
.avatar-wrapper {
margin-top: 5px;
position: relative;
.user-avatar {
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 10px;
}
.el-icon-caret-bottom {
cursor: pointer;
position: absolute;
right: -20px;
top: 25px;
font-size: 12px;
}
}
}
}
}
}
</style>

@ -13,9 +13,15 @@ export const noticeData = {
};
},
mounted() {
setInterval(() => {
setInterval(() => this.workshopNoticeTasks(), 60 * 1000)
},
methods: {
workshopNoticeTasks() {
if (this.notificationInstance) {
this.notificationInstance.close(); // 手动关闭通知
}
workshopNoticeList({noticeType: '1', checkStatus: '0'}).then(res => {
this.noticeList = res.data;
this.noticeList = res.rows;
if (this.noticeList.length > 0) {
this.notificationInstance = this.$notify.info({
title: '通知',
@ -35,9 +41,9 @@ export const noticeData = {
});
}
});
}, 60 * 1000)
},
methods: {
//点击查看弹窗逻辑
handleNotificationClick() {
this.noticeListData = this.noticeList[0];
let userNotice = this.noticeListData.sysUserNoticeList[0];
@ -51,7 +57,7 @@ export const noticeData = {
this.notificationInstance.close(); // 手动关闭通知
}
},
}
},
};

@ -202,7 +202,7 @@
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="校验类型" prop="checkType">
<el-form-item label="校验类型" prop="checkType" v-if="form.topFlag === 0">
<el-radio-group v-model="form.checkType">
<el-radio
v-for="dict in dict.type.check_type"

@ -481,10 +481,7 @@ export default {
/** 查询物料类型信息下拉树结构 */
getTreeselect() {
listBaseMaterialType().then(response => {
this.baseMaterialTypeOptions = [];
const data = {matrialTypeId: 0, typeName: '顶级节点', children: []};
data.children = this.handleTree(response.data, "matrialTypeId", "parentId");
this.baseMaterialTypeOptions.push(data);
this.baseMaterialTypeOptions = this.handleTree(response.data, "matrialTypeId", "parentId");
});
},
/** 删除按钮操作 */

@ -85,6 +85,7 @@
<dict-tag :options="dict.type.process_type" :value="scope.row.processType"/>
</template>
</el-table-column>
<el-table-column label="所在楼层" align="center" prop="processFloor" v-if="columns[11].visible"/>
<el-table-column label="标准工时" align="center" prop="productionTime" v-if="columns[4].visible">
<template slot-scope="scope">
<span>{{ formatDayHourMinutes(scope.row.productionTime) }}</span>
@ -128,6 +129,7 @@
size="mini"
type="text"
icon="el-icon-s-check"
v-if="scope.row.processType !== '3'"
@click="handleUserUpdate(scope.row)"
>关联人员
</el-button>
@ -163,6 +165,9 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所在楼层" prop="processFloor">
<el-input v-model="form.processFloor" placeholder="请输入所在楼层"/>
</el-form-item>
<el-form-item label="标准工时" prop="productionTime">
<el-input-number v-model="form.productionTimeDays" placeholder="请输入天数" :min="0" :max="10000"
:controls="false" :style="{ width: '50px' }"/>
@ -362,6 +367,7 @@ export default {
processCode: null,
processName: null,
processType: null,
processFloor: null,
productionTime: null,
activeFlag: null,
remark: null,
@ -392,6 +398,7 @@ export default {
{key: 8, label: `创建时间`, visible: true},
{key: 9, label: `更新人`, visible: false},
{key: 10, label: `更新时间`, visible: true},
{key: 11, label: `所在楼层`, visible: true},
],
//线
prodLineList: [],
@ -433,6 +440,7 @@ export default {
processName: null,
processType: null,
productionTime: null,
processFloor: null,
productionTimeDays: 0,
productionTimeHours: 0,
productionTimeMinutes: 0,
@ -618,8 +626,13 @@ export default {
},
//username
handleSelectUser(){
const selected = this.userList.find(option => option.value === newValue);
handleSelectUser(row){
const selectedUser = this.userList.find(user => user.userId === row.userId);
if (selectedUser) {
row.userName = selectedUser.nickName;
} else {
row.userName = null;
}
},
/** 工序关联人员删除按钮操作 */

Loading…
Cancel
Save