Merge branch 'yanyan_dev' into shenzhen-dev
This commit is contained in:
commit
eab68abe7f
@ -49,8 +49,8 @@
|
||||
<el-dialog title="新增" :visible.sync="dialogVisibleAdd" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-form-item label="设备名称:">
|
||||
<el-select v-model="equipmentName" placeholder="请选择" style="width:350px" @change="changeEquipmentType($event)">
|
||||
<el-option v-for="item in EquipmentList" :key="item.id" :label="item.name" :value="item.name"> </el-option>
|
||||
<el-select v-model="equipmentId" placeholder="请选择" style="width:350px">
|
||||
<el-option v-for="item in EquipmentList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="加油量:">
|
||||
@ -58,15 +58,15 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisibleAdd = false">取 消</el-button>
|
||||
<el-button @click="noAdd">取 消</el-button>
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog title="编辑" :visible.sync="dialogVisibleEdit" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="form" label-width="150px">
|
||||
<el-form-item label="设备名称:">
|
||||
<el-select v-model="equipmentName" placeholder="请选择" style="width:350px" @change="changeEquipmentType($event)">
|
||||
<el-option v-for="item in EquipmentList" :key="item.id" :label="item.name" :value="item.name"> </el-option>
|
||||
<el-select v-model="equipmentId" placeholder="请选择" style="width:350px">
|
||||
<el-option v-for="item in EquipmentList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="加油量:">
|
||||
@ -82,7 +82,13 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getRefuelingRecordList,addRefuelingRecord,editRefuelingRecord,deleteRefuelingRecord,getAllRefuelingRecordList } from '@/assets/js/api/gantryCrane'
|
||||
import {
|
||||
getRefuelingRecordList,
|
||||
addRefuelingRecord,
|
||||
editRefuelingRecord,
|
||||
deleteRefuelingRecord,
|
||||
getAllRefuelingRecordList
|
||||
} from '@/assets/js/api/gantryCrane'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -111,19 +117,19 @@ export default {
|
||||
dialogVisibleEdit: false,
|
||||
form: {
|
||||
name: '',
|
||||
plateNumber: '',
|
||||
plateNumber: ''
|
||||
},
|
||||
editForm: {
|
||||
name: '',
|
||||
plateNumber: '',
|
||||
plateNumber: ''
|
||||
},
|
||||
|
||||
valueFuel: '',
|
||||
valueEquipment: '',
|
||||
fuelTypeId:'',
|
||||
equipmentId: '',
|
||||
editId: '',
|
||||
EquipmentList: [],
|
||||
equipmentName:'',
|
||||
devId: '',
|
||||
fuel: ''
|
||||
}
|
||||
},
|
||||
@ -137,30 +143,18 @@ export default {
|
||||
this.getEquipmentList()
|
||||
},
|
||||
getEquipmentList() {
|
||||
getAllRefuelingRecordList().then((res) => {
|
||||
getAllRefuelingRecordList({ projectSn: this.projectSn }).then(res => {
|
||||
this.EquipmentList = res.result
|
||||
})
|
||||
},
|
||||
changeFuelType(val){
|
||||
this.fuelType.forEach((item,index,array) => {
|
||||
if (item.typeName == val) {
|
||||
this.fuelTypeId = item.id
|
||||
}
|
||||
})
|
||||
},
|
||||
changeEquipmentType(val){
|
||||
console.log(val);
|
||||
console.log(this.EquipmentList);
|
||||
this.EquipmentList.forEach((item,index,array) => {
|
||||
if (item.name == val) {
|
||||
this.equipmentId = item.id
|
||||
}
|
||||
})
|
||||
noAdd(){
|
||||
this.dialogVisibleAdd = false
|
||||
this.equipmentId = ''
|
||||
this.fuel = ''
|
||||
},
|
||||
okAdd() {
|
||||
let data = {
|
||||
devId: Number(this.equipmentId),
|
||||
fuelType: this.fuelTypeId,
|
||||
devId: this.equipmentId,
|
||||
fuelCharge: Number(this.fuel),
|
||||
projectSn: this.projectSn
|
||||
}
|
||||
@ -169,6 +163,8 @@ export default {
|
||||
this.$message.success('新增成功!')
|
||||
this.getListData()
|
||||
this.dialogVisibleAdd = false
|
||||
this.equipmentId = ''
|
||||
this.fuel = ''
|
||||
} else {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
@ -176,10 +172,10 @@ export default {
|
||||
},
|
||||
okEdit() {
|
||||
this.dialogVisibleEdit = false
|
||||
this.EquipmentList
|
||||
let data = {
|
||||
devId: Number(this.equipmentId),
|
||||
fuelType: this.fuelTypeId,
|
||||
fuelCharge: Number(this.fuel),
|
||||
devId: this.equipmentId,
|
||||
fuelCharge: this.fuel,
|
||||
projectSn: this.projectSn,
|
||||
id: this.editId
|
||||
}
|
||||
@ -205,6 +201,7 @@ export default {
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
getRefuelingRecordList(data).then(res => {
|
||||
console.log('加油记录', res)
|
||||
this.tableList = res.result.records
|
||||
this.total = res.result.total
|
||||
})
|
||||
@ -225,16 +222,22 @@ export default {
|
||||
},
|
||||
//编辑按钮
|
||||
editBtn(val) {
|
||||
console.log(val);
|
||||
console.log(val)
|
||||
this.editForm = { ...val }
|
||||
this.dialogVisibleEdit = true
|
||||
this.editId = val.id
|
||||
this.equipmentName = val.devName
|
||||
this.fuel = val.fuelCharge
|
||||
this.getEquipmentList()
|
||||
this.dialogVisibleEdit = true
|
||||
this.equipmentId = val.devId
|
||||
this.fuel = val.fuelCharge
|
||||
},
|
||||
//删除按钮
|
||||
deleteBtn(val) {
|
||||
this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {
|
||||
id: val.id
|
||||
}
|
||||
@ -246,6 +249,13 @@ export default {
|
||||
this.$message.success('删除失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisibleAdd = false">取 消</el-button>
|
||||
<el-button @click="noAdd">取 消</el-button>
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -136,11 +136,11 @@ export default {
|
||||
dialogVisibleEdit: false,
|
||||
form: {
|
||||
name: '',
|
||||
plateNumber: '',
|
||||
plateNumber: ''
|
||||
},
|
||||
editForm: {
|
||||
name: '',
|
||||
plateNumber: '',
|
||||
plateNumber: ''
|
||||
},
|
||||
fuelType: [
|
||||
{ id: 1, typeName: '柴油' },
|
||||
@ -176,6 +176,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
noAdd() {
|
||||
this.dialogVisibleAdd = false
|
||||
this.form = {
|
||||
name: '',
|
||||
plateNumber: ''
|
||||
}
|
||||
this.valueFuel = ''
|
||||
this.valueEquipment = ''
|
||||
},
|
||||
okAdd() {
|
||||
this.dialogVisibleAdd = false
|
||||
let data = {
|
||||
@ -189,6 +198,12 @@ export default {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('新增成功!')
|
||||
this.getListData()
|
||||
this.form = {
|
||||
name: '',
|
||||
plateNumber: ''
|
||||
}
|
||||
this.valueFuel = ''
|
||||
this.valueEquipment = ''
|
||||
} else {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
@ -246,7 +261,7 @@ export default {
|
||||
},
|
||||
//编辑按钮
|
||||
editBtn(val) {
|
||||
console.log(val);
|
||||
console.log(val)
|
||||
this.editForm = { ...val }
|
||||
this.dialogVisibleEdit = true
|
||||
this.editId = val.id
|
||||
@ -255,6 +270,12 @@ export default {
|
||||
},
|
||||
//删除按钮
|
||||
deleteBtn(val) {
|
||||
this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {
|
||||
id: val.id
|
||||
}
|
||||
@ -266,6 +287,13 @@ export default {
|
||||
this.$message.success('删除失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
|
||||
@ -128,12 +128,12 @@ export default {
|
||||
changeName(val) {
|
||||
this.options.forEach((item, index, array) => {
|
||||
if (item.name == val) {
|
||||
console.log(item);
|
||||
console.log(item)
|
||||
this.form.devId = item.id
|
||||
this.editForm.devId = item.id
|
||||
}
|
||||
})
|
||||
console.log(this.editForm.devId);
|
||||
console.log(this.editForm.devId)
|
||||
},
|
||||
openAdd() {
|
||||
this.dialogVisibleAdd = true
|
||||
@ -143,6 +143,7 @@ export default {
|
||||
},
|
||||
noAdd() {
|
||||
this.dialogVisibleAdd = false
|
||||
this.value = ''
|
||||
this.form = {
|
||||
devId: '',
|
||||
generatingCapacity: ''
|
||||
@ -219,7 +220,7 @@ export default {
|
||||
},
|
||||
//编辑按钮
|
||||
editBtn(val) {
|
||||
console.log(val);
|
||||
console.log(val)
|
||||
this.editForm = { ...val }
|
||||
this.value = val.devName
|
||||
this.dialogVisibleEdit = true
|
||||
@ -230,6 +231,12 @@ export default {
|
||||
},
|
||||
//删除按钮
|
||||
deleteBtn(val) {
|
||||
this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {
|
||||
id: val.id
|
||||
}
|
||||
@ -241,6 +248,13 @@ export default {
|
||||
this.$message.success('删除失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisibleAdd = false">取 消</el-button>
|
||||
<el-button @click="noAdd">取 消</el-button>
|
||||
<el-button type="primary" @click="okAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
specification: '',
|
||||
standardOperatingCurrent: '',
|
||||
standardOperatingVoltage: '',
|
||||
standardPower:'',
|
||||
standardPower: ''
|
||||
},
|
||||
editForm: {
|
||||
attenuationRate: '',
|
||||
@ -184,7 +184,7 @@ export default {
|
||||
specification: '',
|
||||
standardOperatingCurrent: '',
|
||||
standardOperatingVoltage: '',
|
||||
standardPower:'',
|
||||
standardPower: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -193,6 +193,22 @@ export default {
|
||||
this.getListData()
|
||||
},
|
||||
methods: {
|
||||
noAdd(){
|
||||
this.dialogVisibleAdd = false
|
||||
this.form = {
|
||||
attenuationRate: '',
|
||||
name: '',
|
||||
hourGeneratingCapacity: '',
|
||||
isc: '',
|
||||
modelNumber: '',
|
||||
ocv: '',
|
||||
size: '',
|
||||
specification: '',
|
||||
standardOperatingCurrent: '',
|
||||
standardOperatingVoltage: '',
|
||||
standardPower: ''
|
||||
}
|
||||
},
|
||||
okAdd() {
|
||||
this.dialogVisibleAdd = false
|
||||
let data = {
|
||||
@ -208,12 +224,25 @@ export default {
|
||||
specification: this.form.specification,
|
||||
standardOperatingCurrent: this.form.standardOperatingCurrent,
|
||||
standardOperatingVoltage: this.form.standardOperatingVoltage,
|
||||
standardPower:this.form.standardPower,
|
||||
standardPower: this.form.standardPower
|
||||
}
|
||||
addPhotovoltaoc(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('新增成功!')
|
||||
this.getListData()
|
||||
this.form = {
|
||||
attenuationRate: '',
|
||||
name: '',
|
||||
hourGeneratingCapacity: '',
|
||||
isc: '',
|
||||
modelNumber: '',
|
||||
ocv: '',
|
||||
size: '',
|
||||
specification: '',
|
||||
standardOperatingCurrent: '',
|
||||
standardOperatingVoltage: '',
|
||||
standardPower: ''
|
||||
}
|
||||
} else {
|
||||
this.$message.success('新增失败!')
|
||||
}
|
||||
@ -234,7 +263,7 @@ export default {
|
||||
specification: this.editForm.specification,
|
||||
standardOperatingCurrent: this.editForm.standardOperatingCurrent,
|
||||
standardOperatingVoltage: this.editForm.standardOperatingVoltage,
|
||||
standardPower:this.editForm.standardPower,
|
||||
standardPower: this.editForm.standardPower
|
||||
}
|
||||
editPhotovoltaoc(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
@ -255,7 +284,7 @@ export default {
|
||||
name: this.formInline.buildName,
|
||||
projectSn: this.projectSn,
|
||||
current: this.current,
|
||||
pageSize: this.pageSize,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
getPhotovoltaocList(data).then(res => {
|
||||
this.tableList = res.result.records
|
||||
@ -284,6 +313,12 @@ export default {
|
||||
},
|
||||
//删除按钮
|
||||
deleteBtn(val) {
|
||||
this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {
|
||||
id: val.id
|
||||
}
|
||||
@ -295,6 +330,13 @@ export default {
|
||||
this.$message.success('删除失败!')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
//查看条数
|
||||
handleSizeChange(val) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user