Merge remote-tracking branch 'origin/master'

master
xs 4 months ago
commit 052a701266

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

@ -98,10 +98,11 @@ public class SysNoticeController extends BaseController
* @return * @return
*/ */
@GetMapping("/workshopNoticeList") @GetMapping("/workshopNoticeList")
public AjaxResult workshopNoticeList(SysNotice notice) public TableDataInfo workshopNoticeList(SysNotice notice)
{ {
startPage();
List<SysNotice> list = noticeService.workshopNoticeList(notice); 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"> <if test="userId != null">
AND b.user_id = #{userId} AND b.user_id = #{userId}
</if> </if>
<if test="userId != null"> <if test="checkStatus != null and checkStatus != ''">
AND b.check_status = #{checkStatus} AND b.check_status = #{checkStatus}
</if> </if>
</where> </where>

@ -1,42 +1,99 @@
<template> <template>
<el-dialog :visible.sync="visible" title="通知" width="50%"> <div class="navbar">
<el-form ref="form" :model="noticeListData" label-width="100px"> <div class="right-menu">
<el-row> <el-tooltip content="历史通知" class="right-menu-item hover-effect">
<el-col :span="12"> <span
<el-form-item label="公告标题:" prop="noticeTitle"> class="exceptionHandling"
<span>{{ noticeListData.noticeTitle }}</span> @click="getNoticeData(true)"
</el-form-item> ><i class="el-icon-message"></i>
</el-col> </span>
<el-col :span="12"> </el-tooltip>
<el-form-item label="公告类型" prop="noticeType"> </div>
<el-select v-model="noticeListData.noticeType" placeholder="请选择公告类型" disabled> <el-dialog :visible.sync="visible" title="通知" width="50%">
<el-option <el-form ref="form" :model="noticeListData" label-width="100px">
v-for="dict in dict.type.sys_notice_type" <el-row>
:key="dict.value" <el-col :span="12">
:label="dict.label" <el-form-item label="公告标题:" prop="noticeTitle">
:value="dict.value" <span>{{ noticeListData.noticeTitle }}</span>
></el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="12">
</el-col> <el-form-item label="公告类型" prop="noticeType">
<el-col :span="24"> <el-select v-model="noticeListData.noticeType" placeholder="请选择公告类型" disabled>
<el-form-item label="内容"> <el-option
<ReadOnlyEditor v-model="noticeListData.noticeContent" :min-height="192"/> v-for="dict in dict.type.sys_notice_type"
<DownloadFile v-model="noticeListData.attachPath" @file-clicked="handleFileClick"/> :key="dict.value"
</el-form-item> :label="dict.label"
</el-col> :value="dict.value"
</el-row> ></el-option>
</el-form> </el-select>
<span slot="footer" class="dialog-footer"> </el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="内容">
<ReadOnlyEditor v-model="noticeListData.noticeContent" :min-height="192"/>
<DownloadFile v-model="noticeListData.attachPath" @file-clicked="handleFileClick"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">关闭</el-button> <el-button @click="visible = false">关闭</el-button>
</span> </span>
</el-dialog> </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> </template>
<script> <script>
import ReadOnlyEditor from "@/components/ReadOnlyEditor/index.vue"; import ReadOnlyEditor from "@/components/ReadOnlyEditor/index.vue";
import DownloadFile from "@/components/DownloadFile/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"; import {parseTime} from "@/utils/ruoyi";
export default { export default {
@ -55,6 +112,26 @@ export default {
default: () => [], default: () => [],
}, },
}, },
data() {
return {
noticeOpen: false,
noticeLoading: false,
historyNoticeList: [],
noticeTotal: 0,
//
routerIds: [],
//
single: true,
//
multiple: true,
//
queryParams: {
pageNum: 1,
pageSize: 10,
noticeType: '1'
},
};
},
methods: { methods: {
handleFileClick(fileUrl) { handleFileClick(fileUrl) {
console.log('已下载文件:', fileUrl); console.log('已下载文件:', fileUrl);
@ -64,7 +141,89 @@ export default {
userNotice.checkTime = null; userNotice.checkTime = null;
updateUserNotice(userNotice).then(res => { 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> </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() { mounted() {
setInterval(() => { setInterval(() => this.workshopNoticeTasks(), 60 * 1000)
},
methods: {
workshopNoticeTasks() {
if (this.notificationInstance) {
this.notificationInstance.close(); // 手动关闭通知
}
workshopNoticeList({noticeType: '1', checkStatus: '0'}).then(res => { workshopNoticeList({noticeType: '1', checkStatus: '0'}).then(res => {
this.noticeList = res.data; this.noticeList = res.rows;
if (this.noticeList.length > 0) { if (this.noticeList.length > 0) {
this.notificationInstance = this.$notify.info({ this.notificationInstance = this.$notify.info({
title: '通知', title: '通知',
@ -35,9 +41,9 @@ export const noticeData = {
}); });
} }
}); });
}, 60 * 1000) },
},
methods: { //点击查看弹窗逻辑
handleNotificationClick() { handleNotificationClick() {
this.noticeListData = this.noticeList[0]; this.noticeListData = this.noticeList[0];
let userNotice = this.noticeListData.sysUserNoticeList[0]; let userNotice = this.noticeListData.sysUserNoticeList[0];
@ -51,7 +57,7 @@ export const noticeData = {
this.notificationInstance.close(); // 手动关闭通知 this.notificationInstance.close(); // 手动关闭通知
} }
}, },
} },
}; };

@ -202,7 +202,7 @@
<!-- >{{dict.label}}</el-radio>--> <!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>--> <!-- </el-radio-group>-->
<!-- </el-form-item>--> <!-- </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-group v-model="form.checkType">
<el-radio <el-radio
v-for="dict in dict.type.check_type" v-for="dict in dict.type.check_type"

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

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

Loading…
Cancel
Save