Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 84dd0e4c
authored
Nov 04, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
v1.12.0版本已上线,合并代码到master See merge request
!32
2 parents
321a1eca
f450fd0a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
18 deletions
src/services/order.js
src/utils/http.js
src/views/work/add.vue
src/views/work/addCar.vue
src/views/work/image.vue
src/services/order.js
View file @
84dd0e4
...
@@ -109,3 +109,7 @@ export const SAVE_RELINKVEHICLE_INFO = params => {
...
@@ -109,3 +109,7 @@ export const SAVE_RELINKVEHICLE_INFO = params => {
return
request
(
params
,
"/trialdrive/workorder/reLinkVehicle"
,
'POST'
);
return
request
(
params
,
"/trialdrive/workorder/reLinkVehicle"
,
'POST'
);
}
}
// 工单管理-工单列表-关联车辆-校验车架号
export
const
CHECK_WORKORDER_VERIFYDUPLICATEVIM
=
params
=>
{
return
request
(
params
,
"/trialdrive/workorder/verifyDuplicateVim"
);
}
\ No newline at end of file
\ No newline at end of file
src/utils/http.js
View file @
84dd0e4
...
@@ -5,7 +5,7 @@ import store from '@/store';
...
@@ -5,7 +5,7 @@ import store from '@/store';
import
{
checkStatus
,
showLoading
}
from
'./checkStatus'
;
import
{
checkStatus
,
showLoading
}
from
'./checkStatus'
;
const
instance
=
axios
.
create
({
// 创建axios实例,在这里可以设置请求的默认配置
const
instance
=
axios
.
create
({
// 创建axios实例,在这里可以设置请求的默认配置
timeout
:
60000
,
// 设置超时时间60s
timeout
:
180000
,
// 设置超时时间3分钟
retry
:
3
,
retry
:
3
,
retryDelay
:
1000
retryDelay
:
1000
})
})
...
...
src/views/work/add.vue
View file @
84dd0e4
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<!-- 弹框 开始 -->
<!-- 弹框 开始 -->
<glsx-dialog
:show=
"showDialog"
:title=
"current.id?'编辑车辆':'新增车辆'"
@
close=
"closeDialog()"
>
<glsx-dialog
:show=
"showDialog"
:title=
"current.id?'编辑车辆':'新增车辆'"
@
close=
"closeDialog()"
>
<div>
<div>
<add-car
ref=
"addCarCom"
:info=
"current"
@
change=
"onChange"
></add-car>
<add-car
ref=
"addCarCom"
:info=
"current"
:list=
"tableData"
@
change=
"onChange"
></add-car>
</div>
</div>
<
template
slot=
"footer"
>
<
template
slot=
"footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"saveCar()"
>
保存
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"saveCar()"
>
保存
</el-button>
...
...
src/views/work/addCar.vue
View file @
84dd0e4
...
@@ -25,16 +25,18 @@
...
@@ -25,16 +25,18 @@
<el-input
v-model=
"addForm.engineNo"
maxlength=
"17"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"addForm.engineNo"
maxlength=
"17"
placeholder=
"请输入"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
GET_DEVICE_COMPOSE
,
GET_DEVICE_COMPOSE
,
GET_VEHICLE_SELECTEDTYPETREE
,
GET_VEHICLE_SELECTEDTYPETREE
,
CHECK_WORKORDER_VERIFYDUPLICATEVIM
,
}
from
"@/services/order"
;
}
from
"@/services/order"
;
import
{
Validator
}
from
"@/common/validator"
;
import
{
Validator
}
from
"@/common/validator"
;
import
PlateNumberInput
from
"@/components/plateNumberInput"
;
import
PlateNumberInput
from
"@/components/plateNumberInput"
;
import
{
deepClone
}
from
"@/utils/util"
;
import
{
deepClone
,
showModal
}
from
"@/utils/util"
;
export
default
{
export
default
{
name
:
"AddCar"
,
name
:
"AddCar"
,
components
:
{
components
:
{
...
@@ -47,8 +49,31 @@ export default {
...
@@ -47,8 +49,31 @@ export default {
return
{};
return
{};
},
},
},
},
list
:
{
type
:
Array
,
default
:
function
()
{
return
[];
},
},
},
},
data
()
{
data
()
{
var
validCarVin
=
(
rule
,
value
,
callback
)
=>
{
console
.
log
(
this
.
list
);
let
info
=
this
.
info
;
let
list
=
this
.
list
;
let
idx
=
list
.
findIndex
((
k
)
=>
k
.
vin
==
value
);
console
.
log
(
info
.
vin
+
'---------'
+
value
)
// 编辑车辆,不修改车架号,不校验
if
(
info
&&
info
.
vin
==
value
)
{
console
.
log
(
'7777777777'
)
return
callback
();
}
if
(
idx
>=
0
)
{
console
.
log
(
'66666666'
)
return
callback
(
new
Error
(
"该车架号已新增,请修改后再保存"
));
}
callback
();
};
return
{
return
{
addForm
:
{},
addForm
:
{},
addFormRules
:
{
addFormRules
:
{
...
@@ -59,6 +84,7 @@ export default {
...
@@ -59,6 +84,7 @@ export default {
message
:
"17位英文和数字组合"
,
message
:
"17位英文和数字组合"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
},
},
{
validator
:
validCarVin
,
trigger
:
"blur"
},
],
],
deviceCompose
:
[
deviceCompose
:
[
{
required
:
true
,
message
:
"请选择设备组合"
,
trigger
:
"change"
},
{
required
:
true
,
message
:
"请选择设备组合"
,
trigger
:
"change"
},
...
@@ -84,7 +110,7 @@ export default {
...
@@ -84,7 +110,7 @@ export default {
info
:
{
info
:
{
handler
:
function
(
n
,
o
)
{
handler
:
function
(
n
,
o
)
{
console
.
log
(
n
);
console
.
log
(
n
);
this
.
addForm
=
n
;
this
.
addForm
=
deepClone
(
n
)
;
},
},
immediate
:
true
,
immediate
:
true
,
},
},
...
@@ -158,15 +184,21 @@ export default {
...
@@ -158,15 +184,21 @@ export default {
return
false
;
return
false
;
}
}
let
o
=
deepClone
(
_this
.
addForm
);
let
o
=
deepClone
(
_this
.
addForm
);
let
list
=
this
.
deviceList
;
// 校验车架号
let
n
=
list
.
find
((
k
)
=>
k
.
code
==
o
.
deviceCompose
);
CHECK_WORKORDER_VERIFYDUPLICATEVIM
({
vin
:
o
.
vin
}).
then
((
res
)
=>
{
if
(
!
o
.
id
)
{
// true:标识存在相同的车架号,false:表示不存在相同车架号的车辆
o
.
id
=
new
Date
().
getTime
();
if
(
res
.
data
)
{
}
showModal
({
message
:
"该车架号已存在,请核对!"
,
o
.
deviceComposeName
=
n
.
name
;
showCancelButton
:
true
,
_this
.
$emit
(
"change"
,
o
);
success
:
function
()
{
_this
.
rest
();
_this
.
addCarInfo
();
},
});
return
false
;
}
_this
.
addCarInfo
();
});
});
});
},
},
...
@@ -183,6 +215,19 @@ export default {
...
@@ -183,6 +215,19 @@ export default {
_this
.
$refs
.
addCarForm
.
clearValidate
();
_this
.
$refs
.
addCarForm
.
clearValidate
();
},
100
);
},
100
);
},
},
// 添加车辆
addCarInfo
()
{
let
o
=
deepClone
(
this
.
addForm
);
let
list
=
this
.
deviceList
;
let
n
=
list
.
find
((
k
)
=>
k
.
code
==
o
.
deviceCompose
);
if
(
!
o
.
id
)
{
o
.
id
=
new
Date
().
getTime
();
}
o
.
deviceComposeName
=
n
.
name
;
this
.
$emit
(
"change"
,
o
);
this
.
rest
();
},
},
},
};
};
</
script
>
</
script
>
...
...
src/views/work/image.vue
View file @
84dd0e4
...
@@ -64,9 +64,7 @@ export default {
...
@@ -64,9 +64,7 @@ export default {
immediate
:
true
,
immediate
:
true
,
},
},
},
},
mounted
()
{
mounted
()
{},
},
methods
:
{
methods
:
{
// 监听选择图片
// 监听选择图片
onChange
(
file
,
fileList
)
{
onChange
(
file
,
fileList
)
{
...
@@ -108,8 +106,8 @@ export default {
...
@@ -108,8 +106,8 @@ export default {
// 上传图片到服务器
// 上传图片到服务器
uploadImage
(
params
=
{},
noSignAttr
=
[
"file"
])
{
uploadImage
(
params
=
{},
noSignAttr
=
[
"file"
])
{
let
_this
=
this
;
let
_this
=
this
;
const
fileUploadURL
=
const
fileUploadURL
=
"https://didicb.glsx.com.cn"
||
localStorage
.
getItem
(
"FILE_UPLOAD_URL"
);
"https://didicb.glsx.com.cn"
||
localStorage
.
getItem
(
"FILE_UPLOAD_URL"
);
//const fileUploadURL = 'http://qcdidicb.dev.glsx.com.cn:7060' // 给java后台测试用的地址
params
.
source
=
"glsx-oss-carowner"
;
params
.
source
=
"glsx-oss-carowner"
;
params
.
app_key
=
"48e5e13229b82c1b4e6e8c96151f0637"
;
params
.
app_key
=
"48e5e13229b82c1b4e6e8c96151f0637"
;
params
.
timestamp
=
new
Date
().
getTime
();
params
.
timestamp
=
new
Date
().
getTime
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment