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