This commit is contained in:
Vergil
2020-02-14 15:18:43 +08:00
parent e8eeade817
commit 1895977eb2
25 changed files with 1304 additions and 738 deletions

View File

@@ -1,87 +1,86 @@
<template>
<div class="app-container">
<el-card>
<span>设备名称:</span>
<el-input v-model="equipmentName" placeholder="设备名称" size="small" clearable style="width:200px;margin-left: 10px"/>
<el-card style="padding: 3px">
<el-input v-model="equipmentName" placeholder="设备名称" size="small" clearable style="width:200px;margin-left: 0px"/>
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left:30px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="pageCurrent = 1;fetchData()">查询</el-button>-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="PageSize = 10;PageCurrent = 1;fetchData()">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px" plain @click="PageSize = 10;PageCurrent = 1;fetchData()">查询</el-button>
<el-tooltip effect="dark" content="添加新设备" placement="top">
<el-button type="distribution" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
<el-button class="button111" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
<!--<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="handleAdd()">新增</el-button>-->
</el-tooltip>
<span style="margin-left: 40px">有效时间</span>
<el-date-picker
v-model="time"
type="date"
size="small"
value-format="yyyy-MM-dd"
placeholder="选择日期"/>
<el-tooltip :open-delay="1200" effect="dark" content="设定设备参数有效时间" placement="top">
<!--<el-button type="primary" size="small" icon="el-icon-setting" style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="setUp">设定</el-button>-->
<el-button type="warning" size="small" icon="el-icon-setting" plain style="margin-left:10px" @click="setUp">设定</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="生成有效时间内设备加工能力" placement="top">
<!--<el-button type="success" size="small" icon="el-icon-edit-outline" style="margin-left:10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="generate">生成设备加工能力</el-button>-->
<el-button type="primary" size="small" icon="el-icon-edit-outline" plain style="margin-left:10px" @click="generate">生成设备加工能力</el-button>
</el-tooltip>
<!-- <span style="margin-left: 40px">有效时间</span>-->
<!-- <el-date-picker-->
<!-- v-model="time"-->
<!-- type="date"-->
<!-- size="small"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择日期"/>-->
<!-- <el-tooltip :open-delay="1200" effect="dark" content="设定设备参数有效时间" placement="top">-->
<!-- &lt;!&ndash;<el-button type="primary" size="small" icon="el-icon-setting" style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="setUp">设定</el-button>&ndash;&gt;-->
<!-- <el-button type="warning" size="small" icon="el-icon-setting" plain style="margin-left:10px" @click="setUp">设定</el-button>-->
<!-- </el-tooltip>-->
<!-- <el-tooltip effect="dark" content="生成有效时间内设备加工能力" placement="top">-->
<!-- &lt;!&ndash;<el-button type="success" size="small" icon="el-icon-edit-outline" style="margin-left:10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="generate">生成设备加工能力</el-button>&ndash;&gt;-->
<!-- <el-button type="primary" size="small" icon="el-icon-edit-outline" plain style="margin-left:10px" @click="generate">生成设备加工能力</el-button>-->
<!-- </el-tooltip>-->
</el-card>
<el-card>
<el-table :data="List" border size="small" stripe highlight-current-row height="700px">
<el-table-column label="设备名称" prop="设备名称" align="center" >
<el-table :data="List" border size="small" stripe highlight-current-row height="700px" style="width: 570px">
<el-table-column label="设备名称" prop="设备名称" align="center" width="120px" >
<template slot-scope="scope">
{{ scope.row.设备名称 }}
</template>
</el-table-column>
<el-table-column label="设备编号" prop="设备编号" align="center" >
<el-table-column label="设备编号" prop="设备编号" align="center" width="120px" >
<template slot-scope="scope">
{{ scope.row.设备编号 }}
</template>
</el-table-column>
<el-table-column label="设备型号" rop="设备型号" align="center" >
<el-table-column label="设备型号" rop="设备型号" align="center" width="120px" >
<template slot-scope="scope">
{{ scope.row.设备型号 }}
</template>
</el-table-column>
<el-table-column label="设备性能指标" align="center" >
<template slot-scope="scope">
{{ scope.row.设备性能指标 }}
</template>
</el-table-column>
<el-table-column label="设备加工能力" align="center" >
<template slot-scope="scope">p
{{ scope.row.设备加工能力工时 }}
</template>
</el-table-column>
<el-table-column label="设备加工工艺" align="center" >
<!-- <el-table-column label="设备性能指标" align="center" >-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.设备性能指标 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="设备加工能力" align="center" >-->
<!-- <template slot-scope="scope">p-->
<!-- {{ scope.row.设备加工能力工时 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="设备加工工艺" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.工艺属性 }}
</template>
</el-table-column>
<el-table-column label="班次类型" align="center" >
<!-- <el-table-column label="班次类型" align="center" >-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.班次类型 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="设备工时系数" align="center" >-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.设备工时系数 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="整改工时系数" align="center" >-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.整改工时比例 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="预留工时系数" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.设备预留工时系数 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.班次类型 }}
</template>
</el-table-column>
<el-table-column label="设备工时系数" align="center" >
<template slot-scope="scope">
{{ scope.row.设备工时系数 }}
</template>
</el-table-column>
<el-table-column label="整改工时系数" align="center" >
<template slot-scope="scope">
{{ scope.row.整改工时比例 }}
</template>
</el-table-column>
<el-table-column label="预留工时系数" align="center">
<template slot-scope="scope">
{{ scope.row.设备预留工时系数 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px" fixed="right" >
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-edit" style="margin-left:5px" @click="handleEdit(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-delete" style="margin-left:5px" @click="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -144,7 +143,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-show="title!=='增加'">
<el-row v-show="false">
<el-col :span = "12">
<el-form-item label="设备加工能力" prop="设备加工能力" >
<el-input v-model="form.设备加工能力" placeholder="设备加工能力" size="small" style="width:200px" clearable />
@@ -156,7 +155,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-show="title!=='增加'">
<el-row v-show="false">
<el-col :span = "12">
<el-form-item label="班次类型" prop="班次类型" >
<el-select v-model="form.班次类型" placeholder="班次类型" size="small" style="width:200px" clearable >
@@ -174,7 +173,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-show="title!=='增加'">
<el-row v-show="false">
<el-col :span = "12">
<el-form-item label="整改工时系数" prop="整改工时系数" >
<el-input v-model="form.整改工时系数" placeholder="整改工时系数" size="small" style="width:200px" clearable />
@@ -296,7 +295,7 @@ export default {
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
this.title = row.设备名称
this.title = '编辑'
this.dialogFormVisible = true
this.form.设备名称 = row.设备名称
this.form.设备编号 = row.设备编号
@@ -311,6 +310,7 @@ export default {
this.equipmentSerialNumber = row.设备流水号
},
submit(formName) {
console.log(this.title)
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.title === '增加') {
@@ -343,12 +343,13 @@ export default {
},
ADD() {
this.addForm('form')
this.dialogFormVisible1 = true
this.dialogFormVisible = true
this.form.contractSigningDate = getNowTime()// new Date()
this.temp = 1
this.title = '新增项目'
this.title = '增加'
},
submitEdit() {
console.log(2323)
editTable(this.equipmentSerialNumber, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备加工能力, this.form.设备工时系数, this.form.班次类型, this.form.设备加工工艺, this.form.整改工时系数, this.form.设备编号, this.form.预留工时系数).then(response => {
if (response.data[0].result === '1') {
this.$notify({
@@ -435,4 +436,20 @@ export default {
/* color: #ff9759;*/
/*}*/
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>