中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

834 lines
30 KiB

7 months ago
<template>
6 months ago
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
7 months ago
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
6 months ago
@refresh-change="refreshChange" @on-load="onLoad">
<template #menu-left>
5 months ago
<el-button type="primary" @click="addInfo()">新增
6 months ago
</el-button>
5 months ago
<el-button type="danger" @click="handleDelete">
6 months ago
</el-button>
5 months ago
<el-button type="primary" @click="handleSetting">批量设置
6 months ago
</el-button>
</template>
<template #menu-right>
<el-button type="primary" @click="handleImport">导入
</el-button>
</template>
6 months ago
<template #menu="{ row }">
<el-button type="primary" text plain style="border: 0; background-color: transparent !important"
size="medium" @click.stop="handleIssue(row)">下发</el-button>
</template>
</avue-crud>
6 months ago
<el-dialog title="导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
</avue-form>
</el-dialog>
<el-dialog title="批量设置" append-to-body v-model="setBox" width="555px">
<el-form v-model="settingForm" label-width="80px">
<el-form-item label="主管工艺">
<el-select v-model="settingForm.chargeCraft"></el-select>
</el-form-item>
<el-form-item label="化验人">
<el-select v-model="settingForm.chargeCraft"></el-select>
</el-form-item>
<el-form-item label="班组">
<el-select v-model="settingForm.chargeCraft"></el-select>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="setBox = false"> </el-button>
<el-button type="primary" @click="setBox = false"> </el-button>
</span>
7 months ago
</template>
6 months ago
</el-dialog>
5 months ago
<!-- 下发选择人员 -->
<dispatcherDialog v-if="isOpen" :showDialog="isOpen" @closeDialog="closeDialog"></dispatcherDialog>
<!-- 新增 编辑 -->
<addEditInfoDialog v-if="isInfoOpen" :show-dialog="isInfoOpen" @closeDialog="closeDialog"></addEditInfoDialog>
6 months ago
</basic-container>
7 months ago
</template>
<script>
5 months ago
import dispatcherDialog from './components/dispatcherDialog.vue'
import addEditInfoDialog from './components/addEditInfoDialog.vue'
7 months ago
export default {
5 months ago
components: { dispatcherDialog, addEditInfoDialog },
6 months ago
data() {
return {
months: [
'一月', '二月', '三月', '四月', '五月', '六月',
'七月', '八月', '九月', '十月', '十一月', '十二月'
],
daysDatas: [
'1', '2', '3', '4', '5', '6',
'7', '8', '9', '10', '11', '12', , '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'
],
excelBox: false,
loading: false,
setBox: false,
data: [],
settingForm: {},
checkList: [1, 2, 3, 4, 5, 6, 7],
option: {
height: 'auto',
7 months ago
calcHeight: 32,
7 months ago
tip: false,
size: 'medium',
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: true,
delBtn: true,
5 months ago
addBtn: false,
7 months ago
editBtnText: '修改',
addBtnIcon: ' ',
5 months ago
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
6 months ago
viewBtnText: '详情',
7 months ago
labelWidth: 120,
7 months ago
menuWidth: 220,
7 months ago
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
7 months ago
columnSort: true,
7 months ago
excelBtn: true,
6 months ago
columnSort: true,
7 months ago
index: false,
showOverflowTooltip: true,
5 months ago
searchLabelPosition: 'left',
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
align: 'center',
6 months ago
column: [
7 months ago
{
label: '作业中心',
prop: 'wcName',
type: 'select',
sortable: true,
6 months ago
width: 150,
7 months ago
filter: true,
span: 8,
6 months ago
search: true,
7 months ago
rules: [
{
required: true,
message: '请输入作业中心',
trigger: 'blur',
},
],
dicData: [
{
label: '化学镀镍作业中心',
value: 0
6 months ago
},
7 months ago
{
label: '镀后库作业中心',
value: 1
}
]
},
{
6 months ago
label: '作业槽',
7 months ago
prop: 'slotNo',
search: true,
6 months ago
type: 'select',
7 months ago
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
span: 8,
dicData: [
{
label: '#22',
value: 0
6 months ago
},
7 months ago
{
label: '#21',
value: 1
}
],
rules: [
{
required: true,
message: '请输入槽号',
trigger: 'blur',
},
],
},
5 months ago
{
label: '药品名称',
prop: 'drugName',
search: false,
type: 'select',
sortable: true,
width: 120,
filter: true,
span: 8,
dicData: [
{
label: '药品一',
value: 0
},
{
label: '药品二',
value: 1
}
],
},
{
label: '药品物料号',
prop: 'drugNo',
search: false,
type: 'select',
sortable: true,
width: 120,
filter: true,
span: 8,
hide: true,
rules: [
{
required: true,
message: '请输入药品物料号',
trigger: 'blur',
},
],
dicData: [
{
label: '物料一',
value: 0
},
{
label: '物料二',
value: 1
}
],
},
{
label: '药品物料名称',
prop: 'drugNoName',
disabled: true,
search: false,
sortable: true,
width: 150,
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入药品物料号',
trigger: 'blur',
},
],
},
7 months ago
{
6 months ago
label: '分析项目',
7 months ago
prop: 'testEle',
5 months ago
search: true,
7 months ago
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
6 months ago
message: '请输入分析项目',
7 months ago
trigger: 'blur',
},
],
},
{
6 months ago
label: '规范上下限',
7 months ago
prop: 'proContent',
search: false,
sortable: true,
6 months ago
width: 120,
filter: true,
hide: true,
span: 8,
rules: [
{
required: true,
message: '请输入规范上下限',
trigger: 'blur',
},
],
},
{
label: '规范上限',
prop: 'targetLimit1',
search: false,
sortable: true,
width: 120,
filter: true,
display: false,
// hide:true,
span: 8,
rules: [
{
required: true,
message: '请输入目标上限',
trigger: 'blur',
},
],
},
{
label: '规范下限',
prop: 'targetLimit2',
search: false,
sortable: true,
width: 120,
7 months ago
filter: true,
6 months ago
display: false,
// hide:true,
7 months ago
span: 8,
rules: [
{
required: true,
6 months ago
message: '请输入目标上限',
7 months ago
trigger: 'blur',
},
],
},
{
label: '目标上下限',
prop: 'targetLimit',
search: false,
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
6 months ago
hide: true,
7 months ago
span: 8,
rules: [
{
required: true,
message: '请输入目标上限',
trigger: 'blur',
},
],
},
{
label: '目标上限',
prop: 'targetUpperLimit',
search: false,
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
6 months ago
addDisplay: false,
viewDisplay: false,
editDisplay: false,
7 months ago
span: 8,
rules: [
{
required: true,
message: '请输入目标上限',
trigger: 'blur',
},
],
},
{
label: '目标下限',
prop: 'targetLowerLimit',
search: false,
sortable: true,
6 months ago
addDisplay: false,
viewDisplay: false,
editDisplay: false,
width: 120,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入目标下限',
trigger: 'blur',
},
],
},
{
label: '目标值',
prop: 'targetValue',
search: false,
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入目标值',
trigger: 'blur',
},
],
},
{
6 months ago
label: '体积',
7 months ago
prop: 'drugName',
search: false,
6 months ago
sortable: true,
width: 120,
filter: true,
span: 8,
},
{
label: '测量值单位',
prop: 'drugName',
search: false,
sortable: true,
width: 120,
filter: true,
span: 8,
},
{
label: '加药量单位',
prop: 'drugName',
search: false,
sortable: true,
width: 120,
6 months ago
filter: true,
span: 8,
},
{
label: '添加点',
prop: 'addPoints',
search: false,
sortable: true,
width: 120,
filter: true,
span: 8,
},
{
5 months ago
label: '加药量计算公式',
6 months ago
prop: '计算gongshi',
search: false,
7 months ago
type: 'select',
sortable: true,
5 months ago
width: 160,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
6 months ago
message: '请选择计算公式',
7 months ago
trigger: 'blur',
},
],
6 months ago
dicData: [
{
label: '公式一',
value: 0
},
{
label: '公式二',
value: 1
}
],
},
5 months ago
{
label: '添加后理论值',
prop: 'radio',
span: 13,
width: 130,
},
6 months ago
{
label: '温度',
prop: 'radio',
span: 13,
},
{
label: 'PH值',
prop: 'phfanwei',
span: 8,
width: 120,
},
5 months ago
6 months ago
7 months ago
{
5 months ago
label: '化验频率',
7 months ago
prop: 'assayCycle',
search: false,
sortable: true,
6 months ago
addDisplay: false,
viewDisplay: false,
editDisplay: false,
width: 120,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入分析周期',
trigger: 'blur',
},
],
},
{
6 months ago
label: '测试周期(天)',
7 months ago
prop: 'reallyDate',
search: false,
sortable: true,
6 months ago
type: 'date',
5 months ago
width: 140,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入有效期',
trigger: 'blur',
},
],
},
{
6 months ago
label: '有效期',
prop: 'reallyDate',
7 months ago
search: false,
sortable: true,
6 months ago
type: 'date',
width: 120,
7 months ago
filter: true,
span: 8,
5 months ago
display: false,
7 months ago
rules: [
{
required: true,
6 months ago
message: '请输入有效期',
7 months ago
trigger: 'blur',
},
],
},
{
6 months ago
label: '上次化验日期',
prop: 'lastTest',
7 months ago
search: false,
sortable: true,
6 months ago
addDisplay: false,
viewDisplay: false,
editDisplay: false,
width: 150,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
6 months ago
message: '请输入上次化验日期',
7 months ago
trigger: 'blur',
},
],
},
{
label: '化验人',
prop: 'userName',
6 months ago
type: 'select',
7 months ago
search: false,
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入化验人',
trigger: 'blur',
},
],
},
{
label: '主管工艺',
prop: 'chargeCraft',
6 months ago
type: 'select',
7 months ago
search: false,
sortable: true,
6 months ago
width: 120,
7 months ago
filter: true,
6 months ago
span: 8,
7 months ago
rules: [
{
required: true,
message: '请输入主管工艺',
trigger: 'blur',
},
],
},
6 months ago
{
label: '班组',
prop: 'userName',
type: 'select',
search: false,
sortable: true,
width: 120,
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入班组',
trigger: 'blur',
},
],
},
7 months ago
{
label: '更新时间',
prop: 'updateTime',
search: false,
sortable: true,
6 months ago
width: 120,
addDisplay: false,
viewDisplay: false,
editDisplay: false,
7 months ago
filter: true,
span: 8,
rules: [
{
required: true,
message: '请输入更新时间',
trigger: 'blur',
},
],
},
{
label: '分析周期',
prop: 'assayCycle1',
search: false,
sortable: true,
6 months ago
hide: true,
width: 120,
7 months ago
filter: true,
span: 24,
rules: [
{
required: true,
message: '请输入分析周期',
trigger: 'blur',
},
],
},
]
},
6 months ago
form: {
7 months ago
},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
6 months ago
excelOption: {
7 months ago
submitBtn: false,
emptyBtn: false,
column: [
{
label: '模板上传',
prop: 'excelFile',
type: 'upload',
drag: true,
loadText: '模板上传中,请稍等',
span: 24,
propsHttp: {
res: 'data',
},
tip: '请上传 .xls,.xlsx 标准格式文件',
action: '/blade-system/user/import-user',
},
{
label: '模板下载',
prop: 'excelTemplate',
formslot: true,
span: 24,
},
],
},
5 months ago
isOpen: false,
isInfoOpen:false,
7 months ago
}
},
6 months ago
mounted() {
7 months ago
},
6 months ago
methods: {
5 months ago
addInfo(){
this.isInfoOpen = true
},
closeDialog() {
this.isOpen = false
this.isInfoOpen = false
},
6 months ago
getName(val) {
7 months ago
return val == 1 ? '周一' : val == 2 ? '周二' : val == 3 ? '周三' : val == 4 ? '周四' : val == 5 ? '周五' : val == 6 ? '周六' : '周日'
},
handleImport() {
this.excelBox = true;
},
// 多选
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
rowUpdate(row, index, done, loading) {
6 months ago
7 months ago
},
rowSave(row, done, loading) {
6 months ago
7 months ago
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
rowDel(row, index, done) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
6 months ago
7 months ago
})
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
5 months ago
// 批量删除
7 months ago
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
})
},
5 months ago
// 批量设置
6 months ago
handleSetting() {
7 months ago
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.setBox = true
},
5 months ago
// 下发
6 months ago
handleIssue(row) {
5 months ago
this.isOpen = true
7 months ago
},
6 months ago
onLoad() {
7 months ago
this.loading = true
this.data = [
{
6 months ago
id: '1',
wcName: '化学镀镍作业中心',
slotNo: '11#氰化镀铜槽',
testEle: '碳酸钠',
proContent: '0',
targetUpperLimit: '10',
targetLowerLimit: '5',
targetValue: '3',
drugName: '111',
addPoints: '0',
5 months ago
assayCycle: 'N次/周',
reallyDate: '2025-10-09',
lastTest: '2023-06-13',
dueDate: '2023-06-20',
userName: '崔殿龙',
chargeCraft: '崔殿龙',
updateTime: '2024-01-12'
},
{
id: '2',
wcName: '化学镀镍作业中心',
slotNo: '22#氰化镀铜槽',
testEle: '碳酸钠',
proContent: '0',
targetUpperLimit: '10',
targetLowerLimit: '5',
targetValue: '3',
drugName: '111',
addPoints: '0',
assayCycle: 'N次/月',
6 months ago
reallyDate: '2025-10-09',
lastTest: '2023-06-13',
dueDate: '2023-06-20',
userName: '崔殿龙',
chargeCraft: '崔殿龙',
updateTime: '2024-01-12'
7 months ago
},
{
6 months ago
id: '2',
wcName: '化学镀镍作业中心',
slotNo: '22#氰化镀铜槽',
testEle: '碳酸钠',
proContent: '0',
targetUpperLimit: '10',
targetLowerLimit: '5',
targetValue: '3',
drugName: '111',
addPoints: '0',
5 months ago
assayCycle: 'N次/年',
6 months ago
reallyDate: '2025-10-09',
lastTest: '2023-06-13',
dueDate: '2023-06-20',
userName: '崔殿龙',
chargeCraft: '崔殿龙',
updateTime: '2024-01-12'
7 months ago
}
]
this.page.total = this.data.length
this.loading = false
6 months ago
setTimeout(() => {
7 months ago
this.selectionClear()
6 months ago
}, 500)
7 months ago
}
}
}
</script>
6 months ago
<style lang="scss" scoped></style>