CRM_26-08-05#story#9126,车辆管理、服务商管理系统需求(清除数据)
This commit is contained in:
@@ -723,18 +723,8 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
async initPage() {
|
||||
// 重置图片槽位,避免 keep-alive 缓存复用时残留上一辆车的图片
|
||||
this.vehicleLicenseFrontList = []
|
||||
this.vehicleLicenseBackList = []
|
||||
this.vehicleLicenseCarPhotoList = []
|
||||
this.vehicleFrontPhotoList = []
|
||||
this.insurancePictureFiles = []
|
||||
this.vehicleLicenseFront = ''
|
||||
this.vehicleLicenseBack = ''
|
||||
this.vehicleLicenseCarPhoto = ''
|
||||
this.vehicleFrontPhoto = ''
|
||||
this.insurancePicturePhoto = ''
|
||||
this.vehicleLicenseBackOcrFlag = false
|
||||
// 整体重置为初始 data(keep-alive 缓存复用时清空上一次的新增/修改数据,含 watcher 改过的 vehicleTypes.disabled),再按当前模式初始化
|
||||
Object.assign(this.$data, this.$options.data.call(this, this))
|
||||
this.id=this.$route.params?.id
|
||||
this.approvalForm.supplierId=this.$route.params?.supplierId
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
@@ -745,6 +735,10 @@ export default {
|
||||
if( this.id){
|
||||
await this.vehicleInfo()
|
||||
}else{
|
||||
// 新增:清空 el-tree 勾选状态(缓存复用时可能残留上一辆车的服务种类勾选)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree && this.$refs.tree.setCheckedKeys([])
|
||||
})
|
||||
this.originData={
|
||||
vehicleType:'',
|
||||
vehicleStatus:'',
|
||||
|
||||
Reference in New Issue
Block a user