|
@@ -1,6 +1,13 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="120px"
|
|
|
+ >
|
|
|
<el-form-item label="作业指导书名称" prop="instructionName">
|
|
|
<el-input
|
|
|
v-model="queryParams.instructionName"
|
|
@@ -18,8 +25,16 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -32,7 +47,8 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['system:instruction:add']"
|
|
|
- >新增</el-button>
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -43,7 +59,8 @@
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['system:instruction:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -54,7 +71,8 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['system:instruction:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -64,26 +82,57 @@
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['system:instruction:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" style="margin-top: 20px" :data="instructionList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ :data="instructionList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="主键" align="center" prop="id" />
|
|
|
- <el-table-column label="指导书名称" align="center" prop="instructionName" />
|
|
|
+ <el-table-column
|
|
|
+ label="指导书名称"
|
|
|
+ align="center"
|
|
|
+ prop="instructionName"
|
|
|
+ />
|
|
|
<el-table-column label="作业名" align="center" prop="jobName" />
|
|
|
- <el-table-column label="描述" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column
|
|
|
+ label="描述"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
|
|
|
+ <el-dropdown
|
|
|
+ @command="
|
|
|
+ (command) => {
|
|
|
+ handleCommand(command, scope.row);
|
|
|
+ }
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-button type="warning">
|
|
|
操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item icon="el-icon-edit" command="catOperationInstruction">查看作业指导书</el-dropdown-item>
|
|
|
- <el-dropdown-item icon="el-icon-edit" command="handleUpdate">修改</el-dropdown-item>
|
|
|
- <el-dropdown-item icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ icon="el-icon-edit"
|
|
|
+ command="catOperationInstruction"
|
|
|
+ >查看作业指导书</el-dropdown-item
|
|
|
+ >
|
|
|
+ <el-dropdown-item icon="el-icon-edit" command="handleUpdate"
|
|
|
+ >修改</el-dropdown-item
|
|
|
+ >
|
|
|
+ <el-dropdown-item icon="el-icon-delete" command="handleDelete"
|
|
|
+ >删除</el-dropdown-item
|
|
|
+ >
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
@@ -91,7 +140,7 @@
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
+ v-show="total > 0"
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
@@ -102,7 +151,10 @@
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
|
<el-form-item label="作业指导书名称" prop="instructionName">
|
|
|
- <el-input v-model="form.instructionName" placeholder="请输入作业指导书名称" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.instructionName"
|
|
|
+ placeholder="请输入作业指导书名称"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="作业名称" prop="jobName">
|
|
|
<el-input v-model="form.jobName" placeholder="请输入作业名称" />
|
|
@@ -110,12 +162,12 @@
|
|
|
<el-form-item label="组件名称" prop="componentPath">
|
|
|
<el-input v-model="form.componentPath" placeholder="请输入组件名称" />
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="路由地址" prop="routingAddress">-->
|
|
|
-<!-- <el-input v-model="form.routingAddress" placeholder="请输入路由地址" />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
-<!-- <el-form-item label="备注" prop="remark">-->
|
|
|
-<!-- <el-input v-model="form.remark" placeholder="请输入备注" />-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="路由地址" prop="routingAddress">-->
|
|
|
+ <!-- <el-input v-model="form.routingAddress" placeholder="请输入路由地址" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="备注" prop="remark">-->
|
|
|
+ <!-- <el-input v-model="form.remark" placeholder="请输入备注" />-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -123,55 +175,84 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 查看作业指导书 -->
|
|
|
- <el-dialog :title="catOperationInstructionTitle" :visible.sync="catOperationInstructionBoolean" width="1500px" append-to-body>
|
|
|
+ <el-dialog
|
|
|
+ :title="catOperationInstructionTitle"
|
|
|
+ :visible.sync="catOperationInstructionBoolean"
|
|
|
+ width="1500px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
<!-- 动态加载组件 -->
|
|
|
<component :is="catOperationInstructionCurrentComponent"></component>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="catOperationInstructionBoolean=false">确 定</el-button>
|
|
|
- <el-button @click="catOperationInstructionBoolean=false">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="catOperationInstructionBoolean = false"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="catOperationInstructionBoolean = false"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listMaterialInfo, getMaterialInfo, delMaterialInfo, addMaterialInfo, updateMaterialInfo } from "@/api/amichi/materiel/materialInfo";
|
|
|
-import driverInstallation from '@/views/amichi/operationInstruction/page/driverInstallation.vue';
|
|
|
-import excitationStator from '@/views/amichi/operationInstruction/page/excitationStator.vue';
|
|
|
-import statorCore from '@/views/amichi/operationInstruction/page/statorCore.vue';
|
|
|
-import statorPressFit from '@/views/amichi/operationInstruction/page/statorPressFit.vue';
|
|
|
-import StatorWireEmbedding from '@/views/amichi/operationInstruction/page/StatorWireEmbedding.vue';
|
|
|
-import { listInstruction, getInstruction, delInstruction, addInstruction, updateInstruction } from "@/api/amichi/operationInstruction/instruction";
|
|
|
+import {
|
|
|
+ listMaterialInfo,
|
|
|
+ getMaterialInfo,
|
|
|
+ delMaterialInfo,
|
|
|
+ addMaterialInfo,
|
|
|
+ updateMaterialInfo,
|
|
|
+} from "@/api/amichi/materiel/materialInfo";
|
|
|
+import driverInstallation from "@/views/amichi/operationInstruction/page/driverInstallation.vue";
|
|
|
+import excitationStator from "@/views/amichi/operationInstruction/page/excitationStator.vue";
|
|
|
+import statorCore from "@/views/amichi/operationInstruction/page/statorCore.vue";
|
|
|
+import statorPressFit from "@/views/amichi/operationInstruction/page/statorPressFit.vue";
|
|
|
+import StatorWireEmbedding from "@/views/amichi/operationInstruction/page/StatorWireEmbedding.vue";
|
|
|
+import {
|
|
|
+ listInstruction,
|
|
|
+ getInstruction,
|
|
|
+ delInstruction,
|
|
|
+ addInstruction,
|
|
|
+ updateInstruction,
|
|
|
+} from "@/api/amichi/operationInstruction/instruction";
|
|
|
|
|
|
export default {
|
|
|
name: "MaterialInfo",
|
|
|
dicts: ["wlsx"],
|
|
|
data() {
|
|
|
return {
|
|
|
- catOperationInstructionTitle: '',
|
|
|
+ catOperationInstructionTitle: "",
|
|
|
catOperationInstructionCurrentComponent: "", // 默认显示ComponentA
|
|
|
- catOperationInstructionBoolean:false,
|
|
|
- tableData: [{
|
|
|
- id:"1",
|
|
|
- title: '励磁定子自动绕线工序作业指导书',
|
|
|
- path: '/excitationStator',
|
|
|
- }, {
|
|
|
- id:"3",
|
|
|
- title: '定子嵌线工序作业指导书',
|
|
|
- path: '/StatorWireEmbedding',
|
|
|
- }, {
|
|
|
- id:"4",
|
|
|
- title: '驱动片安装工序作业指导书',
|
|
|
- path: '/driverInstallation',
|
|
|
- }, {
|
|
|
- id:"5",
|
|
|
- title: '定子铁芯焊接作业指导书',
|
|
|
- path: '/statorCore',
|
|
|
- }, {
|
|
|
- id:"6",
|
|
|
- title: '定子压装工序作业指导书',
|
|
|
- path: '/statorPressFit',
|
|
|
- }],
|
|
|
+ catOperationInstructionBoolean: false,
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ id: "1",
|
|
|
+ title: "励磁定子自动绕线工序作业指导书",
|
|
|
+ path: "/excitationStator",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "3",
|
|
|
+ title: "定子嵌线工序作业指导书",
|
|
|
+ path: "/StatorWireEmbedding",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "4",
|
|
|
+ title: "驱动片安装工序作业指导书",
|
|
|
+ path: "/driverInstallation",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "5",
|
|
|
+ title: "定子铁芯焊接作业指导书",
|
|
|
+ path: "/statorCore",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "6",
|
|
|
+ title: "定子压装工序作业指导书",
|
|
|
+ path: "/statorPressFit",
|
|
|
+ },
|
|
|
+ ],
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -207,25 +288,27 @@ export default {
|
|
|
dataApprovalStatus: null,
|
|
|
processKey: null,
|
|
|
taskProcessKey: null,
|
|
|
- taskNodeKey: null
|
|
|
+ taskNodeKey: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
materialCode: [
|
|
|
- { required: true, message: "物料编码不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "物料编码不能为空", trigger: "blur" },
|
|
|
],
|
|
|
materialName: [
|
|
|
- { required: true, message: "物料名称不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
- unit: [
|
|
|
- { required: true, message: "单位不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "物料名称不能为空", trigger: "blur" },
|
|
|
],
|
|
|
+ unit: [{ required: true, message: "单位不能为空", trigger: "blur" }],
|
|
|
attribute: [
|
|
|
- { required: true, message: "属性 0自制 1外购不能为空", trigger: "blur" }
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "属性 0自制 1外购不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -251,14 +334,14 @@ export default {
|
|
|
handleCommand(command, row) {
|
|
|
switch (command) {
|
|
|
case "handleUpdate":
|
|
|
- this.handleUpdate(row)
|
|
|
+ this.handleUpdate(row);
|
|
|
break;
|
|
|
case "handleDelete":
|
|
|
- this.handleDelete(row)
|
|
|
+ this.handleDelete(row);
|
|
|
break;
|
|
|
case "catOperationInstruction":
|
|
|
- this.catOperationInstructionBoolean= true;
|
|
|
- this.handleClick(row)
|
|
|
+ this.catOperationInstructionBoolean = true;
|
|
|
+ this.handleClick(row);
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
@@ -271,7 +354,7 @@ export default {
|
|
|
/** 查询物料信息列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listInstruction(this.queryParams).then(response => {
|
|
|
+ listInstruction(this.queryParams).then((response) => {
|
|
|
this.instructionList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -301,7 +384,7 @@ export default {
|
|
|
dataApprovalStatus: null,
|
|
|
processKey: null,
|
|
|
taskProcessKey: null,
|
|
|
- taskNodeKey: null
|
|
|
+ taskNodeKey: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -317,9 +400,9 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
@@ -330,8 +413,8 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getInstruction(id).then(response => {
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getInstruction(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改物料信息";
|
|
@@ -339,18 +422,18 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- this.form.typeOfOperation=1
|
|
|
- updateInstruction(this.form).then(response => {
|
|
|
+ this.form.typeOfOperation = 1;
|
|
|
+ updateInstruction(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- this.form.typeOfOperation=0
|
|
|
- addInstruction(this.form).then(response => {
|
|
|
+ this.form.typeOfOperation = 0;
|
|
|
+ addInstruction(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -362,19 +445,27 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除作业指导书编号为"' + ids + '"的数据项?').then(function() {
|
|
|
- return delInstruction(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除作业指导书编号为"' + ids + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
+ return delInstruction(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- this.download('system/instruction/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `instruction_${new Date().getTime()}.xlsx`)
|
|
|
- }
|
|
|
- }
|
|
|
+ this.download(
|
|
|
+ "system/instruction/export",
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ },
|
|
|
+ `instruction_${new Date().getTime()}.xlsx`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|