flx:修复bug
This commit is contained in:
parent
3d28361d36
commit
dcfc793b5e
@ -135,8 +135,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -420,8 +420,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -38,24 +38,20 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button type="primary" size="medium" plain @click="getList">搜索</el-button>
|
||||||
type="primary"
|
<el-button type="warning" size="medium" plain @click="resetQuery"
|
||||||
size="medium"
|
|
||||||
plain
|
|
||||||
@click="getList"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
size="medium"
|
|
||||||
plain
|
|
||||||
@click="resetQuery"
|
|
||||||
>刷新</el-button
|
>刷新</el-button
|
||||||
>
|
>
|
||||||
<el-button v-permission="{
|
<el-button
|
||||||
|
v-permission="{
|
||||||
key: 'add',
|
key: 'add',
|
||||||
menuPath: '/project/carManage/vehicleReal',
|
menuPath: '/project/carManage/vehicleReal',
|
||||||
}" size="medium" @click="carAdd(1)" type="primary">新增</el-button>
|
}"
|
||||||
|
size="medium"
|
||||||
|
@click="carAdd(1)"
|
||||||
|
type="primary"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@ -107,6 +103,28 @@
|
|||||||
align="center"
|
align="center"
|
||||||
label="备案时间"
|
label="备案时间"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="">
|
||||||
|
<el-button
|
||||||
|
|
||||||
|
style="border: 0 !important; margin-left: 10px"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="carAdd(2, scope.row)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
|
||||||
|
style="border: 0 !important; color: #f56c6c; margin-left: 10px"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="deletePressureTest(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -124,12 +142,7 @@
|
|||||||
></el-pagination>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<el-dialog
|
<el-dialog :visible.sync="dealShow" width="600px" append-to-body :title="dealTitle">
|
||||||
:visible.sync="dealShow"
|
|
||||||
width="600px"
|
|
||||||
append-to-body
|
|
||||||
:title="dealTitle"
|
|
||||||
>
|
|
||||||
<el-form
|
<el-form
|
||||||
ref="dealForm"
|
ref="dealForm"
|
||||||
:model="dealForm"
|
:model="dealForm"
|
||||||
@ -138,7 +151,7 @@
|
|||||||
label-width="210px"
|
label-width="210px"
|
||||||
class="dealForm"
|
class="dealForm"
|
||||||
>
|
>
|
||||||
<template v-if="dealType == 1">
|
<template v-if="dealType == 1 || dealType == 2">
|
||||||
<el-form-item label="抓拍设备" prop="devSn">
|
<el-form-item label="抓拍设备" prop="devSn">
|
||||||
<el-select v-model="dealForm.devSn" placeholder="请选择" clearable filterable>
|
<el-select v-model="dealForm.devSn" placeholder="请选择" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
@ -193,14 +206,20 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { carMeasureSpeedData,carMeasureSpeedDevListApi, carMeasureSpeedDataAdd } from "../../../assets/js/api/carManage";
|
import {
|
||||||
|
carMeasureSpeedData,
|
||||||
|
carMeasureSpeedDevListApi,
|
||||||
|
carMeasureSpeedDataAdd,
|
||||||
|
carMeasureSpeedDataEdit,
|
||||||
|
carMeasureSpeedDatadeleteApi,
|
||||||
|
} from "../../../assets/js/api/carManage";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -324,13 +343,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
carAdd(type) {
|
carAdd(type, row) {
|
||||||
this.dealType = type;
|
this.dealType = type;
|
||||||
this.initDealForm();
|
if (type == 1) {
|
||||||
|
this.initDealForm();
|
||||||
|
this.dealTitle = "新增";
|
||||||
|
} else if (type == 2) {
|
||||||
|
this.dealForm = {
|
||||||
|
...row,
|
||||||
|
fileList: row.snapshotImage ? [{ name: row.snapshotImage, url: this.$store.state.FILEURL + row.snapshotImage }] : []
|
||||||
|
};
|
||||||
|
this.dealTitle = "编辑";
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["dealForm"] && this.$refs["dealForm"].clearValidate();
|
this.$refs["dealForm"] && this.$refs["dealForm"].clearValidate();
|
||||||
});
|
});
|
||||||
this.dealTitle = "新增";
|
|
||||||
this.dealShow = true;
|
this.dealShow = true;
|
||||||
},
|
},
|
||||||
submitDealForm() {
|
submitDealForm() {
|
||||||
@ -338,7 +365,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
let params = Object.assign({}, this.dealForm);
|
let params = Object.assign({}, this.dealForm);
|
||||||
if (this.dealTitle == "新增" && this.dealType == 1) {
|
if (this.dealTitle == "新增" && this.dealType == 1) {
|
||||||
if(this.dealForm.fileList.length > 0) {
|
if (this.dealForm.fileList.length > 0) {
|
||||||
params.snapshotImage = this.dealForm.fileList[0].name;
|
params.snapshotImage = this.dealForm.fileList[0].name;
|
||||||
}
|
}
|
||||||
carMeasureSpeedDataAdd({
|
carMeasureSpeedDataAdd({
|
||||||
@ -347,7 +374,21 @@ export default {
|
|||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.$message.success(result.message);
|
this.$message.success(result.message);
|
||||||
this.getProgressListData();
|
this.getList();
|
||||||
|
this.dealShow = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.dealTitle == "编辑" && this.dealType == 2) {
|
||||||
|
if (this.dealForm.fileList.length > 0) {
|
||||||
|
params.snapshotImage = this.dealForm.fileList[0].name;
|
||||||
|
}
|
||||||
|
carMeasureSpeedDataEdit({
|
||||||
|
...params,
|
||||||
|
projectSn: this.projectSn,
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.success) {
|
||||||
|
this.$message.success(result.message);
|
||||||
|
this.getList();
|
||||||
this.dealShow = false;
|
this.dealShow = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -360,6 +401,19 @@ export default {
|
|||||||
this.$refs["dealForm"].resetFields();
|
this.$refs["dealForm"].resetFields();
|
||||||
this.dealShow = false;
|
this.dealShow = false;
|
||||||
},
|
},
|
||||||
|
deletePressureTest(row) {
|
||||||
|
this.$confirm("删除后操作不可恢复,请谨慎操作!", "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
carMeasureSpeedDatadeleteApi({ id: row.id }).then((res) => {
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
carMeasureSpeedDevList() {
|
carMeasureSpeedDevList() {
|
||||||
carMeasureSpeedDevListApi({ projectSn: this.$store.state.projectSn }).then(
|
carMeasureSpeedDevListApi({ projectSn: this.$store.state.projectSn }).then(
|
||||||
(result) => {
|
(result) => {
|
||||||
@ -393,10 +447,10 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
// 处理时间
|
// 处理时间
|
||||||
console.log("this.updateDate.length", this.updateDate);
|
console.log("this.updateDate.length", this.updateDate);
|
||||||
console.log("this.updateDate.length", this.updateDate[0]);
|
// console.log("this.updateDate.length", this.updateDate[0]);
|
||||||
console.log("this.updateDate.length", this.updateDate[1]);
|
// console.log("this.updateDate.length", this.updateDate[1]);
|
||||||
|
|
||||||
if (this.updateDate.length > 1) {
|
if (this.updateDate instanceof Array && this.updateDate.length > 1) {
|
||||||
this.pageInfo.uploadTime_begin = this.updateDate[0];
|
this.pageInfo.uploadTime_begin = this.updateDate[0];
|
||||||
this.pageInfo.uploadTime_end = this.updateDate[1];
|
this.pageInfo.uploadTime_end = this.updateDate[1];
|
||||||
// this.pageInfo.updateDate = []
|
// this.pageInfo.updateDate = []
|
||||||
|
|||||||
@ -409,8 +409,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -575,8 +575,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -641,8 +641,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -677,8 +677,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -499,8 +499,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -619,8 +619,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -787,8 +787,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<el-button @click="dealFormCancel">取消</el-button>
|
<el-button size="medium" @click="dealFormCancel">取消</el-button>
|
||||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
<el-button size="medium" type="primary" @click="submitDealForm">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -137,6 +137,13 @@
|
|||||||
:placeholder="$t('message.lifter.selectTime')"
|
:placeholder="$t('message.lifter.selectTime')"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 设备唯一识别码 -->
|
||||||
|
<el-form-item label="设备唯一识别码" prop="devSn">
|
||||||
|
<el-input
|
||||||
|
v-model="facilityForm.devSn"
|
||||||
|
:placeholder="$t('message.lifter.pleaseEnter')"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
<!-- 设备备案编号 -->
|
<!-- 设备备案编号 -->
|
||||||
<el-form-item :label="$t('message.lifter.equipmentRecordNo')" prop="registNo">
|
<el-form-item :label="$t('message.lifter.equipmentRecordNo')" prop="registNo">
|
||||||
<el-input
|
<el-input
|
||||||
|
|||||||
@ -137,6 +137,13 @@
|
|||||||
:placeholder="$t('message.lifter.selectTime')"
|
:placeholder="$t('message.lifter.selectTime')"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 设备唯一识别码 -->
|
||||||
|
<el-form-item label="设备唯一识别码" prop="devSn">
|
||||||
|
<el-input
|
||||||
|
v-model="facilityForm.devSn"
|
||||||
|
:placeholder="$t('message.lifter.pleaseEnter')"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
<!-- 设备备案编号 -->
|
<!-- 设备备案编号 -->
|
||||||
<el-form-item :label="$t('message.lifter.equipmentRecordNo')" prop="registNo">
|
<el-form-item :label="$t('message.lifter.equipmentRecordNo')" prop="registNo">
|
||||||
<el-input
|
<el-input
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user