feat:设备打签
This commit is contained in:
parent
38b6c60b96
commit
96689b7274
|
@ -4,29 +4,11 @@
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'equipment.create'">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'equipment.create'">新增</el-button>
|
||||||
<el-button type="primary" @click="echeckrecord" v-auth="'echeckrecord.create'">批量巡检</el-button>
|
<el-button type="primary" @click="echeckrecord" v-auth="'echeckrecord.create'">批量巡检</el-button>
|
||||||
<!-- <el-select v-model="query.belong_dept" placeholder="所在车间" clearable style="margin-left: 2px;"
|
|
||||||
@change="handleQuery">
|
|
||||||
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
||||||
</el-select> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-cascader v-model="query.belong_dept" :options="group" :props="groupsProps" clearable placeholder="所在车间"
|
<el-cascader v-model="query.belong_dept" :options="group" :props="groupsProps" clearable placeholder="所在车间"
|
||||||
:show-all-levels="false" @change="handleQuery">
|
:show-all-levels="false" @change="handleQuery">
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
<!-- <el-select v-model="query.state" placeholder="设备状态" clearable>
|
|
||||||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
|
||||||
@change="handleQuery"></el-option>
|
|
||||||
</el-select> -->
|
|
||||||
<!-- <el-select
|
|
||||||
v-model="query.is_deleted"
|
|
||||||
placeholder="筛选"
|
|
||||||
@change="handleQuery"
|
|
||||||
clearable
|
|
||||||
style="margin-left: 2px"
|
|
||||||
>
|
|
||||||
<el-option label="在用" :value="false"></el-option>
|
|
||||||
<el-option label="已删" :value="true"></el-option>
|
|
||||||
</el-select> -->
|
|
||||||
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
<el-input v-model="query.search" placeholder="设备名称/编号" clearable style="width:200px"></el-input>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -92,9 +74,6 @@
|
||||||
<el-table-column label="所在工段" show-overflow-tooltip>
|
<el-table-column label="所在工段" show-overflow-tooltip>
|
||||||
<template #default="scope">{{ scope.row.mgroup_name }}</template>
|
<template #default="scope">{{ scope.row.mgroup_name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="保管人">
|
|
||||||
<template #default="scope">{{ scope.row.keeper_name }}</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="安装位置" show-overflow-tooltip>
|
<el-table-column label="安装位置" show-overflow-tooltip>
|
||||||
<template #default="scope">{{ scope.row.place }}</template>
|
<template #default="scope">{{ scope.row.place }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -102,13 +81,10 @@
|
||||||
<template #default="scope">{{ scope.row.description }}</template>
|
<template #default="scope">{{ scope.row.description }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="180">
|
<el-table-column label="操作" fixed="right" align="left" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="table_record(scope.row)" v-auth="'einspect.create'">
|
<el-button link type="success" @click="table_print(scope.row)">打印</el-button>
|
||||||
巡检
|
<el-button link type="primary" @click="table_record(scope.row)" v-auth="'einspect.create'">巡检</el-button>
|
||||||
</el-button>
|
<el-button link type="warning" @click="table_edit(scope.row)" v-auth="'equipment.update'">编辑</el-button>
|
||||||
<el-button link type="warning" @click="table_edit(scope.row)" v-auth="'equipment.update'">
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row)" v-auth="'equipment.delete'">
|
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row)" v-auth="'equipment.delete'">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button link type="danger">删除</el-button>
|
<el-button link type="danger">删除</el-button>
|
||||||
|
@ -187,21 +163,6 @@
|
||||||
<ehsUserSelect :multiple="false" @submit="getReceptionist" />
|
<ehsUserSelect :multiple="false" @submit="getReceptionist" />
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="巡检人" prop="inspect_user">
|
|
||||||
<el-select
|
|
||||||
v-model="form.inspect_user"
|
|
||||||
placeholder="巡检人"
|
|
||||||
clearable
|
|
||||||
style="width:100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in userList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="巡检结果" prop="result">
|
<el-form-item label="巡检结果" prop="result">
|
||||||
|
@ -269,12 +230,6 @@ export default {
|
||||||
emitPath: false,
|
emitPath: false,
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
},
|
},
|
||||||
// stateOptions: [
|
|
||||||
// { label: '完好', value: 10 },
|
|
||||||
// { label: '限用', value: 20 },
|
|
||||||
// { label: '在修', value: 30 },
|
|
||||||
// { label: '禁用', value: 40 },
|
|
||||||
// ],
|
|
||||||
results_: {
|
results_: {
|
||||||
'pass': '正常',
|
'pass': '正常',
|
||||||
'fail': '异常',
|
'fail': '异常',
|
||||||
|
@ -291,7 +246,8 @@ export default {
|
||||||
item: {},
|
item: {},
|
||||||
visible: false,
|
visible: false,
|
||||||
visibleRecord: false,
|
visibleRecord: false,
|
||||||
excelName: ''
|
excelName: '',
|
||||||
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -401,7 +357,22 @@ export default {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
table_print(row){
|
||||||
|
let that = this;
|
||||||
|
let params = {},data={};
|
||||||
|
data.name = row.name;
|
||||||
|
data.number = row.number;
|
||||||
|
params.data = data;
|
||||||
|
params.label_template_name = '设备打印模板';
|
||||||
|
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
||||||
|
let obj = {};
|
||||||
|
obj.printer_commands = res.commands;
|
||||||
|
obj.printer_name = that.printer_name;
|
||||||
|
that.$API.wpm.prints.req(obj).then((response) => {
|
||||||
|
that.$message.success("打印成功");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
|
|
Loading…
Reference in New Issue