|
@@ -2,58 +2,58 @@
|
|
|
<section>
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
|
- <el-form :inline="true">
|
|
|
- <el-form-item>
|
|
|
- <el-button type="text" @click="backToDetection" icon="el-icon-back" class="back">返回</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item class="divLine"></el-form-item>
|
|
|
- <el-form-item>
|
|
|
- 当前保养状态:
|
|
|
- <span style="color: #ff4949; margin-right: 16px;">需要</span>
|
|
|
- <el-button size="small" type="primary" v-if="requirement" @click="showMaintenance">立即处理</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item style="float:right;">
|
|
|
- 保养提醒:
|
|
|
- <el-switch v-model="prompt" active-color="#ff4949" disabled></el-switch>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-form :inline="true">
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="text" @click="backToDetection" icon="el-icon-back" class="back">返回</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="divLine"></el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ 当前保养状态:
|
|
|
+ <span style="color: #ff4949; margin-right: 16px;">需要</span>
|
|
|
+ <el-button size="small" type="primary" v-if="requirement" @click="showMaintenance">立即处理</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="float:right;">
|
|
|
+ 保养提醒:
|
|
|
+ <el-switch v-model="prompt" active-color="#ff4949" disabled></el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
</el-col>
|
|
|
|
|
|
<!--列表-->
|
|
|
<el-table
|
|
|
- :data="moulds"
|
|
|
- highlight-current-row
|
|
|
- :height="tableHeight"
|
|
|
- v-loading="listLoading"
|
|
|
- style="width: 100%;"
|
|
|
+ :data="moulds"
|
|
|
+ highlight-current-row
|
|
|
+ :height="tableHeight"
|
|
|
+ v-loading="listLoading"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
- <el-table-column type="index" width="60"></el-table-column>
|
|
|
- <el-table-column prop="maintenancer" label="保养人" width="100" sortable></el-table-column>
|
|
|
- <el-table-column prop="plan" label="保养方案" sortable></el-table-column>
|
|
|
- <el-table-column prop="picture" label="保养照片" width="200" sortable></el-table-column>
|
|
|
- <el-table-column prop="closeTime" label="关闭时间" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column type="index" width="60"></el-table-column>
|
|
|
+ <el-table-column prop="maintenancer" label="保养人" width="100" sortable></el-table-column>
|
|
|
+ <el-table-column prop="plan" label="保养方案" sortable></el-table-column>
|
|
|
+ <el-table-column prop="picture" label="保养照片" width="200" sortable></el-table-column>
|
|
|
+ <el-table-column prop="closeTime" label="关闭时间" width="200" sortable></el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :page-sizes="[20 , 50 , 80 , 100 , 200]"
|
|
|
- :page-size="20"
|
|
|
- layout="total, sizes, prev, pager, next"
|
|
|
- :total="total"
|
|
|
- style="float:right;"
|
|
|
- ></el-pagination>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :page-sizes="[20 , 50 , 80 , 100 , 200]"
|
|
|
+ :page-size="20"
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ style="float:right;"
|
|
|
+ ></el-pagination>
|
|
|
</el-col>
|
|
|
|
|
|
<!--新增界面-->
|
|
|
<el-dialog
|
|
|
- title="处理保养"
|
|
|
- v-if="maintenanceFormVisible"
|
|
|
- :visible.sync="maintenanceFormVisible"
|
|
|
- :close-on-click-modal="false"
|
|
|
- customClass="customWidth"
|
|
|
+ title="处理保养"
|
|
|
+ v-if="maintenanceFormVisible"
|
|
|
+ :visible.sync="maintenanceFormVisible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ customClass="customWidth"
|
|
|
>
|
|
|
<el-form
|
|
|
:model="maintenanceForm"
|
|
@@ -101,11 +101,7 @@
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click.native="maintenanceFormVisible = false">取消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click.native="console.log('handled')"
|
|
|
- :loading="maintenanceLoading"
|
|
|
- >立即处理</el-button>
|
|
|
+ <el-button type="primary" @click.native="maintain" :loading="maintenanceLoading">立即处理</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
@@ -192,6 +188,56 @@ export default {
|
|
|
//显示新增界面
|
|
|
showMaintenance: function() {
|
|
|
this.maintenanceFormVisible = true;
|
|
|
+ },
|
|
|
+ //获取记录
|
|
|
+ getList() {
|
|
|
+ this.listLoading = true;
|
|
|
+ this.http.post(
|
|
|
+ this.port.mold.moldMaintainList,
|
|
|
+ {},
|
|
|
+ res => {
|
|
|
+ this.listLoading = false;
|
|
|
+ if (res.code == "ok") {
|
|
|
+ console.log(res);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.listLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //模具保养
|
|
|
+ maintain() {
|
|
|
+ this.http.post(
|
|
|
+ this.port.mold.moldMaintain,
|
|
|
+ {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ console.log(res);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.listLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -200,6 +246,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
var mouldId = this.$route.params.id; //传到当前页面的模具编号
|
|
|
+ // this.getList();
|
|
|
}
|
|
|
};
|
|
|
</script>
|