parent
330322d473
commit
74765a232a
|
@ -405,6 +405,11 @@ export default {
|
||||||
this.detailDialogVisible = false
|
this.detailDialogVisible = false
|
||||||
},
|
},
|
||||||
deleteSingleDataDeleteBtn(BLACK_LIST_ID, VEHICLE_ID) {
|
deleteSingleDataDeleteBtn(BLACK_LIST_ID, VEHICLE_ID) {
|
||||||
|
this.$confirm('是否移除黑名单?', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
requestFN(
|
requestFN(
|
||||||
'blackListManage/delBlackList',
|
'blackListManage/delBlackList',
|
||||||
{
|
{
|
||||||
|
@ -425,6 +430,7 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 检查车牌号是否规范
|
// 检查车牌号是否规范
|
||||||
goCheckLicenceNo() {
|
goCheckLicenceNo() {
|
||||||
|
|
|
@ -94,36 +94,26 @@
|
||||||
<!-- 添加车辆违规信息 -->
|
<!-- 添加车辆违规信息 -->
|
||||||
<el-dialog :visible.sync="addDialogVisible" title="添加车辆违规信息" width="600px">
|
<el-dialog :visible.sync="addDialogVisible" title="添加车辆违规信息" width="600px">
|
||||||
<el-form v-if="addDialogVisible" ref="addForm" :rules="addFormRules" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
|
<el-form v-if="addDialogVisible" ref="addForm" :rules="addFormRules" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
|
||||||
<el-form-item :rules="[{required: true}]" label="车牌号" label-width="110px">
|
<el-form-item label="车牌号" label-width="110px" prop="LICENCE_NO">
|
||||||
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNo()"/>
|
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNo()"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 白牌、蓝牌、黄牌、绿牌、黑牌 下拉框-->
|
<!-- 白牌、蓝牌、黄牌、绿牌、黑牌 下拉框-->
|
||||||
<el-form-item :rules="[{required: true}]" label="车牌类型" label-width="110px" prop="LICENCE_TYPE">
|
<el-form-item label="车牌类型" label-width="110px" prop="LICENCE_TYPE">
|
||||||
<SelectTree
|
<el-select v-model="addForm.LICENCE_TYPE" label-width="110px">
|
||||||
ref="selectTree_add2"
|
<el-option v-for="item in licenceTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
||||||
:clearable="false"
|
</el-select>
|
||||||
:options="licenceTypeList"
|
|
||||||
:props="oneselfDefaultProps"
|
|
||||||
v-model="addForm.LICENCE_TYPE"
|
|
||||||
placeholder="请选择车牌类型"
|
|
||||||
style="width: 300px"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 货车、轿车、大巴客车 下拉框-->
|
<!-- 货车、轿车、大巴客车 下拉框-->
|
||||||
<el-form-item :rules="[{required: true}]" label="车辆类型" label-width="110px" prop="VEHICLE_TYPE">
|
<el-form-item label="车辆类型" label-width="110px" prop="VEHICLE_TYPE">
|
||||||
<SelectTree
|
<el-select v-model="addForm.VEHICLE_TYPE" label-width="110px">
|
||||||
ref="selectTree_add3"
|
<el-option v-for="item in vehicleTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
||||||
:clearable="false"
|
</el-select>
|
||||||
:options="vehicleTypeList"
|
|
||||||
:props="oneselfDefaultProps"
|
|
||||||
v-model="addForm.VEHICLE_TYPE"
|
|
||||||
placeholder="请选择车辆类型"
|
|
||||||
style="width: 300px"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :rules="[{required: true}]" label="违规时间" label-width="110px">
|
<el-form-item label="违规时间" label-width="110px" prop="VIOLATIONTIME">
|
||||||
<el-date-picker id="VIOLATIONTIME" ref="VIOLATIONTIME" v-model="addForm.VIOLATIONTIME" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" style="width: 100%" type="datetime" placeholder="请选择" />
|
<el-date-picker id="VIOLATIONTIME" ref="VIOLATIONTIME" v-model="addForm.VIOLATIONTIME" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" style="width: 100%" type="datetime" placeholder="请选择" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 违规类型:(0-未按规定车道行驶,1-违规停车) 下拉框-->
|
<!-- 违规类型:(0-未按规定车道行驶,1-违规停车) 下拉框-->
|
||||||
<el-form-item :rules="[{required: true}]" label="违规类型" label-width="110px" prop="VIOLATION_TYPE">
|
<el-form-item label="违规类型" label-width="110px" prop="VIOLATION_TYPE">
|
||||||
<SelectTree
|
<SelectTree
|
||||||
ref="selectTree_add3"
|
ref="selectTree_add3"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
|
@ -133,10 +123,10 @@
|
||||||
placeholder="请选择违规类型"
|
placeholder="请选择违规类型"
|
||||||
style="width: 300px"/>
|
style="width: 300px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :rules="[{required: true}]" label="违规区域" label-width="110px" prop="LOCATION">
|
<el-form-item label="违规区域" label-width="110px" prop="LOCATION">
|
||||||
<el-input :rows="3" v-model="addForm.LOCATION" type="textarea" placeholder="违规区域需明确车辆在港口内的具体违规位置如某一口门附近、某一码头区域、某一仓库通道等..."/>
|
<el-input :rows="3" v-model="addForm.LOCATION" type="textarea" placeholder="违规区域需明确车辆在港口内的具体违规位置如某一口门附近、某一码头区域、某一仓库通道等..."/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :rules="[{required: true}]" label="违规图片" label-width="110px" prop="FFILE">
|
<el-form-item label="违规图片" label-width="110px" prop="FFILE">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="violationImageUpload"
|
ref="violationImageUpload"
|
||||||
:class="{hide:violationUpload}"
|
:class="{hide:violationUpload}"
|
||||||
|
@ -163,7 +153,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="addDialogCancelBtn">取 消</el-button>
|
<el-button @click="addDialogCancelBtn">取 消</el-button>
|
||||||
<el-button type="primary" @click="addDialogConfirmBtn">确 定</el-button>
|
<el-button type="primary" @click="addDialogConfirmBtn('addForm')">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -233,9 +223,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 添加表单的验证规则
|
// 添加表单的验证规则
|
||||||
addFormRules: {
|
addFormRules: {
|
||||||
LICENCE_NO: [{ required: true, message: '车牌号不能为空', trigger: 'blur' }],
|
LICENCE_NO: [
|
||||||
|
{ required: true, message: '车牌号不能为空', trigger: 'blur' },
|
||||||
|
{ pattern: /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/, message: '请填写正确的车牌号', trigger: 'blur' }
|
||||||
|
],
|
||||||
VIOLATION_TYPE: [{ required: true, message: '请选择违规类型', trigger: 'blur' }],
|
VIOLATION_TYPE: [{ required: true, message: '请选择违规类型', trigger: 'blur' }],
|
||||||
FFILE: [{ required: true, message: '违规图片不能为空', trigger: 'blur' }],
|
FFILE: [{ required: true, message: '违规图片不能为空', trigger: 'blur' }],
|
||||||
|
LOCATION: [{ required: true, message: '违规区域不能为空', trigger: 'blur' }],
|
||||||
|
VIOLATIONTIME: [{ required: true, message: '违规时间不能为空', trigger: 'blur' }],
|
||||||
LICENCE_TYPE: [{ required: true, message: '请选择车牌类型', trigger: 'blur' }],
|
LICENCE_TYPE: [{ required: true, message: '请选择车牌类型', trigger: 'blur' }],
|
||||||
VEHICLE_TYPE: [{ required: true, message: '请选择车辆类型', trigger: 'blur' }]
|
VEHICLE_TYPE: [{ required: true, message: '请选择车辆类型', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
|
@ -408,60 +403,16 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 添加弹窗的确定按钮
|
// 添加弹窗的确定按钮
|
||||||
addDialogConfirmBtn() {
|
addDialogConfirmBtn(formName) {
|
||||||
if (this.addForm.LICENCE_NO !== null && this.addForm.LICENCE_NO === '') {
|
this.addForm.FFILE = this.violation_files
|
||||||
this.$message({
|
this.$refs[formName].validate((valid) => {
|
||||||
message: '车牌号不能为空',
|
if (!valid) {
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.addForm.LICENCE_TYPE !== null && this.addForm.LICENCE_TYPE === '') {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择车牌类型',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.addForm.VEHICLE_TYPE !== null && this.addForm.VEHICLE_TYPE === '') {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择车辆类型',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.addForm.VIOLATIONTIME !== null && this.addForm.VIOLATIONTIME === '') {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择违规时间',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.addForm.VIOLATION_TYPE !== null && this.addForm.VIOLATION_TYPE === '') {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择违规类型',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.addForm.LOCATION !== null && this.addForm.LOCATION === '') {
|
|
||||||
this.$message({
|
|
||||||
message: '请填写违规区域',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (this.$refs.violationImageUpload.uploadFiles.length < 1) {
|
|
||||||
this.$message({
|
|
||||||
message: '请上传违规图片',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
this.loading = false
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.$refs.addForm.validate(valid => {
|
this.$refs.addForm.validate(valid => {
|
||||||
this.addRequest(valid) // 同时保存多张图片
|
this.addRequest(valid) // 同时保存多张图片
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
addRequest(valid) {
|
addRequest(valid) {
|
||||||
requestFN(
|
requestFN(
|
||||||
|
@ -545,18 +496,20 @@ export default {
|
||||||
// 检查车牌号是否规范
|
// 检查车牌号是否规范
|
||||||
goCheckLicenceNo() {
|
goCheckLicenceNo() {
|
||||||
if (this.addForm.LICENCE_NO === '') {
|
if (this.addForm.LICENCE_NO === '') {
|
||||||
this.$message.success('请输入车牌号')
|
return
|
||||||
this.ISCHECK = false
|
}
|
||||||
} else {
|
|
||||||
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
|
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
|
||||||
const result = regex.test(this.addForm.LICENCE_NO)
|
const result = regex.test(this.addForm.LICENCE_NO)
|
||||||
if (result) {
|
if (result) {
|
||||||
this.$message.success('验证通过')
|
requestFN(
|
||||||
this.ISCHECK = true
|
'/vehiclemessage/licenceNo',
|
||||||
} else {
|
{
|
||||||
this.$message.success('车牌号不规范')
|
'licenceNo': this.addForm.LICENCE_NO
|
||||||
this.ISCHECK = false
|
|
||||||
}
|
}
|
||||||
|
).then((data) => {
|
||||||
|
this.addForm.LICENCE_TYPE = String(data.res.LICENCE_TYPE)
|
||||||
|
this.addForm.VEHICLE_TYPE = String(data.res.VEHICLE_TYPE)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue