Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
郑艺斌
/
emaint-web-master
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9a4daf48
authored
Nov 29, 2022
by
郑艺斌
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
2022/11/29
parent
57f6a1fd
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
2598 additions
and
2519 deletions
src/assets/js/request.js
src/views/commonProblem/index.vue
src/views/dataReport/index.vue
src/views/operationData/index.vue
src/views/problemConfiguration/index.vue
src/views/report/overview/index.vue
src/views/workOrder/index.vue
src/views/workOrderEdit/index.vue
src/views/workOrderManage/index.vue
src/assets/js/request.js
View file @
9a4daf48
...
@@ -3,6 +3,7 @@ import qs from "qs";
...
@@ -3,6 +3,7 @@ import qs from "qs";
import
{
Message
}
from
"iview"
;
import
{
Message
}
from
"iview"
;
axios
.
defaults
.
baseURL
=
"https://emaint.meiqicloud.com"
;
axios
.
defaults
.
baseURL
=
"https://emaint.meiqicloud.com"
;
// axios.defaults.baseURL = "http://172.16.4.29:8063";
// axios.defaults.baseURL='http://localhost:8063'
// axios.defaults.baseURL='http://localhost:8063'
export
function
qsdata
(
data
)
{
export
function
qsdata
(
data
)
{
return
qs
.
parse
(
qs
.
stringify
(
data
));
return
qs
.
parse
(
qs
.
stringify
(
data
));
...
...
src/views/commonProblem/index.vue
View file @
9a4daf48
...
@@ -2,100 +2,111 @@
...
@@ -2,100 +2,111 @@
<div
class=
"page1"
>
<div
class=
"page1"
>
<Row
:gutter=
"10"
class=
"mt10"
>
<Row
:gutter=
"10"
class=
"mt10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card>
<Card>
<p
slot=
"title"
>
<p
slot=
"title"
>
<Icon
type=
"navicon-round"
></Icon>
<Icon
type=
"navicon-round"
></Icon>
问题类别
问题类别
</p>
</p>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Row>
<Row>
<Col></Col>
<Col>
<Col>
</Col>
<template>
<Col>
<Tree
:data=
"questionlis"
@
on-select-change=
"showchildren"
:empty-text=
"'加载中...'"
></Tree>
<template>
</
template
>
<Tree
:data=
"questionlis"
@
on-select-change=
"showchildren"
@
on-toggle-expand=
"onToggleExpand"
</Col>
:empty-text=
"'加载中...'"
></Tree>
</Row>
</
template
>
</div>
</Col>
</Card>
</Row>
</div>
</Card>
</Col>
</Col>
</Row>
</Row>
<div
style=
"width:100%;"
class=
"mt11"
>
<div
style=
"width:100%;"
class=
"mt11"
>
<Row
:gutter=
"10"
>
<Row
:gutter=
"10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card
class=
"search-card"
>
<Card
class=
"search-card"
>
<p
slot=
"title"
>
<p
slot=
"title"
>
{{$route.meta.title}}
{{ $route.meta.title }}
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
</p>
</p>
<div
id=
"search-body"
>
<div
id=
"search-body"
>
<Form
:model=
"formItem"
:label-width=
"80"
>
<Form
:model=
"formItem"
:label-width=
"80"
>
<Row
type=
"flex"
justify=
"start"
>
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"12"
>
<Col
span=
"12"
>
<FormItem
label=
"常见问题"
>
<FormItem
label=
"常见问题"
>
<Input
v-model=
"formItem.problem"
:maxlength=
"20"
placeholder=
"请输入常见问题"
></Input>
<Input
v-model=
"formItem.problem"
:maxlength=
"20"
placeholder=
"请输入常见问题"
></Input>
</FormItem>
</FormItem>
</Col>
</Row>
</Form>
<div
class=
"search-row"
>
<Col></Col>
<Col>
<Button
type=
"primary"
icon=
"search"
@
click=
"searchSubmit"
>
搜索
</Button>
<Button
type=
"ghost"
icon=
"refresh"
@
click=
"searchCancel"
>
重置
</Button>
</Col>
</Col>
</div>
</Row>
</Form>
<div
class=
"search-row"
>
<Col>
</Col>
<Col>
<Button
type=
"primary"
icon=
"search"
@
click=
"searchSubmit"
>
搜索
</Button>
<Button
type=
"ghost"
icon=
"refresh"
@
click=
"searchCancel"
>
重置
</Button>
</Col>
</div>
</div>
</Card>
</div>
</Card>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
class=
"mt10 lastmt10"
>
<Row
:gutter=
"10"
class=
"mt10 lastmt10"
>
<Col
span=
"24"
class=
"TabsList"
>
<div
v-for=
"(item, index) in tabsList"
:class=
"{ tabsItem: true, 'tabsActive': tabActive === item.value }"
@
click=
"onTabs(item.value)"
>
{{ item.label }}
</div>
</Col>
</Row>
<Row
:gutter=
"10"
class=
"lastmt10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card>
<Card
dis-hover
>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Row>
<Row>
<Col>
<Col>
<Button
type=
"primary"
icon=
"plus-round"
@
click=
"addProject"
>
新增
</Button>
<Button
type=
"primary"
icon=
"plus-round"
@
click=
"addProject"
>
新增
</Button>
</Col>
</Col>
<Col></Col>
</Row>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:searchTime=
"searchTime"
:isFirst=
"isFirst"
></m-table>
</Row>
</Row>
</Card>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:searchTime=
"searchTime"
:isFirst=
"isFirst"
></m-table>
</Row>
</Card>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
<Modal
v-model=
"addModal"
title=
"
常见问题新增
"
width=
"800"
@
on-cancel=
"addCancel"
>
<Modal
v-model=
"addModal"
title=
"
分类标签
"
width=
"800"
@
on-cancel=
"addCancel"
>
<Form
ref=
"addForm"
:model=
"addForm"
:label-width=
"100"
:rules=
"ruleAdd"
>
<Form
ref=
"addForm"
:model=
"addForm"
:label-width=
"100"
:rules=
"ruleAdd"
>
<Row>
<Row>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"常见问题"
prop=
"problem"
>
<FormItem
label=
"标签分类"
prop=
"problem"
>
<Input
v-model=
"addForm.problem"
placeholder=
"请输入常见问题"
></Input>
<RadioGroup
v-model=
"addForm.label"
>
</FormItem>
<Radio
label=
"常见问题"
></Radio>
<Radio
label=
"解决办法"
></Radio>
</RadioGroup>
</FormItem>
</Col>
<Col
span=
"20"
>
<FormItem
label=
"常见问题"
prop=
"problem"
>
<Input
v-model=
"addForm.problem"
placeholder=
"请输入常见问题"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"优先级"
>
<FormItem
label=
"优先级"
>
<div>
<div>
<Select
v-model=
"addForm.priority"
placeholder=
"请选择优先级"
>
<Select
v-model=
"addForm.priority"
placeholder=
"请选择优先级"
>
<Option
:value=
"item.value"
v-for=
"(item,index) in yxj"
:key=
"index"
>
{{item.name
}}
</Option>
<Option
:value=
"item.value"
v-for=
"(item, index) in yxj"
:key=
"index"
>
{{ item.name
}}
</Option>
</Select>
</Select>
</div>
</div>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"20"
>
<Col
span=
"20"
>
<Form-item
label=
"父级类目"
>
<Form-item
label=
"父级类目"
>
<Input
v-model=
"parentname"
readonly
></Input>
<Input
v-model=
"parentname"
readonly
></Input>
</Form-item>
</Form-item>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
...
@@ -109,40 +120,31 @@
...
@@ -109,40 +120,31 @@
<Form
ref=
"updateForm"
:model=
"updateForm"
:label-width=
"100"
:rules=
"ruleAdd"
>
<Form
ref=
"updateForm"
:model=
"updateForm"
:label-width=
"100"
:rules=
"ruleAdd"
>
<Row>
<Row>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"常见问题"
prop=
"problem"
>
<FormItem
label=
"常见问题"
prop=
"problem"
>
<Input
v-model=
"updateForm.problem"
placeholder=
"请输入常见问题"
></Input>
<Input
v-model=
"updateForm.problem"
placeholder=
"请输入常见问题"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"优先级"
>
<FormItem
label=
"优先级"
>
<div>
<div>
<Select
v-model=
"updateForm.priority"
placeholder=
"请选择优先级"
>
<Select
v-model=
"updateForm.priority"
placeholder=
"请选择优先级"
>
<Option
:value=
"item.value"
v-for=
"(item,index) in yxj"
:key=
"index"
>
{{item.name
}}
</Option>
<Option
:value=
"item.value"
v-for=
"(item, index) in yxj"
:key=
"index"
>
{{ item.name
}}
</Option>
</Select>
</Select>
</div>
</div>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"20"
>
<Col
span=
"20"
>
<Form-item
label=
"父级类目"
>
<Form-item
label=
"父级类目"
>
<i-select
placeholder=
"请选择父级"
v-model=
"updateForm.parentId"
style=
"text-align:left"
>
<i-select
placeholder=
"请选择父级"
v-model=
"updateForm.parentId"
style=
"text-align:left"
>
<i-option
<i-option
:value=
"item.id"
v-for=
"(item, index) in fjlm"
:key=
"index"
>
{{ item.problem }}
</i-option>
:value=
"item.id"
</i-select>
v-for=
"(item,index) in fjlm"
</Form-item>
:key=
"index"
>
{{item.problem}}
</i-option>
</i-select>
</Form-item>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
<div
slot=
"footer"
style=
"text-align: right;"
>
<div
slot=
"footer"
style=
"text-align: right;"
>
<Button
type=
"ghost"
size=
"default"
@
click=
"addCancel"
>
取消
</Button>
<Button
type=
"ghost"
size=
"default"
@
click=
"addCancel"
>
取消
</Button>
<Button
<Button
type=
"primary"
size=
"default"
@
click=
"addSubmit('update')"
:loading=
"modal_loading"
>
确定
</Button>
type=
"primary"
size=
"default"
@
click=
"addSubmit('update')"
:loading=
"modal_loading"
>
确定
</Button>
</div>
</div>
</Modal>
</Modal>
...
@@ -158,7 +160,7 @@
...
@@ -158,7 +160,7 @@
import
qs
from
"qs"
;
import
qs
from
"qs"
;
import
util
from
"@/assets/js/util"
;
import
util
from
"@/assets/js/util"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
updateModel
:
false
,
updateModel
:
false
,
...
@@ -181,7 +183,8 @@ export default {
...
@@ -181,7 +183,8 @@ export default {
formItem
:
{
formItem
:
{
parentId
:
"null"
,
parentId
:
"null"
,
problem
:
""
,
problem
:
""
,
watch
:
true
watch
:
true
,
label
:
""
},
},
//表格
//表格
tableConfig
:
{
tableConfig
:
{
...
@@ -214,6 +217,7 @@ export default {
...
@@ -214,6 +217,7 @@ export default {
qs
.
stringify
({
id
:
params
.
row
.
id
}),
qs
.
stringify
({
id
:
params
.
row
.
id
}),
res
=>
{
res
=>
{
this
.
updateForm
=
res
.
responseResult
;
this
.
updateForm
=
res
.
responseResult
;
return
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/problem-base/view"
,
"/api/emaint/problem-base/view"
,
qs
.
stringify
({
id
:
this
.
updateForm
.
parentId
}),
qs
.
stringify
({
id
:
this
.
updateForm
.
parentId
}),
...
@@ -277,11 +281,35 @@ export default {
...
@@ -277,11 +281,35 @@ export default {
type
:
params
.
row
.
priority
===
'一级'
?
'error'
:
(
params
.
row
.
priority
===
'二级'
?
'warning'
:
(
params
.
row
.
priority
===
'三级'
?
'success'
:
'info'
)),
type
:
params
.
row
.
priority
===
'一级'
?
'error'
:
(
params
.
row
.
priority
===
'二级'
?
'warning'
:
(
params
.
row
.
priority
===
'三级'
?
'success'
:
'info'
)),
size
:
'small'
size
:
'small'
}
}
},
!
params
.
row
.
priority
?
'未设置'
:
params
.
row
.
priority
)
},
!
params
.
row
.
priority
?
'未设置'
:
params
.
row
.
priority
)
])
])
}
}
},
},
{
{
title
:
"标题分类"
,
key
:
"label"
,
width
:
200
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
if
(
params
.
row
.
label
==
'0'
)
{
return
h
(
'span'
,
'常见问题'
)
}
else
if
(
params
.
row
.
label
==
'1'
)
{
return
h
(
'span'
,
'解决问题'
)
}
else
{
return
h
(
'span'
,
''
)
}
}
},
{
title
:
"常见问题"
,
title
:
"常见问题"
,
key
:
"problem"
,
key
:
"problem"
,
width
:
200
,
width
:
200
,
...
@@ -294,6 +322,7 @@ export default {
...
@@ -294,6 +322,7 @@ export default {
parentId
:
""
parentId
:
""
},
},
questionlis
:
[],
questionlis
:
[],
questionlis1
:
[],
//新增表单
//新增表单
addForm
:
{
addForm
:
{
problem
:
""
,
problem
:
""
,
...
@@ -306,25 +335,38 @@ export default {
...
@@ -306,25 +335,38 @@ export default {
problem
:
[
problem
:
[
{
required
:
true
,
message
:
"请输入常见问题"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请输入常见问题"
,
trigger
:
"blur"
}
]
]
}
},
tabsList
:
[
{
label
:
'全部'
,
value
:
''
},
{
label
:
'常见问题'
,
value
:
'0'
},
{
label
:
'解决办法'
,
value
:
'1'
},
],
tabActive
:
''
};
};
},
},
computed
:
{
computed
:
{
// 被选择的列表数据条数
// 被选择的列表数据条数
selected_count
()
{
selected_count
()
{
return
this
.
$refs
.
table
.
selected_count
;
return
this
.
$refs
.
table
.
selected_count
;
},
},
// 被选择的列表数据
// 被选择的列表数据
selection
()
{
selection
()
{
return
this
.
$refs
.
table
.
selection
;
return
this
.
$refs
.
table
.
selection
;
}
}
},
},
mounted
()
{
mounted
()
{
//获取楼栋
//获取楼栋
},
},
methods
:
{
methods
:
{
showchildren
(
v
)
{
onToggleExpand
(
v
)
{
if
(
v
.
length
>
0
){
console
.
log
(
v
);
if
(
v
.
expand
&&
v
.
childList
.
length
>
0
)
{
this
.
fjlm
=
v
.
childList
return
}
},
showchildren
(
v
)
{
if
(
v
.
length
>
0
)
{
if
(
v
[
0
].
childList
)
{
if
(
v
[
0
].
childList
)
{
return
;
return
;
}
else
{
}
else
{
...
@@ -334,16 +376,16 @@ export default {
...
@@ -334,16 +376,16 @@ export default {
}
}
},
},
//开始时间
//开始时间
getStartDate
(
startDate
)
{
getStartDate
(
startDate
)
{
this
.
formItem
.
startUpdateTime
=
startDate
;
this
.
formItem
.
startUpdateTime
=
startDate
;
},
},
//结束时间
//结束时间
getEndDate
(
endDate
)
{
getEndDate
(
endDate
)
{
this
.
formItem
.
endUpdateTime
=
endDate
;
this
.
formItem
.
endUpdateTime
=
endDate
;
},
},
//新增
//新增
addProject
()
{
addProject
()
{
if
(
this
.
activeli
.
id
==
""
)
{
if
(
this
.
activeli
.
id
==
""
)
{
this
.
$Message
.
info
(
"请先选中一条二级记录"
);
this
.
$Message
.
info
(
"请先选中一条二级记录"
);
return
;
return
;
...
@@ -351,7 +393,7 @@ export default {
...
@@ -351,7 +393,7 @@ export default {
this
.
addModal
=
true
;
this
.
addModal
=
true
;
this
.
addForm
.
parentId
=
this
.
activeli
.
id
;
this
.
addForm
.
parentId
=
this
.
activeli
.
id
;
this
.
questionlis
.
forEach
(
v
=>
{
this
.
questionlis
1
.
forEach
(
v
=>
{
if
(
v
.
parentId
==
this
.
activeli
.
parentId
)
{
if
(
v
.
parentId
==
this
.
activeli
.
parentId
)
{
v
.
childList
.
forEach
(
v1
=>
{
v
.
childList
.
forEach
(
v1
=>
{
if
(
v1
.
id
==
this
.
activeli
.
id
)
{
if
(
v1
.
id
==
this
.
activeli
.
id
)
{
...
@@ -363,12 +405,12 @@ export default {
...
@@ -363,12 +405,12 @@ export default {
// this.getIndex()
// this.getIndex()
},
},
//新增表格选项
//新增表格选项
select
(
selection
)
{
select
(
selection
)
{
this
.
addForm
.
dataId
=
selection
this
.
addForm
.
dataId
=
selection
.
map
(
item
=>
item
.
id
)
.
map
(
item
=>
item
.
id
)
},
},
//新增确定
//新增确定
addSubmit
(
type
)
{
addSubmit
(
type
)
{
this
.
modal_loading
=
true
;
this
.
modal_loading
=
true
;
var
ref
=
this
.
$refs
.
addForm
;
var
ref
=
this
.
$refs
.
addForm
;
type
==
"update"
type
==
"update"
...
@@ -399,14 +441,14 @@ export default {
...
@@ -399,14 +441,14 @@ export default {
});
});
},
},
//新增取消
//新增取消
addCancel
()
{
addCancel
()
{
this
.
addModal
=
false
;
this
.
addModal
=
false
;
this
.
updateModel
=
false
;
this
.
updateModel
=
false
;
(
this
.
modal_loading
=
false
),
this
.
$Message
.
info
(
"你取消了操作"
);
(
this
.
modal_loading
=
false
),
this
.
$Message
.
info
(
"你取消了操作"
);
this
.
$refs
.
addForm
.
resetFields
();
this
.
$refs
.
addForm
.
resetFields
();
},
},
//删除
//删除
deleteProject
(
id
)
{
deleteProject
(
id
)
{
this
.
$Modal
.
confirm
({
this
.
$Modal
.
confirm
({
title
:
"操作提示"
,
title
:
"操作提示"
,
content
:
"确认删除?"
,
content
:
"确认删除?"
,
...
@@ -430,7 +472,7 @@ export default {
...
@@ -430,7 +472,7 @@ export default {
});
});
},
},
//搜索
//搜索
searchSubmit
()
{
searchSubmit
()
{
this
.
isFirst
=
true
;
this
.
isFirst
=
true
;
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/problem-base/list"
,
"/api/emaint/problem-base/list"
,
...
@@ -445,7 +487,7 @@ export default {
...
@@ -445,7 +487,7 @@ export default {
);
);
},
},
//重置
//重置
searchCancel
()
{
searchCancel
()
{
this
.
formItem
=
{
this
.
formItem
=
{
parentId
:
""
,
parentId
:
""
,
problem
:
""
problem
:
""
...
@@ -461,40 +503,57 @@ export default {
...
@@ -461,40 +503,57 @@ export default {
},
200
);
},
200
);
},
},
//提示窗关闭
//提示窗关闭
closes
()
{
closes
()
{
this
.
noteModal
=
false
;
this
.
noteModal
=
false
;
},
},
getlist
()
{
getlist
()
{
// 查询一级问题
// 查询一级问题
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/problem-base/treeList"
,
"/api/emaint/problem-base/
a/
treeList"
,
{},
{},
data
=>
{
data
=>
{
data
.
responseResult
.
forEach
((
v
,
i
)
=>
{
data
.
responseResult
.
forEach
(
v
=>
{
v
.
title
=
v
.
parentProblem
;
if
(
v
.
dataSource
==
'0'
)
{
v
.
title
=
'特房集团'
}
else
if
(
v
.
dataSource
==
'1'
)
{
v
.
title
=
'塔楼客户'
}
else
if
(
v
.
dataSource
==
'2'
)
{
v
.
title
=
'轨道集团'
}
v
.
children
=
v
.
childList
;
v
.
children
=
v
.
childList
;
v
.
disabled
=
true
v
.
expand
=
true
if
(
v
.
children
.
length
>
0
)
{
if
(
v
.
children
.
length
>
0
)
{
if
(
i
==
0
)
{
v
.
children
.
forEach
(
v1
=>
{
v
.
expand
=
true
;
v
1
.
title
=
v1
.
parentProblem
;
}
else
v
.
expand
=
false
;
v1
.
children
=
v1
.
childList
;
v
.
children
.
forEach
((
v1
,
i1
)
=>
{
if
(
v1
.
children
.
length
>
0
)
{
if
(
i1
==
0
&&
i
==
0
)
{
v1
.
children
.
forEach
(
v2
=>
{
v1
.
selected
=
true
;
v2
.
title
=
v2
.
problem
;
this
.
formItem
.
parentId
=
v1
.
id
;
})
}
}
v1
.
title
=
v1
.
problem
;
v1
.
expand
=
false
;
});
});
}
}
});
});
this
.
questionlis
=
data
.
responseResult
;
this
.
questionlis
=
data
.
responseResult
;
data
.
responseResult
.
forEach
(
item
=>
{
if
(
item
.
childList
.
length
)
{
item
.
childList
.
forEach
(
item1
=>
{
this
.
questionlis1
.
push
(
item1
)
})
}
})
},
},
data
=>
{
data
=>
{
}
}
);
);
},
onTabs
(
value
)
{
this
.
tabActive
=
value
this
.
formItem
.
label
=
value
}
}
},
},
created
()
{
created
()
{
this
.
getlist
();
this
.
getlist
();
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/dictionary/optionsByGroupCode"
,
"/api/dictionary/optionsByGroupCode"
,
...
@@ -508,7 +567,7 @@ export default {
...
@@ -508,7 +567,7 @@ export default {
},
},
watch
:
{
watch
:
{
activeli
:
{
activeli
:
{
handler
(
newValue
,
oldValue
)
{
handler
(
newValue
,
oldValue
)
{
var
id
=
newValue
.
id
;
var
id
=
newValue
.
id
;
this
.
formItem
.
parentId
=
id
;
this
.
formItem
.
parentId
=
id
;
},
},
...
@@ -522,27 +581,33 @@ div.page1 {
...
@@ -522,27 +581,33 @@ div.page1 {
width
:
100%
;
width
:
100%
;
display
:
flex
;
display
:
flex
;
}
}
div
.page1
>
div
{
div
.page1
>
div
{
margin-top
:
0px
;
margin-top
:
0px
;
margin-right
:
5px
!important
;
margin-right
:
5px
!important
;
margin-left
:
0px
!important
;
margin-left
:
0px
!important
;
}
}
div
.page1
>
div
:first-of-type
{
div
.page1
>
div
:first-of-type
{
width
:
30%
!important
;
width
:
30%
!important
;
}
}
div
.page1
>
div
.mt10
div
.ivu-row
>
div
.ivu-col
:first-of-type
{
div
.page1
>
div
.mt10
div
.ivu-row
>
div
.ivu-col
:first-of-type
{
margin-left
:
80px
;
margin-left
:
80px
;
}
}
div
.page1
>
div
.mt10
div
.ivu-row
>
div
.ivu-col
:last-of-type
{
div
.page1
>
div
.mt10
div
.ivu-row
>
div
.ivu-col
:last-of-type
{
margin-top
:
10px
;
margin-top
:
10px
;
/* border: 1px solid #eee; */
/* border: 1px solid #eee; */
/* background-color: rgba(240, 240, 240, 1); */
/* background-color: rgba(240, 240, 240, 1); */
padding-left
:
15%
;
padding-left
:
15%
;
text-align
:
left
;
text-align
:
left
;
}
}
div
.page1
div
.ivu-card-body
{
div
.page1
div
.ivu-card-body
{
padding
:
0px
;
padding
:
0px
;
}
}
div
.page1
div
.ivu-row
{
div
.page1
div
.ivu-row
{
width
:
100%
;
width
:
100%
;
}
}
...
@@ -551,15 +616,19 @@ div.page1 div.first,
...
@@ -551,15 +616,19 @@ div.page1 div.first,
div
.two
{
div
.two
{
line-height
:
30px
;
line-height
:
30px
;
}
}
div
.page1
div
.first
{
div
.page1
div
.first
{
background-color
:
rgba
(
204
,
204
,
204
,
1
);
background-color
:
rgba
(
204
,
204
,
204
,
1
);
}
}
div
.page1
div
.two
{
div
.page1
div
.two
{
background-color
:
rgba
(
240
,
240
,
240
,
1
);
background-color
:
rgba
(
240
,
240
,
240
,
1
);
}
}
div
.page1
div
.lastmt10
div
.ivu-row
{
div
.page1
div
.lastmt10
div
.ivu-row
{
width
:
unset
;
width
:
unset
;
}
}
.mt11
div
.ivu-card
{
.mt11
div
.ivu-card
{
padding-bottom
:
10px
;
padding-bottom
:
10px
;
padding-right
:
10px
;
padding-right
:
10px
;
...
@@ -569,5 +638,26 @@ div.page1 div.lastmt10 div.ivu-row {
...
@@ -569,5 +638,26 @@ div.page1 div.lastmt10 div.ivu-row {
.ivu-tree-title
{
.ivu-tree-title
{
font-size
:
14px
;
font-size
:
14px
;
}
}
.TabsList
{
display
:
flex
;
}
.TabsList
.tabsItem
{
width
:
200px
;
padding
:
15px
0
;
margin-left
:
1px
;
position
:
relative
;
bottom
:
-3px
;
z-index
:
99
;
text-align
:
center
;
border-radius
:
5px
5px
0
0
;
cursor
:
pointer
;
}
.TabsList
.tabsActive
{
background
:
#fff
;
font-weight
:
bold
;
}
</
style
>
</
style
>
src/views/dataReport/index.vue
View file @
9a4daf48
...
@@ -2,28 +2,38 @@
...
@@ -2,28 +2,38 @@
<div>
<div>
<Row
:gutter=
"10"
>
<Row
:gutter=
"10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card
class=
"search-card"
>
<Card
class=
"search-card"
>
<p
slot=
"title"
>
<p
slot=
"title"
>
{{
$route
.
meta
.
title
}}
{{
$route
.
meta
.
title
}}
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
</p>
</p>
<div
id=
"search-body"
>
<div
id=
"search-body"
>
<Form
:label-width=
"80"
>
<Form
:label-width=
"80"
>
<Row>
<Row>
<Col
span=
"6"
>
<Col
span=
"6"
>
<FormItem
label=
"时间"
>
<FormItem
label=
"时间"
>
<DatePicker
type=
"daterange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
style=
"width: 200px"
@
on-change=
"getcreatedTime"
></DatePicker>
<DatePicker
type=
"daterange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
</FormItem>
style=
"width: 200px"
@
on-change=
"getcreatedTime"
></DatePicker>
</Col>
</FormItem>
</Row>
</Col>
</Form>
<Col
span=
"6"
>
<FormItem
label=
"组织"
>
<Select
v-model=
"formItem.dataSource"
>
<Option
v-for=
"item in organization"
:value=
"item.dataSource"
:key=
"item.dataSource"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
</Col>
</Row>
</Form>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Col>
<Col>
</Col>
</Col>
<Col>
<Col>
<Button
type=
"primary"
@
click=
"searchSubmit"
icon=
"search"
>
检索
</Button>
<Button
type=
"primary"
@
click=
"searchSubmit"
icon=
"search"
>
检索
</Button>
<Button
type=
"ghost"
@
click=
"searchCancel"
icon=
"refresh"
>
重置
</Button>
<Button
type=
"ghost"
@
click=
"searchCancel"
icon=
"refresh"
>
重置
</Button>
</Col>
</Col>
</div>
</div>
</div>
</div>
...
@@ -33,19 +43,20 @@
...
@@ -33,19 +43,20 @@
<Row
:gutter=
"10"
class=
"mt10"
>
<Row
:gutter=
"10"
class=
"mt10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card>
<Card>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Row>
<Row>
<Col>
<Col>
<Button
type=
"primary"
icon=
"ios-redo"
v-if=
"auth.tf_company_problem_data_export"
@
click=
"exportTabel()"
>
导出
</Button>
<Button
type=
"primary"
icon=
"ios-redo"
v-if=
"auth.tf_company_problem_data_export"
</Col>
@
click=
"exportTabel()"
>
导出
</Button>
<Col>
</Col>
</Col>
<Col>
</Row>
</Col>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:isFirst=
"isFirst"
></m-table>
</Row>
</Row>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:isFirst=
"isFirst"
></m-table>
</Row>
</Card>
</Card>
</Col>
</Col>
</Row>
</Row>
...
@@ -54,231 +65,266 @@
...
@@ -54,231 +65,266 @@
</div>
</div>
</
template
>
</
template
>
<
style
>
<
style
>
textarea
{
textarea
{
resize
:
none
;
resize
:
none
;
}
}
.test
{
display
:
inline-block
;
.test
{
width
:
50px
;
display
:
inline-block
;
height
:
30px
;
width
:
50px
;
text-align
:
center
;
height
:
30px
;
line-height
:
30px
;
text-align
:
center
;
margin-right
:
5px
;
line-height
:
30px
;
margin-bottom
:
5px
;
margin-right
:
5px
;
color
:
white
;
margin-bottom
:
5px
;
position
:
relative
;
color
:
white
;
}
position
:
relative
;
.house
{
}
width
:
40px
;
height
:
30px
;
.house
{
text-align
:
center
;
width
:
40px
;
line-height
:
30px
;
height
:
30px
;
color
:
white
;
text-align
:
center
;
margin
:
0
3px
9px
3px
;
line-height
:
30px
;
}
color
:
white
;
.bg-gray
{
margin
:
0
3px
9px
3px
;
background-color
:
#808080
;
}
color
:
white
;
}
.bg-gray
{
.bg-green
{
background-color
:
#808080
;
background-color
:
#1cad1f
;
color
:
white
;
color
:
white
;
}
}
.bg-red
{
.bg-green
{
background-color
:
#e42a2d
;
background-color
:
#1cad1f
;
color
:
white
;
color
:
white
;
}
}
.img-position
{
position
:
absolute
;
.bg-red
{
top
:
2px
;
background-color
:
#e42a2d
;
right
:
3px
;
color
:
white
;
}
}
.batch-house-tips
{
display
:
inline-block
;
.img-position
{
font-size
:
12px
;
position
:
absolute
;
margin-right
:
10px
;
top
:
2px
;
margin-bottom
:
10px
;
right
:
3px
;
}
}
.batch-house-red
{
background-color
:
#e42a2d
;
.batch-house-tips
{
padding
:
5px
;
display
:
inline-block
;
color
:
#ffffff
;
font-size
:
12px
;
}
margin-right
:
10px
;
.batch-house-green
{
margin-bottom
:
10px
;
background-color
:
#1cad1f
;
}
padding
:
5px
;
color
:
#ffffff
;
.batch-house-red
{
justify-content
:
center
;
background-color
:
#e42a2d
;
}
padding
:
5px
;
.batch-house-gray
{
color
:
#ffffff
;
background-color
:
#808080
;
}
padding
:
5px
;
color
:
#ffffff
;
.batch-house-green
{
}
background-color
:
#1cad1f
;
padding
:
5px
;
color
:
#ffffff
;
justify-content
:
center
;
}
.batch-house-gray
{
background-color
:
#808080
;
padding
:
5px
;
color
:
#ffffff
;
}
</
style
>
</
style
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
qs
from
"qs"
;
import
qs
from
"qs"
;
import
axios
from
'axios'
import
axios
from
'axios'
import
index
from
"../../router"
import
index
from
"../../router"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
isFirst
:
false
,
//首页.
isFirst
:
false
,
//首页.
loading
:
true
,
//加载
loading
:
true
,
//加载
//表单
//表单
formItem
:
{
formItem
:
{
beginDate
:
""
,
beginDate
:
""
,
endDate
:
""
,
endDate
:
""
,
},
dataSource
:
""
endDate
:
""
,
},
beginDate
:
""
,
endDate
:
""
,
// 设置结束时间大于开始时间
beginDate
:
""
,
end
:{
// 设置结束时间大于开始时间
disabledDate
:(
function
(
date
){
end
:
{
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginDate
)
disabledDate
:
(
function
(
date
)
{
}).
bind
(
this
)
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginDate
)
},
}).
bind
(
this
)
createdTime
:[],
},
//表格
createdTime
:
[],
tableConfig
:{
//表格
url
:
"/api/emaint/repairProblem/totalComapnyCountList"
,
tableConfig
:
{
columns
:[
url
:
"/api/emaint/repairProblem/totalComapnyCountList"
,
{
columns
:
[
title
:
'操作'
,
{
width
:
70
,
title
:
'操作'
,
align
:
"center"
,
width
:
70
,
render
:(
h
,
params
)
=>
{
align
:
"center"
,
return
h
(
'Button'
,
{
render
:
(
h
,
params
)
=>
{
props
:
{
return
h
(
'Button'
,
{
type
:
'primary'
,
props
:
{
size
:
'small'
type
:
'primary'
,
},
size
:
'small'
on
:
{
click
:
()
=>
{
sessionStorage
.
setItem
(
"companyName"
,
params
.
row
.
companyName
)
sessionStorage
.
setItem
(
"beginDate"
,
this
.
formItem
.
beginDate
)
sessionStorage
.
setItem
(
"endDate"
,
this
.
formItem
.
endDate
)
this
.
$router
.
push
({
name
:
"reportDetail"
,
params
:{
companyName
:
params
.
row
.
companyName
}})
}
}
},
"详情"
)
}
},
{
title
:
'公司'
,
key
:
'companyName'
,
width
:
120
,
align
:
"center"
},
{
title
:
'硬件单数'
,
key
:
'yjCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'软件单数'
,
key
:
'rjCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'其他'
,
key
:
'otherCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'总数'
,
key
:
'totalCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'已完成单数'
,
key
:
'completeCount'
,
width
:
70
,
align
:
"center"
},
},
{
on
:
{
title
:
'待维修单数'
,
click
:
()
=>
{
key
:
'uncompleteCount'
,
sessionStorage
.
setItem
(
"companyName"
,
params
.
row
.
companyName
)
width
:
70
,
sessionStorage
.
setItem
(
"beginDate"
,
this
.
formItem
.
beginDate
)
align
:
"center"
sessionStorage
.
setItem
(
"endDate"
,
this
.
formItem
.
endDate
)
this
.
$router
.
push
({
name
:
"reportDetail"
,
params
:
{
companyName
:
params
.
row
.
companyName
}
})
}
}
}
],
},
"详情"
)
}
}
}
},
},
{
created
(){
title
:
'组织'
,
var
dd
=
new
Date
()
key
:
'groupName'
,
var
ff
=
new
Date
()
width
:
120
,
var
week
=
dd
.
getDay
();
//获取时间的星期数
align
:
"center"
var
minus
=
week
?
week
-
1
:
6
;
},
dd
.
setDate
(
dd
.
getDate
()
-
minus
);
//获取minus天前的日期
{
var
y
=
dd
.
getFullYear
();
title
:
'公司'
,
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
):(
dd
.
getMonth
()
+
1
);
//获取月份
key
:
'companyName'
,
var
d
=
dd
.
getDate
()
<
10
?(
'0'
+
dd
.
getDate
()):
dd
.
getDate
()
width
:
120
,
this
.
formItem
.
beginDate
=
(
y
+
"-"
+
m
+
"-"
+
d
)
align
:
"center"
this
.
beginDate
=
this
.
formItem
.
beginDate
},
this
.
createdTime
.
push
(
this
.
beginDate
)
{
title
:
'硬件单数'
,
key
:
'yjCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'软件单数'
,
key
:
'rjCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'其他'
,
key
:
'otherCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'总数'
,
key
:
'totalCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'已完成单数'
,
key
:
'completeCount'
,
width
:
70
,
align
:
"center"
},
{
title
:
'待维修单数'
,
key
:
'uncompleteCount'
,
width
:
70
,
align
:
"center"
}
],
},
organization
:
[]
}
},
created
()
{
this
.
getOrganization
()
var
dd
=
new
Date
()
var
ff
=
new
Date
()
var
week
=
dd
.
getDay
();
//获取时间的星期数
var
minus
=
week
?
week
-
1
:
6
;
dd
.
setDate
(
dd
.
getDate
()
-
minus
);
//获取minus天前的日期
var
y
=
dd
.
getFullYear
();
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
)
:
(
dd
.
getMonth
()
+
1
);
//获取月份
var
d
=
dd
.
getDate
()
<
10
?
(
'0'
+
dd
.
getDate
())
:
dd
.
getDate
()
this
.
formItem
.
beginDate
=
(
y
+
"-"
+
m
+
"-"
+
d
)
this
.
beginDate
=
this
.
formItem
.
beginDate
this
.
createdTime
.
push
(
this
.
beginDate
)
var
week
=
ff
.
getDay
();
//获取时间的星期数
var
week
=
ff
.
getDay
();
//获取时间的星期数
var
maxus
=
week
?
7
-
week
:
0
;
var
maxus
=
week
?
7
-
week
:
0
;
ff
.
setDate
(
ff
.
getDate
()
+
maxus
);
//获取minus天前的日期
ff
.
setDate
(
ff
.
getDate
()
+
maxus
);
//获取minus天前的日期
var
a
=
ff
.
getFullYear
();
var
a
=
ff
.
getFullYear
();
var
b
=
(
ff
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
ff
.
getMonth
()
+
1
):(
ff
.
getMonth
()
+
1
);
//获取月份
var
b
=
(
ff
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
ff
.
getMonth
()
+
1
)
:
(
ff
.
getMonth
()
+
1
);
//获取月份
var
c
=
ff
.
getDate
()
<
10
?(
'0'
+
ff
.
getDate
()):
ff
.
getDate
()
var
c
=
ff
.
getDate
()
<
10
?
(
'0'
+
ff
.
getDate
())
:
ff
.
getDate
()
this
.
formItem
.
endDate
=
(
a
+
"-"
+
b
+
"-"
+
c
)
this
.
formItem
.
endDate
=
(
a
+
"-"
+
b
+
"-"
+
c
)
this
.
endDate
=
this
.
formItem
.
endDate
this
.
endDate
=
this
.
formItem
.
endDate
this
.
createdTime
.
push
(
this
.
endDate
)
this
.
createdTime
.
push
(
this
.
endDate
)
},
methods
:
{
// 导出
exportTabel
()
{
let
begin
=
new
Date
(
this
.
formItem
.
beginDate
)
let
beginM
=
begin
.
getMonth
()
+
1
begin
=
begin
.
getFullYear
()
+
"-"
+
beginM
+
"-"
+
begin
.
getDate
()
let
end
=
new
Date
(
this
.
formItem
.
endDate
)
let
endM
=
end
.
getMonth
()
+
1
end
=
end
.
getFullYear
()
+
"-"
+
endM
+
"-"
+
end
.
getDate
()
let
url
=
axios
.
defaults
.
baseURL
+
"/api/emaint/repairProblem/exportCompanyProblemData?beginDate="
+
begin
+
"&endDate="
+
end
+
"&accessToken="
+
sessionStorage
.
token
location
.
href
=
url
},
},
methods
:
{
//搜索
// 导出
searchSubmit
()
{
exportTabel
(){
if
(
this
.
formItem
.
beginDate
!=
""
&&
this
.
formItem
.
endDate
!=
""
)
{
let
begin
=
new
Date
(
this
.
formItem
.
beginDate
)
let
beginM
=
begin
.
getMonth
()
+
1
begin
=
begin
.
getFullYear
()
+
"-"
+
beginM
+
"-"
+
begin
.
getDate
()
let
end
=
new
Date
(
this
.
formItem
.
endDate
)
let
endM
=
end
.
getMonth
()
+
1
end
=
end
.
getFullYear
()
+
"-"
+
endM
+
"-"
+
end
.
getDate
()
let
url
=
axios
.
defaults
.
baseURL
+
"/api/emaint/repairProblem/exportCompanyProblemData?beginDate="
+
begin
+
"&endDate="
+
end
+
"&accessToken="
+
sessionStorage
.
token
location
.
href
=
url
},
//搜索
searchSubmit
()
{
if
(
this
.
formItem
.
beginDate
!=
""
&&
this
.
formItem
.
endDate
!=
""
){
this
.
isFirst
=
true
setTimeout
(()
=>
{
this
.
$refs
.
table
.
init
()
this
.
isFirst
=
false
},
200
)
}
else
{
this
.
$Modal
.
error
({
title
:
'提示信息'
,
content
:
"请输入进行检索的完整起始时间"
})
}
},
//重置
searchCancel
(){
this
.
formItem
.
beginDate
=
""
this
.
formItem
.
endDate
=
""
this
.
beginDate
=
""
this
.
endDate
=
""
this
.
isFirst
=
true
this
.
isFirst
=
true
this
.
createdTime
=
[]
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
table
.
init
()
this
.
$refs
.
table
.
init
()
this
.
isFirst
=
false
this
.
isFirst
=
false
},
200
)
},
200
)
},
}
else
{
this
.
$Modal
.
error
({
title
:
'提示信息'
,
content
:
"请输入进行检索的完整起始时间"
})
}
getcreatedTime
(
createdTime
)
{
},
this
.
formItem
.
beginDate
=
createdTime
[
0
]
//重置
this
.
formItem
.
endDate
=
createdTime
[
1
]
searchCancel
()
{
},
this
.
formItem
.
beginDate
=
""
this
.
formItem
.
endDate
=
""
this
.
formItem
.
dataSource
=
""
this
.
beginDate
=
""
this
.
endDate
=
""
this
.
isFirst
=
true
this
.
createdTime
=
[]
setTimeout
(()
=>
{
this
.
$refs
.
table
.
init
()
this
.
isFirst
=
false
},
200
)
},
getcreatedTime
(
createdTime
)
{
this
.
formItem
.
beginDate
=
createdTime
[
0
]
this
.
formItem
.
endDate
=
createdTime
[
1
]
},
getOrganization
()
{
this
.
$request
.
post
(
"/api/emaint/group/getGroup"
,
{},
res
=>
{
this
.
organization
=
res
.
responseResult
.
map
(
item
=>
{
if
(
item
.
dataSource
==
1
)
{
item
.
label
=
'塔楼客户'
}
else
{
item
.
label
=
item
.
parentName
}
return
item
})
})
}
}
}
}
}
</
script
>
</
script
>
src/views/operationData/index.vue
View file @
9a4daf48
...
@@ -2,27 +2,37 @@
...
@@ -2,27 +2,37 @@
<div>
<div>
<Row
:gutter=
"10"
>
<Row
:gutter=
"10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card
class=
"search-card"
>
<Card
class=
"search-card"
>
<p
slot=
"title"
>
<p
slot=
"title"
>
{{
$route
.
meta
.
title
}}
{{
$route
.
meta
.
title
}}
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
</p>
</p>
<div
id=
"search-body"
>
<div
id=
"search-body"
>
<Form
:label-width=
"80"
>
<Form
:label-width=
"80"
>
<Row>
<Row>
<Col
span=
"6"
>
<Col
span=
"6"
>
<FormItem
label=
"时间"
>
<FormItem
label=
"时间"
>
<DatePicker
type=
"daterange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
style=
"width: 200px"
@
on-change=
"getcreatedTime"
></DatePicker>
<DatePicker
type=
"daterange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
</FormItem>
style=
"width: 200px"
@
on-change=
"getcreatedTime"
></DatePicker>
</Col>
</FormItem>
</Row>
</Col>
</Form>
<Col
span=
"6"
>
<FormItem
label=
"组织"
>
<Select
v-model=
"formItem.dataSource"
>
<Option
v-for=
"item in organization"
:value=
"item.dataSource"
:key=
"item.dataSource"
>
{{
item
.
label
}}
</Option>
</Select>
</FormItem>
</Col>
</Row>
</Form>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Col>
<Col>
</Col>
</Col>
<Col>
<Col>
<Button
type=
"primary"
@
click=
"searchSubmit"
icon=
"search"
>
检索
</Button>
<Button
type=
"primary"
@
click=
"searchSubmit"
icon=
"search"
>
检索
</Button>
<Button
type=
"ghost"
@
click=
"searchCancel"
icon=
"refresh"
>
重置
</Button>
<Button
type=
"ghost"
@
click=
"searchCancel"
icon=
"refresh"
>
重置
</Button>
</Col>
</Col>
</div>
</div>
</div>
</div>
...
@@ -32,19 +42,20 @@
...
@@ -32,19 +42,20 @@
<Row
:gutter=
"10"
class=
"mt10"
>
<Row
:gutter=
"10"
class=
"mt10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card>
<Card>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Row>
<Row>
<Col>
<Col>
<Button
type=
"primary"
icon=
"ios-redo"
v-if=
"auth.tf_user_problem_data_list_export"
@
click=
"exportTabel()"
>
导出
</Button>
<Button
type=
"primary"
icon=
"ios-redo"
v-if=
"auth.tf_user_problem_data_list_export"
</Col>
@
click=
"exportTabel()"
>
导出
</Button>
<Col>
</Col>
</Col>
<Col>
</Row>
</Col>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:isFirst=
"isFirst"
></m-table>
</Row>
</Row>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:isFirst=
"isFirst"
></m-table>
</Row>
</Card>
</Card>
</Col>
</Col>
</Row>
</Row>
...
@@ -53,229 +64,258 @@
...
@@ -53,229 +64,258 @@
</div>
</div>
</
template
>
</
template
>
<
style
>
<
style
>
textarea
{
textarea
{
resize
:
none
;
resize
:
none
;
}
}
.test
{
display
:
inline-block
;
width
:
50px
;
height
:
30px
;
text-align
:
center
;
line-height
:
30px
;
margin-right
:
5px
;
margin-bottom
:
5px
;
color
:
white
;
position
:
relative
;
}
.house
{
width
:
40px
;
height
:
30px
;
text-align
:
center
;
line-height
:
30px
;
color
:
white
;
margin
:
0
3px
9px
3px
;
}
.bg-gray
{
background-color
:
#808080
;
color
:
white
;
}
.bg-green
{
background-color
:
#1cad1f
;
color
:
white
;
}
.bg-red
{
background-color
:
#e42a2d
;
color
:
white
;
}
.img-position
{
position
:
absolute
;
top
:
2px
;
right
:
3px
;
}
.batch-house-tips
{
display
:
inline-block
;
font-size
:
12px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.batch-house-red
{
background-color
:
#e42a2d
;
padding
:
5px
;
color
:
#ffffff
;
}
.batch-house-green
{
background-color
:
#1cad1f
;
padding
:
5px
;
color
:
#ffffff
;
justify-content
:
center
;
}
.batch-house-gray
{
background-color
:
#808080
;
padding
:
5px
;
color
:
#ffffff
;
}
</
style
>
<
script
type=
"text/ecmascript-6"
>
import
qs
from
"qs"
;
import
axios
from
'axios'
import
index
from
"../../router"
export
default
{
data
()
{
return
{
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
isFirst
:
false
,
//首页.
//表单
formItem
:
{
beginDate
:
""
,
endDate
:
""
,
},
endDate
:
""
,
beginDate
:
""
,
// 设置结束时间大于开始时间
end
:{
disabledDate
:(
function
(
date
){
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginDate
)
}).
bind
(
this
)
},
createdTime
:[],
//表格
tableConfig
:{
url
:
"/api/emaint/repairProblem/totalUserCountList"
,
columns
:[
{
title
:
'操作'
,
width
:
70
,
align
:
"center"
,
render
:(
h
,
params
)
=>
{
return
h
(
'Button'
,
{
props
:
{
type
:
'primary'
,
size
:
'small'
,
disabled
:
!
this
.
auth
.
tf_user_problem_data_details_list
},
style
:{
width
:
"60px"
},
on
:
{
click
:
()
=>
{
sessionStorage
.
setItem
(
"beginDate"
,
this
.
formItem
.
beginDate
)
sessionStorage
.
setItem
(
"endDate"
,
this
.
formItem
.
endDate
)
sessionStorage
.
setItem
(
"operationDetailUserId"
,
params
.
row
.
userId
)
this
.
$router
.
push
({
name
:
"operationDetail"
})
}
.test
{
}
display
:
inline-block
;
},
"详情"
)
width
:
50px
;
}
height
:
30px
;
},
text-align
:
center
;
{
line-height
:
30px
;
title
:
'姓名'
,
margin-right
:
5px
;
key
:
'userName'
,
margin-bottom
:
5px
;
width
:
90
,
color
:
white
;
},
position
:
relative
;
{
}
title
:
'执行总数'
,
key
:
'totalCount'
,
width
:
70
,
},
{
.house
{
title
:
'执行已完成'
,
width
:
40px
;
key
:
'completeCount'
,
height
:
30px
;
width
:
70
,
text-align
:
center
;
},
line-height
:
30px
;
{
color
:
white
;
title
:
'执行待维修'
,
margin
:
0
3px
9px
3px
;
key
:
'uncompleteCount'
,
}
width
:
70
,
},
.bg-gray
{
{
background-color
:
#808080
;
title
:
'参与总数'
,
color
:
white
;
key
:
'cyTotalCount'
,
}
width
:
70
,
},
.bg-green
{
{
background-color
:
#1cad1f
;
title
:
'参与已完成'
,
color
:
white
;
key
:
'cyCompleteCount'
,
}
width
:
70
,
.bg-red
{
background-color
:
#e42a2d
;
color
:
white
;
}
.img-position
{
position
:
absolute
;
top
:
2px
;
right
:
3px
;
}
.batch-house-tips
{
display
:
inline-block
;
font-size
:
12px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.batch-house-red
{
background-color
:
#e42a2d
;
padding
:
5px
;
color
:
#ffffff
;
}
.batch-house-green
{
background-color
:
#1cad1f
;
padding
:
5px
;
color
:
#ffffff
;
justify-content
:
center
;
}
.batch-house-gray
{
background-color
:
#808080
;
padding
:
5px
;
color
:
#ffffff
;
}
</
style
>
<
script
type=
"text/ecmascript-6"
>
import
qs
from
"qs"
;
import
axios
from
'axios'
import
index
from
"../../router"
export
default
{
data
()
{
return
{
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
isFirst
:
false
,
//首页.
//表单
formItem
:
{
beginDate
:
""
,
endDate
:
""
,
dataSource
:
""
},
endDate
:
""
,
beginDate
:
""
,
// 设置结束时间大于开始时间
end
:
{
disabledDate
:
(
function
(
date
)
{
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginDate
)
}).
bind
(
this
)
},
createdTime
:
[],
//表格
tableConfig
:
{
url
:
"/api/emaint/repairProblem/totalUserCountList"
,
columns
:
[
{
title
:
'操作'
,
width
:
70
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
'Button'
,
{
props
:
{
type
:
'primary'
,
size
:
'small'
,
disabled
:
!
this
.
auth
.
tf_user_problem_data_details_list
},
},
{
style
:
{
title
:
'参与待维修'
,
width
:
"60px"
key
:
'cyUncompleteCount'
,
width
:
70
,
},
},
],
on
:
{
}
click
:
()
=>
{
}
sessionStorage
.
setItem
(
"beginDate"
,
this
.
formItem
.
beginDate
)
},
sessionStorage
.
setItem
(
"endDate"
,
this
.
formItem
.
endDate
)
created
(){
sessionStorage
.
setItem
(
"operationDetailUserId"
,
params
.
row
.
userId
)
var
dd
=
new
Date
()
this
.
$router
.
push
({
name
:
"operationDetail"
})
var
ff
=
new
Date
()
var
week
=
dd
.
getDay
();
//获取时间的星期数
var
minus
=
week
?
week
-
1
:
6
;
dd
.
setDate
(
dd
.
getDate
()
-
minus
);
//获取minus天前的日期
var
y
=
dd
.
getFullYear
();
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
):(
dd
.
getMonth
()
+
1
);
//获取月份
var
d
=
dd
.
getDate
()
<
10
?(
'0'
+
dd
.
getDate
()):
dd
.
getDate
()
this
.
formItem
.
beginDate
=
(
y
+
"-"
+
m
+
"-"
+
d
)
this
.
beginDate
=
this
.
formItem
.
beginDate
this
.
createdTime
.
push
(
this
.
beginDate
)
var
week
=
ff
.
getDay
();
//获取时间的星期数
}
var
maxus
=
week
?
7
-
week
:
0
;
}
ff
.
setDate
(
ff
.
getDate
()
+
maxus
);
//获取minus天前的日期
},
"详情"
)
var
a
=
ff
.
getFullYear
();
}
var
b
=
(
ff
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
ff
.
getMonth
()
+
1
):(
ff
.
getMonth
()
+
1
);
//获取月份
},
var
c
=
ff
.
getDate
()
<
10
?(
'0'
+
ff
.
getDate
()):
ff
.
getDate
()
{
this
.
formItem
.
endDate
=
(
a
+
"-"
+
b
+
"-"
+
c
)
title
:
'姓名'
,
// console.log(this.formItem.endDate)
key
:
'userName'
,
this
.
endDate
=
this
.
formItem
.
endDate
width
:
90
,
this
.
createdTime
.
push
(
this
.
endDate
)
},
{
title
:
'执行总数'
,
key
:
'totalCount'
,
width
:
70
,
},
},
{
methods
:
{
title
:
'执行已完成'
,
// 导出
key
:
'completeCount'
,
exportTabel
(){
width
:
70
,
let
begin
=
new
Date
(
this
.
formItem
.
beginDate
)
},
let
beginM
=
begin
.
getMonth
()
+
1
{
begin
=
begin
.
getFullYear
()
+
"-"
+
beginM
+
"-"
+
begin
.
getDate
()
title
:
'执行待维修'
,
let
end
=
new
Date
(
this
.
formItem
.
endDate
)
key
:
'uncompleteCount'
,
let
endM
=
end
.
getMonth
()
+
1
width
:
70
,
end
=
end
.
getFullYear
()
+
"-"
+
endM
+
"-"
+
end
.
getDate
()
},
let
url
=
axios
.
defaults
.
baseURL
+
"/api/emaint/repairProblem/exportUserProblemData?beginDate="
+
begin
+
"&endDate="
+
end
+
"&accessToken="
+
sessionStorage
.
token
{
location
.
href
=
url
title
:
'参与总数'
,
key
:
'cyTotalCount'
,
width
:
70
,
},
{
title
:
'参与已完成'
,
key
:
'cyCompleteCount'
,
width
:
70
,
},
{
title
:
'参与待维修'
,
key
:
'cyUncompleteCount'
,
width
:
70
,
},
],
},
},
//搜索
organization
:
[]
searchSubmit
()
{
}
if
(
this
.
formItem
.
beginDate
!=
""
&&
this
.
formItem
.
endDate
!=
""
){
},
this
.
isFirst
=
true
created
()
{
setTimeout
(()
=>
{
this
.
getOrganization
()
this
.
$refs
.
table
.
init
()
var
dd
=
new
Date
()
this
.
isFirst
=
false
var
ff
=
new
Date
()
},
200
)
var
week
=
dd
.
getDay
();
//获取时间的星期数
}
else
{
var
minus
=
week
?
week
-
1
:
6
;
this
.
$Modal
.
error
({
title
:
'提示信息'
,
content
:
"请输入进行检索的完整起始时间"
})
dd
.
setDate
(
dd
.
getDate
()
-
minus
);
//获取minus天前的日期
}
var
y
=
dd
.
getFullYear
();
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
)
:
(
dd
.
getMonth
()
+
1
);
//获取月份
var
d
=
dd
.
getDate
()
<
10
?
(
'0'
+
dd
.
getDate
())
:
dd
.
getDate
()
this
.
formItem
.
beginDate
=
(
y
+
"-"
+
m
+
"-"
+
d
)
this
.
beginDate
=
this
.
formItem
.
beginDate
this
.
createdTime
.
push
(
this
.
beginDate
)
},
var
week
=
ff
.
getDay
();
//获取时间的星期数
//重置
var
maxus
=
week
?
7
-
week
:
0
;
searchCancel
(){
ff
.
setDate
(
ff
.
getDate
()
+
maxus
);
//获取minus天前的日期
this
.
formItem
.
beginDate
=
""
var
a
=
ff
.
getFullYear
();
this
.
formItem
.
endDate
=
""
var
b
=
(
ff
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
ff
.
getMonth
()
+
1
)
:
(
ff
.
getMonth
()
+
1
);
//获取月份
this
.
beginDate
=
""
var
c
=
ff
.
getDate
()
<
10
?
(
'0'
+
ff
.
getDate
())
:
ff
.
getDate
()
this
.
endDate
=
""
this
.
formItem
.
endDate
=
(
a
+
"-"
+
b
+
"-"
+
c
)
// console.log(this.formItem.endDate)
this
.
endDate
=
this
.
formItem
.
endDate
this
.
createdTime
.
push
(
this
.
endDate
)
},
methods
:
{
// 导出
exportTabel
()
{
let
begin
=
new
Date
(
this
.
formItem
.
beginDate
)
let
beginM
=
begin
.
getMonth
()
+
1
begin
=
begin
.
getFullYear
()
+
"-"
+
beginM
+
"-"
+
begin
.
getDate
()
let
end
=
new
Date
(
this
.
formItem
.
endDate
)
let
endM
=
end
.
getMonth
()
+
1
end
=
end
.
getFullYear
()
+
"-"
+
endM
+
"-"
+
end
.
getDate
()
let
url
=
axios
.
defaults
.
baseURL
+
"/api/emaint/repairProblem/exportUserProblemData?beginDate="
+
begin
+
"&endDate="
+
end
+
"&accessToken="
+
sessionStorage
.
token
location
.
href
=
url
},
//搜索
searchSubmit
()
{
if
(
this
.
formItem
.
beginDate
!=
""
&&
this
.
formItem
.
endDate
!=
""
)
{
this
.
isFirst
=
true
this
.
isFirst
=
true
this
.
createdTime
=
[]
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
table
.
init
()
this
.
$refs
.
table
.
init
()
this
.
isFirst
=
false
this
.
isFirst
=
false
},
200
)
},
200
)
},
}
else
{
getcreatedTime
(
createdTime
)
{
this
.
$Modal
.
error
({
title
:
'提示信息'
,
content
:
"请输入进行检索的完整起始时间"
})
this
.
formItem
.
beginDate
=
createdTime
[
0
]
}
this
.
formItem
.
endDate
=
createdTime
[
1
]
},
},
//重置
searchCancel
()
{
this
.
formItem
.
beginDate
=
""
this
.
formItem
.
endDate
=
""
this
.
formItem
.
dataSource
=
""
this
.
beginDate
=
""
this
.
endDate
=
""
this
.
isFirst
=
true
this
.
createdTime
=
[]
setTimeout
(()
=>
{
this
.
$refs
.
table
.
init
()
this
.
isFirst
=
false
},
200
)
},
getcreatedTime
(
createdTime
)
{
this
.
formItem
.
beginDate
=
createdTime
[
0
]
this
.
formItem
.
endDate
=
createdTime
[
1
]
},
getOrganization
()
{
this
.
$request
.
post
(
"/api/emaint/group/getGroup"
,
{},
res
=>
{
this
.
organization
=
res
.
responseResult
.
map
(
item
=>
{
if
(
item
.
dataSource
==
1
)
{
item
.
label
=
'塔楼客户'
}
else
{
item
.
label
=
item
.
parentName
}
return
item
})
})
}
}
}
}
}
</
script
>
</
script
>
src/views/problemConfiguration/index.vue
View file @
9a4daf48
...
@@ -27,7 +27,8 @@
...
@@ -27,7 +27,8 @@
<Card>
<Card>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Row>
<Row>
<Col>
</Col>
<Col>
<Col>
<template>
<template>
<Tree
:data=
"questionlis"
@
on-select-change=
"showchildren"
:empty-text=
"'暂无数据'"
></Tree>
<Tree
:data=
"questionlis"
@
on-select-change=
"showchildren"
:empty-text=
"'暂无数据'"
></Tree>
...
@@ -35,7 +36,6 @@
...
@@ -35,7 +36,6 @@
</Col>
</Col>
</Row>
</Row>
</div>
</div>
</Card>
</Card>
</Col>
</Col>
</Row>
</Row>
...
@@ -47,7 +47,12 @@
...
@@ -47,7 +47,12 @@
<p
slot=
"title"
>
<p
slot=
"title"
>
问题新增
问题新增
</p>
</p>
<i-form
:model=
"addformdata"
:rules=
"ruleValidate"
:label-width=
"90"
class=
"addform"
>
<i-form
ref=
"formValidate"
:model=
"addformdata"
:rules=
"ruleValidate"
:label-width=
"100"
class=
"addform"
>
<Form-item
label=
"问题分类分组"
prop=
"dataSource"
>
<RadioGroup
v-model=
"addformdata.dataSource"
@
on-change=
"getParent"
>
<Radio
:label=
"item.value"
v-for=
"item in mechanism"
:key=
"item.value"
>
{{ item.label }}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"类型名称"
prop=
"problem"
>
<Form-item
label=
"类型名称"
prop=
"problem"
>
<i-input
placeholder=
"请输入类型名称"
v-model=
"addformdata.problem"
></i-input>
<i-input
placeholder=
"请输入类型名称"
v-model=
"addformdata.problem"
></i-input>
</Form-item>
</Form-item>
...
@@ -55,7 +60,7 @@
...
@@ -55,7 +60,7 @@
<Form-item
label=
"父级类目"
>
<Form-item
label=
"父级类目"
>
<i-select
placeholder=
"请选择父级"
v-model=
"addformdata.parentId"
style=
"text-align:left"
>
<i-select
placeholder=
"请选择父级"
v-model=
"addformdata.parentId"
style=
"text-align:left"
>
<i-option
value=
""
>
无
</i-option>
<i-option
value=
""
>
无
</i-option>
<i-option
:value=
"item.parentId"
v-for=
"(item, index) in questionlis"
:key=
"index"
>
{{ item.parentProblem
<i-option
:value=
"item.parentId"
v-for=
"(item, index) in questionlis
1
"
:key=
"index"
>
{{ item.parentProblem
}}
}}
</i-option>
</i-option>
...
@@ -96,9 +101,8 @@
...
@@ -96,9 +101,8 @@
</
template
>
</
template
>
</div>
</div>
<Upload
v-if=
"!uploadList.length || uploadList.length < 1"
ref=
"upload"
:show-upload-list=
"false"
<Upload
v-if=
"!uploadList.length || uploadList.length < 1"
ref=
"upload"
:show-upload-list=
"false"
:on-success=
"handleSuccess"
:format=
"['jpg', 'png']"
:max-size=
"2048"
type=
"drag"
:on-success=
"handleSuccess"
:format=
"['jpg', 'png']"
:max-size=
"2048"
type=
"drag"
:action=
"uploadUrl"
:action=
"uploadUrl"
:before-upload=
"handleBeforeUpload"
:before-upload=
"handleBeforeUpload"
style=
"display: inline-block;width:58px;"
>
style=
"display: inline-block;width:58px;"
>
<div
style=
"width: 58px;height:58px;line-height: 58px;"
>
<div
style=
"width: 58px;height:58px;line-height: 58px;"
>
<Icon
type=
"ios-plus-empty"
size=
"20"
></Icon>
<Icon
type=
"ios-plus-empty"
size=
"20"
></Icon>
</div>
</div>
...
@@ -125,7 +129,12 @@
...
@@ -125,7 +129,12 @@
<p
slot=
"title"
>
<p
slot=
"title"
>
问题编辑
问题编辑
</p>
</p>
<i-form
:model=
"updatedata"
:rules=
"ruleValidate"
:label-width=
"90"
class=
"addform"
>
<i-form
ref=
"formValidate"
:model=
"updatedata"
:rules=
"ruleValidate"
:label-width=
"100"
class=
"addform"
>
<Form-item
label=
"问题分类分组"
prop=
"dataSource"
>
<RadioGroup
v-model=
"updatedata.dataSource"
@
on-change=
"getParent"
>
<Radio
:label=
"item.value"
v-for=
"item in mechanism"
:key=
"item.value"
>
{{ item.label }}
</Radio>
</RadioGroup>
</Form-item>
<Form-item
label=
"类型名称"
prop=
"problem"
>
<Form-item
label=
"类型名称"
prop=
"problem"
>
<i-input
placeholder=
"请输入类型名称"
v-model=
"updatedata.problem"
></i-input>
<i-input
placeholder=
"请输入类型名称"
v-model=
"updatedata.problem"
></i-input>
</Form-item>
</Form-item>
...
@@ -134,7 +143,7 @@
...
@@ -134,7 +143,7 @@
<i-select
:placeholder=
"updatedata.treeLevel == 1 ? '已属于顶级类目' : '请选择父级类目'"
style=
"text-align:left"
<i-select
:placeholder=
"updatedata.treeLevel == 1 ? '已属于顶级类目' : '请选择父级类目'"
style=
"text-align:left"
v-model=
"updatedata.parentId"
:disabled=
"updatedata.treeLevel == 1 ? true : false"
>
v-model=
"updatedata.parentId"
:disabled=
"updatedata.treeLevel == 1 ? true : false"
>
<i-option
value=
""
>
无
</i-option>
<i-option
value=
""
>
无
</i-option>
<i-option
:value=
"item.parentId"
v-for=
"(item, index) in questionlis"
:key=
"index"
>
{{ item.parentProblem
<i-option
:value=
"item.parentId"
v-for=
"(item, index) in questionlis
1
"
:key=
"index"
>
{{ item.parentProblem
}}
}}
</i-option>
</i-option>
</i-select>
</i-select>
...
@@ -171,9 +180,8 @@
...
@@ -171,9 +180,8 @@
</
template
>
</
template
>
</div>
</div>
<Upload
v-if=
"!uploadList.length || uploadList.length < 1"
ref=
"upload"
:show-upload-list=
"false"
<Upload
v-if=
"!uploadList.length || uploadList.length < 1"
ref=
"upload"
:show-upload-list=
"false"
:on-success=
"handleSuccess"
:format=
"['jpg', 'png']"
:max-size=
"2048"
type=
"drag"
:on-success=
"handleSuccess"
:format=
"['jpg', 'png']"
:max-size=
"2048"
type=
"drag"
:action=
"uploadUrl"
:action=
"uploadUrl"
:before-upload=
"handleBeforeUpload"
:before-upload=
"handleBeforeUpload"
style=
"display: inline-block;width:58px;"
>
style=
"display: inline-block;width:58px;"
>
<div
style=
"width: 58px;height:58px;line-height: 58px;"
>
<div
style=
"width: 58px;height:58px;line-height: 58px;"
>
<Icon
type=
"ios-plus-empty"
size=
"20"
></Icon>
<Icon
type=
"ios-plus-empty"
size=
"20"
></Icon>
</div>
</div>
...
@@ -220,6 +228,12 @@ export default {
...
@@ -220,6 +228,12 @@ export default {
defaultExecutorName
:
''
,
defaultExecutorName
:
''
,
},
},
ruleValidate
:
{
ruleValidate
:
{
dataSource
:
[
{
required
:
true
,
message
:
"请选择问题分类分组"
,
trigger
:
"change"
}
],
parent
:
[
{
required
:
true
,
message
:
"请选择组织机构"
,
trigger
:
"change"
}
],
problem
:
[
problem
:
[
{
required
:
true
,
message
:
"类型名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"类型名称不能为空"
,
trigger
:
"blur"
}
]
]
...
@@ -230,7 +244,8 @@ export default {
...
@@ -230,7 +244,8 @@ export default {
},
},
updatedata
:
{},
updatedata
:
{},
questionlis
:
[],
questionlis
:
[],
questionlis1
:
[],
mechanism
:
[],
//新增-表单
//新增-表单
addForm
:
{
addForm
:
{
areaId
:
""
,
areaId
:
""
,
...
@@ -252,8 +267,9 @@ export default {
...
@@ -252,8 +267,9 @@ export default {
deliveryDate
:
""
,
deliveryDate
:
""
,
actualDate
:
""
,
actualDate
:
""
,
orgId
:
""
,
orgId
:
""
,
projectId
:
""
projectId
:
""
,
}
},
projectList
:
[]
};
};
},
},
computed
:
{
computed
:
{
...
@@ -299,7 +315,7 @@ export default {
...
@@ -299,7 +315,7 @@ export default {
this
.
uploadList
.
splice
(
fileList
.
indexOf
(
item
),
1
);
this
.
uploadList
.
splice
(
fileList
.
indexOf
(
item
),
1
);
},
},
async
handleBeforeUpload
(
res
)
{
async
handleBeforeUpload
(
res
)
{
return
this
.
checkImageWH
(
res
,
64
,
64
)
//
return this.checkImageWH(res, 64, 64)
},
},
handleSuccess
(
res
,
file
)
{
handleSuccess
(
res
,
file
)
{
this
.
seriesImage
=
res
.
responseResult
this
.
seriesImage
=
res
.
responseResult
...
@@ -373,29 +389,36 @@ export default {
...
@@ -373,29 +389,36 @@ export default {
}
}
},
},
save
(
type
)
{
save
(
type
)
{
if
(
type
==
"add"
)
{
this
.
$refs
[
'formValidate'
].
validate
((
valid
)
=>
{
this
.
$request
.
post
(
if
(
valid
)
{
"/api/emaint/problem-base/save"
,
if
(
type
==
"add"
)
{
{
...
this
.
addformdata
,
iconImgs
:
this
.
seriesImage
},
this
.
$request
.
post
(
data
=>
{
"/api/emaint/problem-base/save"
,
this
.
$Message
.
success
(
"添加成功"
);
{
...
this
.
addformdata
,
iconImgs
:
this
.
seriesImage
},
this
.
getlist
();
data
=>
{
},
this
.
$Message
.
success
(
"添加成功"
);
data
=>
{
this
.
getlist
();
}
},
);
data
=>
{
}
else
{
}
this
.
$request
.
post
(
);
"/api/emaint/problem-base/save"
,
}
else
{
{
...
this
.
updatedata
,
iconImgs
:
this
.
seriesImage
},
this
.
$request
.
post
(
data
=>
{
"/api/emaint/problem-base/save"
,
this
.
$Message
.
success
(
"修改成功"
);
{
...
this
.
updatedata
,
iconImgs
:
this
.
seriesImage
},
this
.
getlist
();
data
=>
{
},
this
.
$Message
.
success
(
"修改成功"
);
data
=>
{
this
.
getlist
();
},
data
=>
{
}
);
}
}
);
}
else
{
}
this
.
$Message
.
error
(
'请输入必填项!'
);
}
})
return
},
},
addquestion
()
{
addquestion
()
{
this
.
addformdata
.
parentId
=
this
.
activeli
.
id
;
this
.
addformdata
.
parentId
=
this
.
activeli
.
id
;
...
@@ -418,10 +441,10 @@ export default {
...
@@ -418,10 +441,10 @@ export default {
res
=>
{
res
=>
{
this
.
$set
(
this
.
$data
,
'updatedata'
,
{})
this
.
$set
(
this
.
$data
,
'updatedata'
,
{})
this
.
uploadList
=
[]
this
.
uploadList
=
[]
let
obj
=
{
if
(
res
.
responseResult
.
iconImgs
!==
null
&&
res
.
responseResult
.
iconImgs
!==
""
)
{
status
:
'finished'
,
let
obj
=
{
}
}
if
(
res
.
responseResult
.
iconImgs
!==
null
)
{
obj
.
status
=
'finished'
obj
.
url
=
res
.
responseResult
.
iconImgs
obj
.
url
=
res
.
responseResult
.
iconImgs
this
.
uploadList
.
push
(
obj
)
this
.
uploadList
.
push
(
obj
)
}
}
...
@@ -449,26 +472,54 @@ export default {
...
@@ -449,26 +472,54 @@ export default {
getlist
()
{
getlist
()
{
// 查询一级问题
// 查询一级问题
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/problem-base/treeList"
,
"/api/emaint/problem-base/
a/
treeList"
,
{},
{},
data
=>
{
data
=>
{
let
mechanism
=
[]
data
.
responseResult
.
forEach
(
v
=>
{
data
.
responseResult
.
forEach
(
v
=>
{
v
.
title
=
v
.
parentProblem
;
if
(
v
.
dataSource
==
'0'
)
{
v
.
title
=
'特房集团'
mechanism
.
push
({
label
:
'特房集团'
,
value
:
v
.
dataSource
})
}
else
if
(
v
.
dataSource
==
'1'
)
{
v
.
title
=
'塔楼客户'
mechanism
.
push
({
label
:
'塔楼客户'
,
value
:
v
.
dataSource
})
}
else
if
(
v
.
dataSource
==
'2'
)
{
v
.
title
=
'轨道集团'
mechanism
.
push
({
label
:
'轨道集团'
,
value
:
v
.
dataSource
})
}
v
.
children
=
v
.
childList
;
v
.
children
=
v
.
childList
;
v
.
disabled
=
true
v
.
expand
=
true
if
(
v
.
children
.
length
>
0
)
{
if
(
v
.
children
.
length
>
0
)
{
v
.
expand
=
false
;
v
.
children
.
forEach
(
v1
=>
{
v
.
children
.
forEach
(
v1
=>
{
v1
.
title
=
v1
.
problem
;
v1
.
title
=
v1
.
parentProblem
;
v
.
expand
=
false
;
v1
.
children
=
v1
.
childList
;
if
(
v1
.
children
.
length
>
0
)
{
v1
.
children
.
forEach
(
v2
=>
{
v2
.
title
=
v2
.
problem
;
})
}
});
});
}
}
});
});
this
.
questionlis
=
data
.
responseResult
;
this
.
questionlis
=
data
.
responseResult
;
this
.
mechanism
=
mechanism
data
.
responseResult
.
forEach
(
item
=>
{
if
(
item
.
childList
.
length
)
{
item
.
childList
.
forEach
(
item1
=>
{
this
.
questionlis1
.
push
(
item1
)
})
}
})
},
},
data
=>
{
data
=>
{
}
}
);
);
},
},
getParent
(
value
)
{
let
arr
=
this
.
questionlis
.
filter
(
item
=>
item
.
dataSource
==
value
)
this
.
questionlis1
=
arr
[
0
].
childList
},
// 删除问题
// 删除问题
delquestion
()
{
delquestion
()
{
if
(
this
.
activeli
.
id
==
""
)
{
if
(
this
.
activeli
.
id
==
""
)
{
...
@@ -612,6 +663,10 @@ div.controlbutton button {
...
@@ -612,6 +663,10 @@ div.controlbutton button {
cursor
:
pointer
;
cursor
:
pointer
;
margin
:
0
2px
;
margin
:
0
2px
;
}
}
.search-row
.title
{
padding
:
8px
0
;
}
</
style
>
</
style
>
src/views/report/overview/index.vue
View file @
9a4daf48
...
@@ -2,28 +2,29 @@
...
@@ -2,28 +2,29 @@
<div>
<div>
<Row
:gutter=
"10"
>
<Row
:gutter=
"10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card
class=
"search-card"
>
<Card
class=
"search-card"
>
<p
slot=
"title"
>
<p
slot=
"title"
>
{{
$route
.
meta
.
title
}}
{{
$route
.
meta
.
title
}}
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
</p>
</p>
<div
id=
"search-body"
>
<div
id=
"search-body"
>
<Form
:label-width=
"80"
>
<Form
:label-width=
"80"
>
<Row>
<Row>
<Col
span=
"6"
>
<Col
span=
"6"
>
<FormItem
label=
"时间"
>
<FormItem
label=
"时间"
>
<DatePicker
type=
"daterange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
style=
"width: 200px"
@
on-change=
"getcreatedTime"
></DatePicker>
<DatePicker
type=
"daterange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
</FormItem>
style=
"width: 200px"
@
on-change=
"getcreatedTime"
></DatePicker>
</Col>
</FormItem>
</Row>
</Col>
</Form>
</Row>
</Form>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Col>
<Col>
</Col>
</Col>
<Col>
<Col>
<Button
type=
"primary"
@
click=
"searchSubmit"
icon=
"search"
>
检索
</Button>
<Button
type=
"primary"
@
click=
"searchSubmit"
icon=
"search"
>
检索
</Button>
<Button
type=
"ghost"
@
click=
"searchCancel"
icon=
"refresh"
>
重置
</Button>
<Button
type=
"ghost"
@
click=
"searchCancel"
icon=
"refresh"
>
重置
</Button>
</Col>
</Col>
</div>
</div>
</div>
</div>
...
@@ -33,19 +34,19 @@
...
@@ -33,19 +34,19 @@
<Row
:gutter=
"10"
class=
"mt10"
>
<Row
:gutter=
"10"
class=
"mt10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card>
<Card>
<!--
<div
class=
"search-row"
>
-->
<!--
<div
class=
"search-row"
>
-->
<!--
<Row>
-->
<!--
<Row>
-->
<!--
<Col>
-->
<!--
<Col>
-->
<!--
<Button
type=
"primary"
icon=
"ios-redo"
v-if=
"auth.tf_company_problem_data_export"
@
click=
"exportTabel()"
>
导出
</Button>
-->
<!--
<Button
type=
"primary"
icon=
"ios-redo"
v-if=
"auth.tf_company_problem_data_export"
@
click=
"exportTabel()"
>
导出
</Button>
-->
<!--
</Col>
-->
<!--
</Col>
-->
<!--
<Col>
-->
<!--
<Col>
-->
<!--
</Col>
-->
<!--
</Col>
-->
<!--
</Row>
-->
<!--
</Row>
-->
<!--
</div>
-->
<!--
</div>
-->
<Row
class=
"searchable-table-con"
>
<Row
class=
"searchable-table-con"
>
<Table
:loading=
"tableLoading"
:columns=
"columns"
:data=
"tableData"
ref=
"table"
></Table>
<Table
:loading=
"tableLoading"
:columns=
"columns"
:data=
"tableData"
ref=
"table"
></Table>
</Row>
</Row>
</Card>
</Card>
</Col>
</Col>
</Row>
</Row>
...
@@ -54,269 +55,279 @@
...
@@ -54,269 +55,279 @@
</div>
</div>
</
template
>
</
template
>
<
style
>
<
style
>
textarea
{
textarea
{
resize
:
none
;
resize
:
none
;
}
}
.test
{
display
:
inline-block
;
.test
{
width
:
50px
;
display
:
inline-block
;
height
:
30px
;
width
:
50px
;
text-align
:
center
;
height
:
30px
;
line-height
:
30px
;
text-align
:
center
;
margin-right
:
5px
;
line-height
:
30px
;
margin-bottom
:
5px
;
margin-right
:
5px
;
color
:
white
;
margin-bottom
:
5px
;
position
:
relative
;
color
:
white
;
}
position
:
relative
;
.house
{
}
width
:
40px
;
height
:
30px
;
.house
{
text-align
:
center
;
width
:
40px
;
line-height
:
30px
;
height
:
30px
;
color
:
white
;
text-align
:
center
;
margin
:
0
3px
9px
3px
;
line-height
:
30px
;
}
color
:
white
;
.bg-gray
{
margin
:
0
3px
9px
3px
;
background-color
:
#808080
;
}
color
:
white
;
}
.bg-gray
{
.bg-green
{
background-color
:
#808080
;
background-color
:
#1cad1f
;
color
:
white
;
color
:
white
;
}
}
.bg-red
{
.bg-green
{
background-color
:
#e42a2d
;
background-color
:
#1cad1f
;
color
:
white
;
color
:
white
;
}
}
.img-position
{
position
:
absolute
;
.bg-red
{
top
:
2px
;
background-color
:
#e42a2d
;
right
:
3px
;
color
:
white
;
}
}
.batch-house-tips
{
display
:
inline-block
;
.img-position
{
font-size
:
12px
;
position
:
absolute
;
margin-right
:
10px
;
top
:
2px
;
margin-bottom
:
10px
;
right
:
3px
;
}
}
.batch-house-red
{
background-color
:
#e42a2d
;
.batch-house-tips
{
padding
:
5px
;
display
:
inline-block
;
color
:
#ffffff
;
font-size
:
12px
;
}
margin-right
:
10px
;
.batch-house-green
{
margin-bottom
:
10px
;
background-color
:
#1cad1f
;
}
padding
:
5px
;
color
:
#ffffff
;
.batch-house-red
{
justify-content
:
center
;
background-color
:
#e42a2d
;
}
padding
:
5px
;
.batch-house-gray
{
color
:
#ffffff
;
background-color
:
#808080
;
}
padding
:
5px
;
color
:
#ffffff
;
.batch-house-green
{
}
background-color
:
#1cad1f
;
padding
:
5px
;
color
:
#ffffff
;
justify-content
:
center
;
}
.batch-house-gray
{
background-color
:
#808080
;
padding
:
5px
;
color
:
#ffffff
;
}
</
style
>
</
style
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
qs
from
"qs"
;
import
qs
from
"qs"
;
import
axios
from
'axios'
import
axios
from
'axios'
import
index
from
"@/router"
import
index
from
"@/router"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
isFirst
:
false
,
//首页.
isFirst
:
false
,
//首页.
tableLoading
:
false
,
tableLoading
:
false
,
maintUsers
:
[],
maintUsers
:
[],
//表单
//表单
formItem
:
{
formItem
:
{
beginDate
:
""
,
beginDate
:
""
,
endDate
:
""
,
endDate
:
""
,
},
},
endDate
:
""
,
endDate
:
""
,
beginDate
:
""
,
beginDate
:
""
,
// 设置结束时间大于开始时间
// 设置结束时间大于开始时间
end
:
{
end
:
{
disabledDate
:(
function
(
date
)
{
disabledDate
:
(
function
(
date
)
{
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginDate
)
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginDate
)
}).
bind
(
this
)
}).
bind
(
this
)
},
},
createdTime
:
[],
createdTime
:
[],
columns
:
[],
columns
:
[],
//表格
//表格
tableData
:
[]
tableData
:
[]
}
}
},
},
created
()
{
created
()
{
var
dd
=
new
Date
()
var
dd
=
new
Date
()
var
ff
=
new
Date
()
var
ff
=
new
Date
()
var
week
=
dd
.
getDay
();
//获取时间的星期数
var
week
=
dd
.
getDay
();
//获取时间的星期数
var
minus
=
week
?
week
-
1
:
6
;
var
minus
=
week
?
week
-
1
:
6
;
dd
.
setDate
(
dd
.
getDate
()
-
minus
);
//获取minus天前的日期
dd
.
setDate
(
dd
.
getDate
()
-
minus
);
//获取minus天前的日期
var
y
=
dd
.
getFullYear
();
var
y
=
dd
.
getFullYear
();
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
):(
dd
.
getMonth
()
+
1
);
//获取月份
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
)
:
(
dd
.
getMonth
()
+
1
);
//获取月份
var
d
=
dd
.
getDate
()
<
10
?(
'0'
+
dd
.
getDate
()):
dd
.
getDate
()
var
d
=
dd
.
getDate
()
<
10
?
(
'0'
+
dd
.
getDate
())
:
dd
.
getDate
()
this
.
formItem
.
beginDate
=
(
y
+
"-"
+
m
+
"-"
+
d
)
this
.
formItem
.
beginDate
=
(
y
+
"-"
+
m
+
"-"
+
d
)
this
.
beginDate
=
this
.
formItem
.
beginDate
this
.
beginDate
=
this
.
formItem
.
beginDate
this
.
createdTime
.
push
(
this
.
beginDate
)
this
.
createdTime
.
push
(
this
.
beginDate
)
var
week
=
ff
.
getDay
();
//获取时间的星期数
var
week
=
ff
.
getDay
();
//获取时间的星期数
var
maxus
=
week
?
7
-
week
:
0
;
var
maxus
=
week
?
7
-
week
:
0
;
ff
.
setDate
(
ff
.
getDate
()
+
maxus
);
//获取minus天前的日期
ff
.
setDate
(
ff
.
getDate
()
+
maxus
);
//获取minus天前的日期
var
a
=
ff
.
getFullYear
();
var
a
=
ff
.
getFullYear
();
var
b
=
(
ff
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
ff
.
getMonth
()
+
1
):(
ff
.
getMonth
()
+
1
);
//获取月份
var
b
=
(
ff
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
ff
.
getMonth
()
+
1
)
:
(
ff
.
getMonth
()
+
1
);
//获取月份
var
c
=
ff
.
getDate
()
<
10
?(
'0'
+
ff
.
getDate
()):
ff
.
getDate
()
var
c
=
ff
.
getDate
()
<
10
?
(
'0'
+
ff
.
getDate
())
:
ff
.
getDate
()
this
.
formItem
.
endDate
=
(
a
+
"-"
+
b
+
"-"
+
c
)
this
.
formItem
.
endDate
=
(
a
+
"-"
+
b
+
"-"
+
c
)
this
.
endDate
=
this
.
formItem
.
endDate
this
.
endDate
=
this
.
formItem
.
endDate
this
.
createdTime
.
push
(
this
.
endDate
)
this
.
createdTime
.
push
(
this
.
endDate
)
// 获取运维人员构建表头
// 获取运维人员构建表头
this
.
createTable
()
this
.
createTable
()
},
},
methods
:
{
methods
:
{
createTable
(){
createTable
()
{
let
self
=
this
let
self
=
this
this
.
$request
.
get
(
this
.
$request
.
get
(
"/api/user/getMaintainUser"
,
"/api/user/getMaintainUser"
,
{},
{},
res
=>
{
res
=>
{
if
(
res
.
responseResult
)
{
if
(
res
.
responseResult
)
{
self
.
maintUsers
=
res
.
responseResult
;
self
.
maintUsers
=
res
.
responseResult
;
self
.
columns
=
[{
self
.
columns
=
[{
title
:
'公司'
,
title
:
'公司'
,
key
:
'companyName'
,
key
:
'companyName'
,
width
:
120
,
width
:
120
,
align
:
"center"
align
:
"center"
}]
}]
self
.
maintUsers
.
forEach
(
v
=>
{
self
.
maintUsers
.
forEach
(
v
=>
{
self
.
columns
.
push
({
self
.
columns
.
push
({
title
:
v
.
name
,
title
:
v
.
name
,
align
:
'center'
,
width
:
320
,
children
:
[{
title
:
'硬件'
,
key
:
v
.
id
+
'_hardware_count'
,
align
:
'center'
,
align
:
'center'
,
width
:
320
,
width
:
80
children
:
[{
},
title
:
'硬件'
,
{
key
:
v
.
id
+
'_hardware_count'
,
title
:
'软件'
,
align
:
'center'
,
key
:
v
.
id
+
'_software_count'
,
width
:
80
align
:
'center'
,
},
width
:
80
{
},
title
:
'软件'
,
{
key
:
v
.
id
+
'_software_count'
,
title
:
'支持'
,
align
:
'center'
,
key
:
v
.
id
+
'_maint_count'
,
width
:
80
align
:
'center'
,
},
width
:
80
{
},
title
:
'支持'
,
{
key
:
v
.
id
+
'_maint_count'
,
title
:
'合计'
,
align
:
'center'
,
key
:
v
.
id
+
'_total_count'
,
width
:
80
align
:
'center'
,
},
width
:
80
{
}]
title
:
'合计'
,
})
key
:
v
.
id
+
'_total_count'
,
});
align
:
'center'
,
this
.
loadData
()
width
:
80
}
else
{
}]
})
});
this
.
loadData
()
}
else
{
self
.
$Message
.
error
(
"加载表头失败"
);
}
},
res
=>
{
self
.
$Message
.
error
(
"加载表头失败"
);
self
.
$Message
.
error
(
"加载表头失败"
);
}
}
);
},
res
=>
{
self
.
$Message
.
error
(
"加载表头失败"
);
}
);
},
},
// 导出
// 导出
loadData
()
{
loadData
()
{
let
self
=
this
let
self
=
this
this
.
tableLoading
=
true
this
.
tableLoading
=
true
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/repairProblem/overviewCountList"
,
"/api/emaint/repairProblem/overviewCountList"
,
self
.
formItem
,
self
.
formItem
,
res
=>
{
res
=>
{
if
(
res
.
responseResult
&&
res
.
responseResult
.
length
>
0
)
{
if
(
res
.
responseResult
&&
res
.
responseResult
.
length
>
0
)
{
self
.
tableData
=
res
.
responseResult
;
self
.
tableData
=
res
.
responseResult
;
self
.
tableData
.
forEach
(
v
=>
{
self
.
tableData
.
forEach
(
v
=>
{
self
.
maintUsers
.
forEach
(
v2
=>
{
self
.
maintUsers
.
forEach
(
v2
=>
{
let
key
=
v2
.
id
+
'_total_count'
let
key
=
v2
.
id
+
'_total_count'
v
[
key
]
=
0
v
[
key
]
=
0
let
key1
=
v2
.
id
+
'_hardware_count'
let
key1
=
v2
.
id
+
'_hardware_count'
v
[
key1
]
=
0
v
[
key1
]
=
0
let
key2
=
v2
.
id
+
'_software_count'
let
key2
=
v2
.
id
+
'_software_count'
v
[
key2
]
=
0
v
[
key2
]
=
0
let
key3
=
v2
.
id
+
'_maint_count'
let
key3
=
v2
.
id
+
'_maint_count'
v
[
key3
]
=
0
v
[
key3
]
=
0
})
})
});
});
self
.
tableData
.
forEach
(
v
=>
{
self
.
tableData
.
forEach
(
v
=>
{
v
.
maintUserCount
.
forEach
(
v2
=>
{
v
.
maintUserCount
.
forEach
(
v2
=>
{
let
key
=
v2
.
userId
+
'_total_count'
let
key
=
v2
.
userId
+
'_total_count'
v
[
key
]
=
0
v
[
key
]
=
0
let
key1
=
v2
.
userId
+
'_hardware_count'
let
key1
=
v2
.
userId
+
'_hardware_count'
v
[
key1
]
=
v2
.
hardwareCount
v
[
key1
]
=
v2
.
hardwareCount
v
[
key
]
+=
v
[
key1
]
v
[
key
]
+=
v
[
key1
]
let
key2
=
v2
.
userId
+
'_software_count'
let
key2
=
v2
.
userId
+
'_software_count'
v
[
key2
]
=
v2
.
softwareCount
v
[
key2
]
=
v2
.
softwareCount
v
[
key
]
+=
v
[
key2
]
v
[
key
]
+=
v
[
key2
]
let
key3
=
v2
.
userId
+
'_maint_count'
let
key3
=
v2
.
userId
+
'_maint_count'
v
[
key3
]
=
v2
.
maintCount
v
[
key3
]
=
v2
.
maintCount
v
[
key
]
+=
v
[
key3
]
v
[
key
]
+=
v
[
key3
]
});
});
});
}
});
self
.
tableLoading
=
false
},
res
=>
{
self
.
$Message
.
error
(
"加载数据失败"
);
self
.
tableLoading
=
false
}
}
);
self
.
tableLoading
=
false
},
},
res
=>
{
// 导出
self
.
$Message
.
error
(
"加载数据失败"
);
exportTabel
(){
self
.
tableLoading
=
false
this
.
$refs
.
table
.
exportCsv
({
filename
:
'运维统计报表'
});
},
//搜索
searchSubmit
()
{
if
(
this
.
formItem
.
beginDate
!=
""
&&
this
.
formItem
.
endDate
!=
""
){
this
.
isFirst
=
true
this
.
loadData
()
}
else
{
this
.
$Modal
.
error
({
title
:
'提示信息'
,
content
:
"请输入进行检索的完整起始时间"
})
}
}
);
},
},
// 导出
//重置
exportTabel
()
{
searchCancel
(){
this
.
$refs
.
table
.
exportCsv
({
this
.
formItem
.
beginDate
=
""
filename
:
'运维统计报表'
this
.
formItem
.
endDate
=
""
});
this
.
beginDate
=
""
},
this
.
endDate
=
""
//搜索
searchSubmit
()
{
if
(
this
.
formItem
.
beginDate
!=
""
&&
this
.
formItem
.
endDate
!=
""
)
{
this
.
isFirst
=
true
this
.
isFirst
=
true
this
.
createdTime
=
[]
this
.
loadData
()
setTimeout
(()
=>
{
}
else
{
this
.
$refs
.
table
.
init
()
this
.
$Modal
.
error
({
title
:
'提示信息'
,
content
:
"请输入进行检索的完整起始时间"
})
this
.
isFirst
=
false
}
},
200
)
},
getcreatedTime
(
createdTime
)
{
},
this
.
formItem
.
beginDate
=
createdTime
[
0
]
//重置
this
.
formItem
.
endDate
=
createdTime
[
1
]
searchCancel
()
{
},
this
.
formItem
.
beginDate
=
""
}
this
.
formItem
.
endDate
=
""
this
.
beginDate
=
""
this
.
endDate
=
""
this
.
isFirst
=
true
this
.
createdTime
=
[]
setTimeout
(()
=>
{
this
.
$refs
.
table
.
init
()
this
.
isFirst
=
false
},
200
)
},
getcreatedTime
(
createdTime
)
{
this
.
formItem
.
beginDate
=
createdTime
[
0
]
this
.
formItem
.
endDate
=
createdTime
[
1
]
},
}
}
}
</
script
>
</
script
>
src/views/workOrder/index.vue
View file @
9a4daf48
...
@@ -4,301 +4,203 @@
...
@@ -4,301 +4,203 @@
<!-- 检索框 -->
<!-- 检索框 -->
<Row
:gutter=
"10"
>
<Row
:gutter=
"10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card
class=
"search-card"
>
<Card
class=
"search-card"
>
<p
slot=
"title"
id=
"labels"
>
<p
slot=
"title"
id=
"labels"
>
<template>
<template>
<label
@
click=
"setstate('')"
:style=
"
{color:!formItem.state?'#57a3f3':''}">全部工单
</label>
<label
@
click=
"setstate('')"
:style=
"
{ color: !formItem.state ? '#57a3f3' : '' }">全部工单
</label>
<label
<label
@
click=
"setstate('待派单')"
:style=
"
{ color: formItem.state == '待派单' ? '#57a3f3' : '' }">待派单
</label>
@
click=
"setstate('待派单')"
<label
@
click=
"setstate('待维修')"
:style=
"
{ color: formItem.state == '待维修' ? '#57a3f3' : '' }">待维修
</label>
:style=
"
{color:formItem.state=='待派单'?'#57a3f3':''}"
<label
@
click=
"setstate('待评价')"
:style=
"
{ color: formItem.state == '待评价' ? '#57a3f3' : '' }">待评价
</label>
>待派单
</label>
<label
@
click=
"setstate('已评价')"
:style=
"
{ color: formItem.state == '已评价' ? '#57a3f3' : '' }">已评价
</label>
<label
</
template
>
@
click=
"setstate('待维修')"
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
:style=
"
{color:formItem.state=='待维修'?'#57a3f3':''}"
</p>
>待维修
</label>
<div
id=
"search-body"
>
<label
<Form
:model=
"formItem"
:label-width=
"80"
:rules=
"ruleAdd"
>
@
click=
"setstate('待评价')"
<Row
type=
"flex"
justify=
"start"
>
:style=
"
{color:formItem.state=='待评价'?'#57a3f3':''}"
<Col
span=
"6"
>
>待评价
</label>
<FormItem
label=
"检索条件"
>
<label
<Input
v-model=
"formItem.keyword"
:maxlength=
"20"
@
click=
"setstate('已评价')"
placeholder=
"工单号 / 姓名 / 状态 / 联系电话 / 执行人 / 问题类别"
></Input>
:style=
"
{color:formItem.state=='已评价'?'#57a3f3':''}"
</FormItem>
>已评价
</label>
</
template
>
<collapse-icon
foldPart=
"search-body"
></collapse-icon>
</p>
<div
id=
"search-body"
>
<Form
:model=
"formItem"
:label-width=
"80"
:rules=
"ruleAdd"
>
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"6"
>
<FormItem
label=
"检索条件"
>
<Input
v-model=
"formItem.keyword"
:maxlength=
"20"
placeholder=
"工单号 / 姓名 / 状态 / 联系电话 / 执行人 / 问题类别"
></Input>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"工单号"
>
<Input
v-model=
"formItem.workOrderNo"
:maxlength=
"20"
placeholder=
"请输入工单号"
></Input>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"报修人"
>
<Input
v-model=
"formItem.name"
:maxlength=
"30"
placeholder=
"请输入报修人姓名"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"联系人"
>
<Input
v-model=
"formItem.contactName"
:maxlength=
"30"
placeholder=
"请输入联系人姓名"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"手机号"
prop=
"phone"
>
<Input
v-model=
"formItem.contactPhone"
:maxlength=
"20"
placeholder=
"请输入手机号"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"执行人"
>
<Input
v-model=
"formItem.userName"
:maxlength=
"20"
placeholder=
"请输入执行人"
/>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
label=
"创建时间"
>
<DatePicker
type=
"datetimerange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
style=
"width:100%!important"
@
on-change=
"getCreatedTime"
></DatePicker>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
label=
"完成时间"
>
<DatePicker
type=
"datetimerange"
v-model=
"completionTime"
split-panels
placeholder=
"请选择完成时间"
style=
"width:100%!important"
@
on-change=
"getCompletionTime"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<div
class=
"search-row"
>
<Col></Col>
<Col>
<Button
type=
"primary"
icon=
"search"
@
click=
"searchSubmit"
>
搜索
</Button>
<Button
type=
"ghost"
icon=
"refresh"
@
click=
"searchCancel"
>
重置
</Button>
</Col>
</Col>
</div>
<Col
span=
"6"
>
<FormItem
label=
"工单来源"
>
<Select
v-model=
"formItem.dataSource"
>
<Option
v-for=
"(item, index) in optionList"
:key=
"index"
:value=
"item.value"
>
{{ item.label }}
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"工单号"
>
<Input
v-model=
"formItem.workOrderNo"
:maxlength=
"20"
placeholder=
"请输入工单号"
></Input>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"报修人"
>
<Input
v-model=
"formItem.name"
:maxlength=
"30"
placeholder=
"请输入报修人姓名"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"联系人"
>
<Input
v-model=
"formItem.contactName"
:maxlength=
"30"
placeholder=
"请输入联系人姓名"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"手机号"
prop=
"phone"
>
<Input
v-model=
"formItem.contactPhone"
:maxlength=
"20"
placeholder=
"请输入手机号"
/>
</FormItem>
</Col>
<Col
span=
"6"
>
<FormItem
label=
"执行人"
>
<Input
v-model=
"formItem.userName"
:maxlength=
"20"
placeholder=
"请输入执行人"
/>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
label=
"创建时间"
>
<DatePicker
type=
"datetimerange"
v-model=
"createdTime"
split-panels
placeholder=
"请选择起始时间"
style=
"width:100%!important"
@
on-change=
"getCreatedTime"
></DatePicker>
</FormItem>
</Col>
<Col
span=
"8"
>
<FormItem
label=
"完成时间"
>
<DatePicker
type=
"datetimerange"
v-model=
"completionTime"
split-panels
placeholder=
"请选择完成时间"
style=
"width:100%!important"
@
on-change=
"getCompletionTime"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<div
class=
"search-row"
>
<Col>
</Col>
<Col>
<Button
type=
"primary"
icon=
"search"
@
click=
"searchSubmit"
>
搜索
</Button>
<Button
type=
"ghost"
icon=
"refresh"
@
click=
"searchCancel"
>
重置
</Button>
</Col>
</div>
</div>
</Card>
</div>
</Card>
</Col>
</Col>
</Row>
</Row>
<!-- 操作按钮 -->
<!-- 操作按钮 -->
<Row
:gutter=
"10"
class=
"mt10"
>
<Row
:gutter=
"10"
class=
"mt10"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Card>
<Card>
<div
class=
"search-row"
>
<div
class=
"search-row"
>
<Row>
<Row>
<Col>
<Col>
<Button
<Button
type=
"primary"
icon=
"plus-round"
@
click=
"addProject"
v-if=
"auth.tf_repair_problem_edit"
>
新增
</Button>
type=
"primary"
<!--TODO 权限名称-->
icon=
"plus-round"
<Button
type=
"primary"
icon=
"ios-copy-outline"
@
click=
"copyWorkOrder"
@
click=
"addProject"
v-if=
"auth.tf_repair_problem_edit"
>
复制
</Button>
v-if=
"auth.tf_repair_problem_edit"
<Button
type=
"primary"
icon=
"close"
@
click=
"delModal"
v-if=
"auth.tf_repair_problem_delete"
>
删除
</Button>
>
新增
</Button>
<Button
type=
"primary"
icon=
"ios-redo"
@
click=
"exportProject"
<!--TODO 权限名称-->
v-if=
"auth.tf_repair_problem_data_export"
>
导出工单明细表
</Button>
<Button
<Button
type=
"primary"
icon=
"ios-redo"
@
click=
"exportProject_1"
type=
"primary"
v-if=
"auth.tf_repair_problem_data_export"
>
导出客户回访表
</Button>
icon=
"ios-copy-outline"
</Col>
@
click=
"copyWorkOrder"
<Col>
v-if=
"auth.tf_repair_problem_edit"
</Col>
>
复制
</Button>
<Button
type=
"primary"
icon=
"close"
@
click=
"delModal"
v-if=
"auth.tf_repair_problem_delete"
>
删除
</Button>
<Button
type=
"primary"
icon=
"ios-redo"
@
click=
"exportProject"
v-if=
"auth.tf_repair_problem_data_export"
>
导出工单明细表
</Button>
<Button
type=
"primary"
icon=
"ios-redo"
@
click=
"exportProject_1"
v-if=
"auth.tf_repair_problem_data_export"
>
导出客户回访表
</Button>
</Col>
<Col></Col>
</Row>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:searchTime=
"searchTime"
:isFirst=
"isFirst"
></m-table>
</Row>
</Row>
</Card>
</div>
<Row
class=
"searchable-table-con"
>
<m-table
:config=
"tableConfig"
:searchParams=
"formItem"
ref=
"table"
:searchTime=
"searchTime"
:isFirst=
"isFirst"
></m-table>
</Row>
</Card>
</Col>
</Col>
</Row>
</Row>
<Modal
v-model=
"deleteAllModal"
width=
"300"
title=
"删除工单提示"
>
<Modal
v-model=
"deleteAllModal"
width=
"300"
title=
"删除工单提示"
>
<Input
v-model=
"delRemarks"
type=
"textarea"
:rows=
"4"
placeholder=
"请填写删除该工单原因"
></Input>
<Input
v-model=
"delRemarks"
type=
"textarea"
:rows=
"4"
placeholder=
"请填写删除该工单原因"
></Input>
<div
slot=
"footer"
style=
"text-align:center;margin:0 auto;"
>
<div
slot=
"footer"
style=
"text-align:center;margin:0 auto;"
>
<Button
type=
"ghost"
size=
"default"
@
click=
"deleteAllModal
=
false"
>
取消
</Button>
<Button
type=
"ghost"
size=
"default"
@
click=
"deleteAllModal
=
false"
>
取消
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"delAll()"
>
确定
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"delAll()"
>
确定
</Button>
</div>
</div>
</Modal>
</Modal>
<!-- 备注 -->
<!-- 备注 -->
<Modal
<Modal
v-model=
"msgModal"
width=
"800"
title=
"备注"
@
on-ok=
"msgOk"
@
on-cancel=
"viewCancel('remark')"
>
v-model=
"msgModal"
width=
"800"
title=
"备注"
@
on-ok=
"msgOk"
@
on-cancel=
"viewCancel('remark')"
>
<Form
:model=
"viewForm"
:label-width=
"80"
>
<Form
:model=
"viewForm"
:label-width=
"80"
>
<Row>
<Row>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
label=
"图片描述"
style=
"margin-top: 12px;"
>
<FormItem
label=
"图片描述"
style=
"margin-top: 12px;"
>
<div
<div
class=
"addimg"
:style=
"{ 'left': (index) * 63 + 'px' }"
v-for=
"(item, index) in imglist"
:key=
"index"
>
class=
"addimg"
<img
:src=
"item"
alt
v-if=
"item != ''"
@
click=
"showtheimg(index)"
/>
:style=
"{'left':(index)*63+'px'}"
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
v-else
@
click=
"uploadfile(index)"
></i>
v-for=
"(item,index) in imglist"
</div>
:key=
"index"
</FormItem>
>
<input
type=
"file"
name
id=
"upfile"
style=
"display:none;"
@
change=
"changefile"
/>
<img
:src=
"item"
alt
v-if=
"item!=''"
@
click=
"showtheimg(index)"
/>
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
v-else
@
click=
"uploadfile(index)"
></i>
</div>
</FormItem>
<input
type=
"file"
name
id=
"upfile"
style=
"display:none;"
@
change=
"changefile"
/>
</Col>
</Col>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
label=
"备注"
>
<FormItem
label=
"备注"
>
<Input
<Input
v-model=
"viewForm.remark"
type=
"textarea"
:autosize=
"{ minRows: 4, maxRows: 5 }"
v-model=
"viewForm.remark"
placeholder=
"请输入备注信息"
></Input>
type=
"textarea"
</FormItem>
:autosize=
"{minRows: 4,maxRows: 5}"
placeholder=
"请输入备注信息"
></Input>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
<div
slot=
"footer"
style=
"text-align:right;"
>
<div
slot=
"footer"
style=
"text-align:right;"
>
<Row>
<Row>
<Col
span=
"24"
v-if=
"this.viewTabs === 'remark'"
>
<Col
span=
"24"
v-if=
"this.viewTabs === 'remark'"
>
<Button
size=
"default"
@
click=
"viewCancel('remark')"
>
取消
</Button>
<Button
size=
"default"
@
click=
"viewCancel('remark')"
>
取消
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"msgOk"
:loading=
"modal_loading"
>
确定
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"msgOk"
:loading=
"modal_loading"
>
确定
</Button>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
</Modal>
</Modal>
<!-- 图片幻灯 -->
<!-- 图片幻灯 -->
<Modal
<Modal
class=
"showtheimg"
title=
"图片查看"
v-model=
"visible"
@
on-cancel=
"imgcancel"
:closable=
"false"
class=
"showtheimg"
:mask-closable=
"false"
>
title=
"图片查看"
v-model=
"visible"
@
on-cancel=
"imgcancel"
:closable=
"false"
:mask-closable=
"false"
>
<img
:src=
"imglist[showimg]"
v-if=
"visible"
style=
"width: 100%;"
/>
<img
:src=
"imglist[showimg]"
v-if=
"visible"
style=
"width: 100%;"
/>
</Modal>
</Modal>
<!-- 变更执行人 -->
<!-- 变更执行人 -->
<Modal
<Modal
v-model=
"choosemodel"
title=
"执行人选择"
width=
"500"
style=
"z-index:1001 !important;position:relative !important"
v-model=
"choosemodel"
@
on-cancel=
"choosemodel = false"
>
title=
"执行人选择"
<RadioGroup
v-model=
"userindex"
style=
"width:100%;height:300px;overflow:auto;overflow-x:hidden;overflow-y:scroll"
>
width=
"500"
<Radio
style=
"clear:both;width:100%;font-size:13px;padding:10px 5px"
:label=
"index"
style=
"z-index:1001 !important;position:relative !important"
v-for=
"(item, index) in userlist"
:key=
"index"
>
@
on-cancel=
"choosemodel=false"
<span
style=
"margin-left:15px;"
>
{{ item.name }}
</span>
>
<span
style=
"float:right;"
>
{{ item.problemNum == null ? 0 : item.problemNum }}单
</span>
<RadioGroup
v-model=
"userindex"
style=
"width:100%;height:300px;overflow:auto;overflow-x:hidden;overflow-y:scroll"
>
<Radio
style=
"clear:both;width:100%;font-size:13px;padding:10px 5px"
:label=
"index"
v-for=
"(item,index) in userlist"
:key=
"index"
>
<span
style=
"margin-left:15px;"
>
{{item.name}}
</span>
<span
style=
"float:right;"
>
{{item.problemNum==null?0:item.problemNum}}单
</span>
</Radio>
</Radio>
</RadioGroup>
</RadioGroup>
<div
slot=
"footer"
style=
"text-align: right;"
>
<div
slot=
"footer"
style=
"text-align: right;"
>
<!-- @click="bgzxr" -->
<!-- @click="bgzxr" -->
<Button
<Button
type=
"primary"
size=
"default"
type=
"primary"
@
click=
"dispatchItem.userName = userlist[userindex].name; dispatchItem.userId = userlist[userindex].id; choosemodel = false;"
size=
"default"
:loading=
"modal_loading"
>
确定
</Button>
@
click=
"dispatchItem.userName=userlist[userindex].name;dispatchItem.userId=userlist[userindex].id;choosemodel=false;"
:loading=
"modal_loading"
>
确定
</Button>
</div>
</div>
</Modal>
</Modal>
<!-- 派单 -->
<!-- 派单 -->
<Modal
<Modal
v-model=
"dispatchModel"
title=
"派单信息"
width=
"500"
@
on-ok=
"repairSubmit"
@
on-cancel=
"dispatchModel = false"
>
v-model=
"dispatchModel"
title=
"派单信息"
width=
"500"
@
on-ok=
"repairSubmit"
@
on-cancel=
"dispatchModel=false"
>
<Form
:model=
"dispatchItem"
:label-width=
"80"
:rules=
"ruleValidate"
>
<Form
:model=
"dispatchItem"
:label-width=
"80"
:rules=
"ruleValidate"
>
<Row
type=
"flex"
style=
"margin-top:20px;margin-bottom:20px"
justify=
"start"
>
<Row
type=
"flex"
style=
"margin-top:20px;margin-bottom:20px"
justify=
"start"
>
<Col
span=
"13"
>
<Col
span=
"13"
>
<FormItem
label=
"执行人"
prop=
"executor"
>
<FormItem
label=
"执行人"
prop=
"executor"
>
<Input
<Input
class=
"buttoninput"
@
on-click=
"choosemodel = true"
readonly
v-model=
"dispatchItem.userName"
class=
"buttoninput"
icon=
"search"
:maxlength=
"20"
placeholder=
"点击搜索图标选择"
></Input>
@
on-click=
"choosemodel=true"
</FormItem>
readonly
v-model=
"dispatchItem.userName"
icon=
"search"
:maxlength=
"20"
placeholder=
"点击搜索图标选择"
></Input>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row>
<Row>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"参与者"
>
<FormItem
label=
"参与者"
>
<!-- <Input v-model="formItem.participators" ></Input> -->
<!-- <Input v-model="formItem.participators" ></Input> -->
<Select
v-model=
"dispatchItem.participatorids"
multiple
style=
"width:100%;"
>
<Select
v-model=
"dispatchItem.participatorids"
multiple
style=
"width:100%;"
>
<Option
<Option
:value=
"item.id"
:label=
"item.name"
v-for=
"(item, index) in userlist"
:key=
"index"
>
:value=
"item.id"
<span
:label=
"item.name"
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{
v-for=
"(item,index) in userlist"
item.name
:key=
"index"
}}
</span>
>
<span>
{{ item.problemNum == null ? 0 : item.problemNum }}单
</span>
<span
</Option>
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
</Select>
>
{{item.name}}
</span>
</FormItem>
<span>
{{item.problemNum==null?0:item.problemNum}}单
</span>
</Option>
</Select>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
...
@@ -309,7 +211,7 @@
...
@@ -309,7 +211,7 @@
import
qs
from
"qs"
;
import
qs
from
"qs"
;
import
axios
from
"axios"
;
import
axios
from
"axios"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isok
:
false
,
isok
:
false
,
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
auth
:
JSON
.
parse
(
sessionStorage
.
auth
),
//登录用户的角色权限
...
@@ -342,14 +244,15 @@ export default {
...
@@ -342,14 +244,15 @@ export default {
keyword
:
""
,
keyword
:
""
,
state
:
""
,
state
:
""
,
name
:
""
,
name
:
""
,
contactName
:
""
,
contactName
:
""
,
phone
:
""
,
phone
:
""
,
isChange
:
""
,
isChange
:
""
,
userName
:
""
,
userName
:
""
,
endTime
:
""
,
endTime
:
""
,
beginTime
:
""
,
beginTime
:
""
,
completionBeginTime
:
""
,
completionBeginTime
:
""
,
completionEndTime
:
""
completionEndTime
:
""
,
dataSource
:
''
// watch: true
// watch: true
},
},
// 派单表单
// 派单表单
...
@@ -359,7 +262,7 @@ export default {
...
@@ -359,7 +262,7 @@ export default {
},
},
// 设置结束时间大于开始时间
// 设置结束时间大于开始时间
end
:
{
end
:
{
disabledDate
:
function
(
date
)
{
disabledDate
:
function
(
date
)
{
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginTime
);
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
beginTime
);
}.
bind
(
this
)
}.
bind
(
this
)
},
},
...
@@ -401,6 +304,31 @@ export default {
...
@@ -401,6 +304,31 @@ export default {
}
}
},
},
{
{
title
:
"工单来源"
,
key
:
"dataSource"
,
width
:
100
,
render
:
(
h
,
params
)
=>
{
if
(
params
.
row
.
dataSource
==
'0'
)
{
return
h
(
'span'
,
'特房集团'
)
}
else
if
(
params
.
row
.
dataSource
==
'1'
)
{
return
h
(
'span'
,
'塔楼客户'
)
}
else
if
(
params
.
row
.
dataSource
==
'2'
)
{
return
h
(
'span'
,
'轨道集团'
)
}
else
{
return
}
}
},
{
title
:
"执行人"
,
title
:
"执行人"
,
key
:
"userName"
,
key
:
"userName"
,
width
:
80
width
:
80
...
@@ -455,7 +383,7 @@ export default {
...
@@ -455,7 +383,7 @@ export default {
type
:
params
.
row
.
priority
===
'一级'
?
'error'
:
(
params
.
row
.
priority
===
'二级'
?
'warning'
:
(
params
.
row
.
priority
===
'三级'
?
'success'
:
'info'
)),
type
:
params
.
row
.
priority
===
'一级'
?
'error'
:
(
params
.
row
.
priority
===
'二级'
?
'warning'
:
(
params
.
row
.
priority
===
'三级'
?
'success'
:
'info'
)),
size
:
'small'
size
:
'small'
}
}
},
!
params
.
row
.
priority
?
'未设置'
:
params
.
row
.
priority
)
},
!
params
.
row
.
priority
?
'未设置'
:
params
.
row
.
priority
)
])
])
}
}
},
},
...
@@ -548,7 +476,7 @@ export default {
...
@@ -548,7 +476,7 @@ export default {
required
:
false
,
required
:
false
,
message
:
"请输入正确的手机号"
,
message
:
"请输入正确的手机号"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
if
(
value
==
null
||
value
==
""
)
return
" "
;
if
(
value
==
null
||
value
==
""
)
return
" "
;
var
reg
=
/
[
0-9
]
/
;
var
reg
=
/
[
0-9
]
/
;
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
...
@@ -571,16 +499,22 @@ export default {
...
@@ -571,16 +499,22 @@ export default {
viewForm
:
{
viewForm
:
{
id
:
""
,
id
:
""
,
remark
:
""
remark
:
""
}
},
optionList
:
[
{
label
:
'不限'
,
value
:
''
},
{
label
:
'特房集团'
,
value
:
'0'
},
{
label
:
'轨道集团'
,
value
:
'2'
},
{
label
:
'塔楼客户'
,
value
:
'1'
},
]
};
};
},
},
computed
:
{
computed
:
{
// 被选择的列表数据
// 被选择的列表数据
selection
()
{
selection
()
{
return
this
.
$refs
.
table
.
selection
;
return
this
.
$refs
.
table
.
selection
;
}
}
},
},
beforeCreate
()
{
beforeCreate
()
{
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/user/searchUserProblemNum"
,
"/api/user/searchUserProblemNum"
,
qs
.
stringify
({
limit
:
1000
,
page
:
1
,
keyword
:
""
}),
qs
.
stringify
({
limit
:
1000
,
page
:
1
,
keyword
:
""
}),
...
@@ -591,37 +525,37 @@ export default {
...
@@ -591,37 +525,37 @@ export default {
}
}
);
);
},
},
created
()
{
created
()
{
// console.log(this.$route.params.status)
// console.log(this.$route.params.status)
if
(
sessionStorage
.
getItem
(
"paramsstatus"
))
{
if
(
sessionStorage
.
getItem
(
"paramsstatus"
))
{
this
.
formItem
.
state
=
sessionStorage
.
getItem
(
"paramsstatus"
);
this
.
formItem
.
state
=
sessionStorage
.
getItem
(
"paramsstatus"
);
}
}
},
},
mounted
()
{
mounted
()
{
window
.
addEventListener
(
"mousewheel"
,
this
.
handleScroll
,
true
)
||
window
.
addEventListener
(
"mousewheel"
,
this
.
handleScroll
,
true
)
||
window
.
addEventListener
(
"DOMMouseScroll"
,
this
.
handleScroll
,
false
);
window
.
addEventListener
(
"DOMMouseScroll"
,
this
.
handleScroll
,
false
);
},
},
methods
:
{
methods
:
{
handleScroll
(
e
)
{
handleScroll
(
e
)
{
console
.
log
(
"页面应该发生滚动"
);
console
.
log
(
"页面应该发生滚动"
);
},
},
setstate
(
value
)
{
setstate
(
value
)
{
// console.log(value)
// console.log(value)
this
.
formItem
.
state
=
value
;
this
.
formItem
.
state
=
value
;
sessionStorage
.
setItem
(
"paramsstatus"
,
value
);
sessionStorage
.
setItem
(
"paramsstatus"
,
value
);
this
.
$refs
.
table
.
init
();
this
.
$refs
.
table
.
init
();
},
},
// 选择文件
// 选择文件
uploadfile
(
index
)
{
uploadfile
(
index
)
{
document
.
querySelector
(
"#upfile"
).
click
();
document
.
querySelector
(
"#upfile"
).
click
();
this
.
upindex
=
index
;
this
.
upindex
=
index
;
},
},
// 图片幻灯
// 图片幻灯
showtheimg
(
index
)
{
showtheimg
(
index
)
{
this
.
showimg
=
index
;
this
.
showimg
=
index
;
this
.
visible
=
true
;
this
.
visible
=
true
;
},
},
imgcancel
()
{
imgcancel
()
{
if
(
this
.
imglist
.
indexOf
(
""
)
==
-
1
)
this
.
imglist
.
push
(
""
);
if
(
this
.
imglist
.
indexOf
(
""
)
==
-
1
)
this
.
imglist
.
push
(
""
);
this
.
imglist
.
splice
(
this
.
showimg
,
1
);
this
.
imglist
.
splice
(
this
.
showimg
,
1
);
this
.
files
.
splice
(
this
.
showimg
,
1
);
this
.
files
.
splice
(
this
.
showimg
,
1
);
...
@@ -629,13 +563,13 @@ export default {
...
@@ -629,13 +563,13 @@ export default {
this
.
imglist
.
push
(
""
);
this
.
imglist
.
push
(
""
);
this
.
imglist
.
pop
(
""
);
this
.
imglist
.
pop
(
""
);
},
},
changefile
(
e
)
{
changefile
(
e
)
{
var
file
=
e
.
target
.
files
[
0
];
var
file
=
e
.
target
.
files
[
0
];
var
reader
=
new
FileReader
();
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
readAsDataURL
(
file
);
var
that
=
this
;
var
that
=
this
;
reader
.
onload
=
function
()
{
reader
.
onload
=
function
()
{
that
.
imglist
[
that
.
upindex
]
=
this
.
result
;
that
.
imglist
[
that
.
upindex
]
=
this
.
result
;
that
.
files
.
push
(
file
);
that
.
files
.
push
(
file
);
...
@@ -647,7 +581,7 @@ export default {
...
@@ -647,7 +581,7 @@ export default {
};
};
},
},
// 变更执行人
// 变更执行人
bgzxr
()
{
bgzxr
()
{
this
.
choosemodel
=
false
;
this
.
choosemodel
=
false
;
// console.log(this.userlist[this.userindex].id)
// console.log(this.userlist[this.userindex].id)
this
.
$request
.
post
(
this
.
$request
.
post
(
...
@@ -669,7 +603,7 @@ export default {
...
@@ -669,7 +603,7 @@ export default {
);
);
},
},
repairSubmit
()
{
repairSubmit
()
{
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
return
;
return
;
}
else
this
.
isok
=
true
;
}
else
this
.
isok
=
true
;
...
@@ -714,25 +648,25 @@ export default {
...
@@ -714,25 +648,25 @@ export default {
// getEndDate(endDate) {
// getEndDate(endDate) {
// this.formItem.endTime = endDate;
// this.formItem.endTime = endDate;
// },
// },
getCreatedTime
(
createdTime
)
{
getCreatedTime
(
createdTime
)
{
// Array [ "2019-07-20", "2019-08-14" ]
// Array [ "2019-07-20", "2019-08-14" ]
this
.
formItem
.
beginTime
=
createdTime
[
0
];
this
.
formItem
.
beginTime
=
createdTime
[
0
];
this
.
formItem
.
endTime
=
createdTime
[
1
];
this
.
formItem
.
endTime
=
createdTime
[
1
];
},
},
getCompletionTime
(
completionTime
)
{
getCompletionTime
(
completionTime
)
{
// Array [ "2019-07-20", "2019-08-14" ]
// Array [ "2019-07-20", "2019-08-14" ]
this
.
formItem
.
completionBeginTime
=
completionTime
[
0
];
this
.
formItem
.
completionBeginTime
=
completionTime
[
0
];
this
.
formItem
.
completionEndTime
=
completionTime
[
1
];
this
.
formItem
.
completionEndTime
=
completionTime
[
1
];
},
},
//新增
//新增
addProject
()
{
addProject
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"workOrderManage"
name
:
"workOrderManage"
});
});
},
},
// 导出
// 导出
exportProject
()
{
exportProject
()
{
var
beginTime
=
this
.
formItem
.
beginTime
||
""
;
var
beginTime
=
this
.
formItem
.
beginTime
||
""
;
var
endTime
=
this
.
formItem
.
endTime
||
""
;
var
endTime
=
this
.
formItem
.
endTime
||
""
;
var
completionBeginTime
=
this
.
formItem
.
completionBeginTime
||
""
;
var
completionBeginTime
=
this
.
formItem
.
completionBeginTime
||
""
;
...
@@ -752,7 +686,7 @@ export default {
...
@@ -752,7 +686,7 @@ export default {
},
},
// 导出
// 导出
exportProject_1
()
{
exportProject_1
()
{
var
beginTime
=
this
.
formItem
.
beginTime
||
""
;
var
beginTime
=
this
.
formItem
.
beginTime
||
""
;
var
endTime
=
this
.
formItem
.
endTime
||
""
;
var
endTime
=
this
.
formItem
.
endTime
||
""
;
var
completionBeginTime
=
this
.
formItem
.
completionBeginTime
||
""
;
var
completionBeginTime
=
this
.
formItem
.
completionBeginTime
||
""
;
...
@@ -772,18 +706,18 @@ export default {
...
@@ -772,18 +706,18 @@ export default {
},
},
//搜索
//搜索
searchSubmit
()
{
searchSubmit
()
{
this
.
isFirst
=
true
;
this
.
isFirst
=
true
;
this
.
$refs
.
table
.
init
();
this
.
$refs
.
table
.
init
();
this
.
isFirst
=
false
;
this
.
isFirst
=
false
;
},
},
//重置
//重置
searchCancel
()
{
searchCancel
()
{
this
.
formItem
=
{
this
.
formItem
=
{
workOrderNo
:
""
,
workOrderNo
:
""
,
state
:
sessionStorage
.
getItem
(
"paramsstatus"
),
state
:
sessionStorage
.
getItem
(
"paramsstatus"
),
name
:
""
,
name
:
""
,
contactName
:
""
,
contactName
:
""
,
phone
:
""
,
phone
:
""
,
isChange
:
""
,
isChange
:
""
,
userName
:
""
,
userName
:
""
,
...
@@ -802,7 +736,7 @@ export default {
...
@@ -802,7 +736,7 @@ export default {
},
},
// 备注提交
// 备注提交
msgOk
()
{
msgOk
()
{
this
.
modal_loading
=
true
;
this
.
modal_loading
=
true
;
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
return
;
return
;
...
@@ -850,7 +784,7 @@ export default {
...
@@ -850,7 +784,7 @@ export default {
}
}
},
},
//取消操作
//取消操作
viewCancel
(
arg
)
{
viewCancel
(
arg
)
{
this
.
msgModal
=
false
;
this
.
msgModal
=
false
;
this
.
modal_loading
=
false
;
this
.
modal_loading
=
false
;
this
.
$Message
.
info
(
"你取消了操作"
);
this
.
$Message
.
info
(
"你取消了操作"
);
...
@@ -863,11 +797,11 @@ export default {
...
@@ -863,11 +797,11 @@ export default {
},
},
// 批量删除弹出框处理
// 批量删除弹出框处理
delModal
()
{
delModal
()
{
// console.log(this.selection);
// console.log(this.selection);
if
(
this
.
selection
.
length
>
1
)
{
if
(
this
.
selection
.
length
>
1
)
{
this
.
$Modal
.
error
({
title
:
"提示信息"
,
content
:
"请逐条删除数据!"
});
this
.
$Modal
.
error
({
title
:
"提示信息"
,
content
:
"请逐条删除数据!"
});
}
else
if
(
this
.
selection
.
length
>
0
)
{
}
else
if
(
this
.
selection
.
length
>
0
)
{
this
.
deleteAllModal
=
true
;
this
.
deleteAllModal
=
true
;
}
else
{
}
else
{
this
.
$Modal
.
error
({
title
:
"提示信息"
,
content
:
"请选择删除数据!"
});
this
.
$Modal
.
error
({
title
:
"提示信息"
,
content
:
"请选择删除数据!"
});
...
@@ -875,7 +809,7 @@ export default {
...
@@ -875,7 +809,7 @@ export default {
},
},
// 批量删除
// 批量删除
delAll
()
{
delAll
()
{
let
_self
=
this
let
_self
=
this
// console.log(this.selection)
// console.log(this.selection)
if
(
!
this
.
delRemarks
)
{
if
(
!
this
.
delRemarks
)
{
...
@@ -902,7 +836,7 @@ export default {
...
@@ -902,7 +836,7 @@ export default {
}
}
);
);
},
},
copyWorkOrder
()
{
copyWorkOrder
()
{
let
_self
=
this
let
_self
=
this
let
copyList
=
[];
let
copyList
=
[];
this
.
selection
.
map
(
item
=>
{
this
.
selection
.
map
(
item
=>
{
...
@@ -938,31 +872,39 @@ div.addimg {
...
@@ -938,31 +872,39 @@ div.addimg {
text-align
:
center
;
text-align
:
center
;
top
:
-15px
;
top
:
-15px
;
}
}
div
.addimg
img
{
div
.addimg
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
div
.addimg
.ivu-icon
{
div
.addimg
.ivu-icon
{
font-size
:
40px
;
font-size
:
40px
;
line-height
:
1.5
;
line-height
:
1.5
;
}
}
div
.showtheimg
.ivu-modal-mask
{
div
.showtheimg
.ivu-modal-mask
{
z-index
:
800
;
z-index
:
800
;
}
}
div
.showtheimg
.ivu-modal-wrap
{
div
.showtheimg
.ivu-modal-wrap
{
z-index
:
1200
;
z-index
:
1200
;
}
}
div
.showtheimg
.ivu-modal
{
div
.showtheimg
.ivu-modal
{
top
:
30px
;
top
:
30px
;
}
}
div
.showtheimg
.ivu-modal-body
{
div
.showtheimg
.ivu-modal-body
{
text-align
:
center
;
text-align
:
center
;
}
}
div
.showtheimg
.ivu-modal-body
img
{
div
.showtheimg
.ivu-modal-body
img
{
height
:
22rem
;
height
:
22rem
;
width
:
74%
;
width
:
74%
;
}
}
p
#labels
>
label
{
p
#labels
>
label
{
cursor
:
pointer
;
cursor
:
pointer
;
margin
:
0px
10px
;
margin
:
0px
10px
;
}
}
...
...
src/views/workOrderEdit/index.vue
View file @
9a4daf48
<
template
>
<
template
>
<div>
<div>
<Card>
<!--
<p
slot=
"title"
>
工单详情
</p>
-->
<div
slot=
"title"
>
<!--工具栏-->
<Button
:disabled=
"workOrder.state==='待评价'?true:workOrder.state==='已评价'?true:!auth.tf_repair_problem_edit"
type=
"primary"
@
click=
"submit"
>
提交修改
</Button>
<Button
:disabled=
"workOrder.state==='待评价'?true:workOrder.state==='已评价'?true:!auth.tf_repair_problem_add_user"
type=
"primary"
style=
"margin-left: 10px"
@
click=
"openChangeUserModal"
>
{{
workOrder
.
state
==
"待维修"
?
'变更执行人'
:
'派单'
}}
</Button>
<Button
:disabled=
"workOrder.state==='待评价'?true:workOrder.state==='已评价'?true:!auth.tf_repair_problem_complete"
type=
"primary"
style=
"margin-left: 10px"
@
click=
"openCompleteModal"
>
完成工单
</Button>
<Button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"openRemarkModal"
>
备注
</Button>
<Button
style=
"margin-left: 10px"
@
click=
"goBack"
>
返回
</Button>
</div>
<!-- 编辑工单 -->
<Row
:gutter=
"20"
>
<Col
span=
"10"
>
<Card>
<Card>
<p
slot=
"title"
>
单号:
<span>
{{
workOrder
.
workOrderNo
}}
</span><span
style=
"margin-left: 10px"
><Tag
color=
"blue"
>
{{
workOrder
.
state
}}
</Tag></span></p>
<!--
<p
slot=
"title"
>
工单详情
</p>
-->
<div
slot=
"title"
>
<Form
ref=
"kfxx"
:model=
"formItem"
:label-width=
"120"
:rules=
"ruleValidate"
>
<!--工具栏-->
<Row
type=
"flex"
justify=
"start"
>
<Button
<Col
span=
"20"
>
:disabled=
"workOrder.state === '待评价' ? true : workOrder.state === '已评价' ? true : !auth.tf_repair_problem_edit"
<FormItem
label=
"报修人"
>
type=
"primary"
@
click=
"submit"
>
<Select
提交修改
v-model=
"custQuery"
</Button>
filterable
<Button
ref=
"callidselect"
:disabled=
"workOrder.state === '待评价' ? true : workOrder.state === '已评价' ? true : !auth.tf_repair_problem_add_user"
remote
type=
"primary"
style=
"margin-left: 10px"
@
click=
"openChangeUserModal"
>
:remote-method=
"custSearch"
{{
workOrder
.
state
==
"待维修"
?
'变更执行人'
:
'派单'
}}
icon=
"search"
</Button>
:blur=
"callIDblur"
<Button
@
on-change=
"custChange"
:disabled=
"workOrder.state === '待评价' ? true : workOrder.state === '已评价' ? true : !auth.tf_repair_problem_complete"
:maxlength=
"20"
type=
"primary"
style=
"margin-left: 10px"
@
click=
"openCompleteModal"
>
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
完成工单
>
</Button>
<Option
<Button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"openRemarkModal"
>
v-for=
"(option, index) in callIDOptions"
备注
:value=
"option.name"
</Button>
:key=
"index"
<Button
style=
"margin-left: 10px"
@
click=
"goBack"
>
:label=
"option.label"
返回
>
{{
option
.
name
}}
</Option>
</Button>
</Select>
</div>
</FormItem>
<!-- 编辑工单 -->
</Col>
<Row
:gutter=
"20"
>
<Col
span=
"4"
>
<Col
span=
"10"
>
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
></Button></div>
<Card>
</Col>
<p
slot=
"title"
>
单号:
<span>
{{
workOrder
.
workOrderNo
}}
</span><span
style=
"margin-left: 10px"
>
</Row>
<Tag
color=
"blue"
>
{{
workOrder
.
state
}}
</Tag>
</span></p>
<Row>
<Col
span=
"20"
>
<Form
ref=
"kfxx"
:model=
"formItem"
:label-width=
"120"
:rules=
"ruleValidate"
>
<FormItem
label=
"代报修"
style=
"width: 100%;text-align: left;"
prop=
"replacementRepair"
>
<Row
type=
"flex"
justify=
"start"
>
<RadioGroup
v-model=
"formItem.replacementRepair"
>
<Col
span=
"20"
>
<Radio
label=
"1"
>
<FormItem
label=
"报修人"
>
<span>
是
</span>
<Select
v-model=
"custQuery"
filterable
ref=
"callidselect"
remote
:remote-method=
"custSearch"
</Radio>
icon=
"search"
:blur=
"callIDblur"
@
on-change=
"custChange"
:maxlength=
"20"
<Radio
label=
"0"
>
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
>
<span>
否
</span>
<Option
v-for=
"(option, index) in callIDOptions"
:value=
"option.name"
:key=
"index"
</Radio>
:label=
"option.label"
>
{{
option
.
name
}}
</Option>
</RadioGroup>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
<Col
span=
"4"
>
<!-- 联系人姓名 -->
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
></Button></div>
<Row
type=
"flex"
justify=
"start"
>
</Col>
<Col
span=
"20"
>
</Row>
<FormItem
label=
"联系人"
prop=
"contactName"
>
<Input
type=
"text"
v-model=
"formItem.contactName"
:disabled=
"formItem.replacementRepair==='1'?false:true"
v-show=
"formItem.replacementRepair!=='1'"
></Input>
<Row>
<Select
<Col
span=
"20"
>
v-model=
"formItem.contactClient"
<FormItem
label=
"代报修"
style=
"width: 100%;text-align: left;"
prop=
"replacementRepair"
>
filterable
<RadioGroup
v-model=
"formItem.replacementRepair"
>
ref=
"contactSelect"
<Radio
label=
"1"
>
remote
<span>
是
</span>
:remote-method=
"contactCustSearch"
</Radio>
icon=
"search"
<Radio
label=
"0"
>
@
on-change=
"contactCustChange"
<span>
否
</span>
:maxlength=
"20"
</Radio>
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
</RadioGroup>
:disabled=
"formItem.replacementRepair==='1'?false:true"
</FormItem>
v-show=
"formItem.replacementRepair==='1'"
</Col>
>
</Row>
<Option
<!-- 联系人姓名 -->
v-for=
"(option, index) in contactOptions"
<Row
type=
"flex"
justify=
"start"
>
:value=
"option.name"
<Col
span=
"20"
>
:key=
"index"
<FormItem
label=
"联系人"
prop=
"contactName"
>
:label=
"option.label"
<Input
type=
"text"
v-model=
"formItem.contactName"
>
{{
option
.
name
}}
</Option>
:disabled=
"formItem.replacementRepair === '1' ? false : true"
</Select>
v-show=
"formItem.replacementRepair !== '1'"
></Input>
</FormItem>
<Select
v-model=
"formItem.contactClient"
filterable
ref=
"contactSelect"
remote
</Col>
:remote-method=
"contactCustSearch"
icon=
"search"
@
on-change=
"contactCustChange"
:maxlength=
"20"
<Col
span=
"4"
>
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
:disabled=
"formItem.replacementRepair === '1' ? false : true"
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
v-show=
"formItem.replacementRepair==='1'"
></Button></div>
v-show=
"formItem.replacementRepair === '1'"
>
</Col>
<Option
v-for=
"(option, index) in contactOptions"
:value=
"option.name"
:key=
"index"
</Row>
:label=
"option.label"
>
{{
option
.
name
}}
</Option>
</Select>
<!-- 联系人号码 -->
</FormItem>
<Row
type=
"flex"
justify=
"start"
>
</Col>
<Col
span=
"20"
>
<Col
span=
"4"
>
<FormItem
label=
"联系电话"
prop=
"contactNumber"
>
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
<Input
type=
"text"
v-model=
"formItem.contactNumber"
></Input>
v-show=
"formItem.replacementRepair === '1'"
></Button></div>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row>
<Row>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"工单来源"
>
<FormItem
label=
"位置"
prop=
"officeLocation"
>
<Input
type=
"text"
disabled
v-model=
"formItem.dataSourceName"
></Input>
<AutoComplete
</FormItem>
v-model=
"formItem.officeLocation"
</Col>
placeholder=
"请输入位置"
</Row>
@
on-search=
"officeLocationSearch"
<!-- 联系人号码 -->
>
<Row
type=
"flex"
justify=
"start"
>
<option
class=
"location"
<Col
span=
"20"
>
@
click=
"locationChange(item)"
<FormItem
label=
"联系电话"
prop=
"contactNumber"
>
:value=
"item"
<Input
type=
"text"
v-model=
"formItem.contactNumber"
></Input>
v-for=
"item in officeLocations"
</FormItem>
:key=
"item"
</Col>
>
{{
item
}}
</option>
</Row>
</AutoComplete>
<Row>
</FormItem>
<Col
span=
"20"
>
</Col>
<FormItem
label=
"位置"
prop=
"officeLocation"
>
</Row>
<AutoComplete
v-model=
"formItem.officeLocation"
placeholder=
"请输入位置"
@
on-search=
"officeLocationSearch"
>
<Row>
<option
class=
"location"
@
click=
"locationChange(item)"
:value=
"item"
v-for=
"item in officeLocations"
<Col
span=
"20"
>
:key=
"item"
>
{{
item
}}
</option>
<FormItem
label=
"优先级"
>
</AutoComplete>
<Select
</FormItem>
v-model=
"formItem.priority"
</Col>
style=
"text-align: left"
</Row>
placeholder=
"请选择优先级"
<Row>
>
<Col
span=
"20"
>
<Option
<FormItem
label=
"优先级"
>
v-for=
"(item,index) in priorityList"
<Select
v-model=
"formItem.priority"
style=
"text-align: left"
placeholder=
"请选择优先级"
>
:value=
"item.value"
<Option
v-for=
"(item, index) in priorityList"
:value=
"item.value"
:key=
"index"
:key=
"index"
style=
"text-align: left;"
>
{{
item
.
name
}}
</Option>
style=
"text-align: left;"
</Select>
>
{{
item
.
name
}}
</Option>
</FormItem>
</Select>
</Col>
</FormItem>
</Row>
</Col>
</Row>
<Row
type=
"flex"
justify=
"start"
>
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"12"
>
<Col
span=
"12"
>
<FormItem
<FormItem
label=
"预约单"
prop=
"reservation_type"
style=
"width: 100%;text-align: left;"
>
label=
"预约单"
prop=
"reservation_type"
style=
"width: 100%;text-align: left;"
>
<RadioGroup
v-model=
"formItem.reservations"
@
on-change=
"reservationChange"
>
<RadioGroup
v-model=
"formItem.reservations"
@
on-change=
"reservationChange"
>
<Radio
label=
"1"
><span>
是
</span></Radio>
<Radio
label=
"1"
><span>
是
</span></Radio>
<Radio
label=
"0"
><span>
否
</span></Radio>
<Radio
label=
"0"
><span>
否
</span></Radio>
</RadioGroup>
</RadioGroup>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row
v-show=
"isReservation"
>
<Row
v-show=
"isReservation"
>
<Col
span=
"12"
style=
"margin-right:10px;"
>
<Col
span=
"12"
style=
"margin-right:10px;"
>
<FormItem
<FormItem
label=
"预约时间"
prop=
"appointmentTime"
style=
"width: 100%;text-align: left;"
>
label=
"预约时间"
<DatePicker
type=
"datetime"
@
on-change=
"changeDate"
v-model=
"formItem.appointmentTime"
prop=
"appointmentTime"
placeholder=
"选择预约时间"
style=
"width: 180px"
></DatePicker>
style=
"width: 100%;text-align: left;"
>
<DatePicker
type=
"datetime"
@
on-change=
"changeDate"
v-model=
"formItem.appointmentTime"
placeholder=
"选择预约时间"
style=
"width: 180px"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row>
<Row>
<Col
span=
"12"
>
<Col
span=
"12"
>
<FormItem
label=
"报修类型"
prop=
"one_type"
>
<FormItem
label=
"报修类型"
prop=
"one_type"
>
<Select
<Select
v-model=
"formItem.problemClass"
@
on-change=
"getProblemList"
style=
"text-align: left"
>
v-model=
"formItem.problemClass"
<Option
v-for=
"(item, index) in parentList"
:value=
"item.parentProblem"
:key=
"item.parentId"
@
on-change=
"getProblemList"
style=
"text-align: left;"
>
{{
item
.
parentProblem
}}
</Option>
style=
"text-align: left"
>
<Option
v-for=
"(item,index) in treeList"
:value=
"item.parentProblem"
:key=
"index"
style=
"text-align: left;"
>
{{
item
.
parentProblem
}}
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"7"
>
<Col
span=
"7"
>
<FormItem
:label-width=
"5"
>
<FormItem
:label-width=
"5"
>
<Select
<Select
v-model=
"formItem.problemType"
@
on-change=
"getQuestionList"
style=
"text-align: left"
>
v-model=
"formItem.problemType"
<Option
v-for=
"(item, i) in sublevelList"
:value=
"item.problem"
:key=
"item.id"
@
on-change=
"getQuestionList"
style=
"text-align: left;"
>
style=
"text-align: left"
{{
item
.
problem
}}
</Option>
>
<Option
v-for=
"(item,i) in problemTypeList"
:value=
"item.problem"
:key=
"i"
style=
"text-align: left;"
>
{{
item
.
problem
}}
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row>
<Row>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
label=
"问题项"
style=
"text-align:left"
>
<FormItem
label=
"问题项"
style=
"text-align:left"
>
<CheckboxGroup
v-model=
"formItem.problem"
@
on-change=
"checkProblem"
>
<CheckboxGroup
v-model=
"formItem.problem"
@
on-change=
"checkProblem"
>
<Checkbox
:key=
"index"
:label=
"item.problem"
v-for=
"(item,index) in questionList"
><span>
{{
item
.
problem
}}
</span></Checkbox>
<Checkbox
:key=
"index"
:label=
"item.problem"
v-for=
"(item, index) in questionList"
>
<span>
{{
item
.
problem
}}
</span>
</Checkbox>
<Checkbox
key=
"other"
label=
"其他"
><span>
其他
</span></Checkbox>
<Checkbox
key=
"other"
label=
"其他"
><span>
其他
</span></Checkbox>
</CheckboxGroup>
</CheckboxGroup>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row
v-show=
"isOtherProblem"
>
<Row
v-show=
"isOtherProblem"
>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
<FormItem
label=
"其他问题项"
prop=
"otherProblem"
>
label=
"其他问题项"
<Input
type=
"text"
v-model=
"formItem.otherProblem"
placeholder=
"请简短描述"
></Input>
prop=
"otherProblem"
>
<Input
type=
"text"
v-model=
"formItem.otherProblem"
placeholder=
"请简短描述"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row
style=
"margin-bottom:30px;"
>
<Row
style=
"margin-bottom:30px;"
>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
label=
"图片描述"
>
<FormItem
label=
"图片描述"
>
<Modal
<Modal
title=
"图片查看"
v-model=
"visible"
:closable=
"true"
:mask-closable=
"false"
>
title=
"图片查看"
v-model=
"visible"
:closable=
"true"
:mask-closable=
"false"
>
<img
:src=
"imgList[showImg]"
v-if=
"visible"
style=
"width: 100%"
/>
<img
:src=
"imgList[showImg]"
v-if=
"visible"
style=
"width: 100%"
/>
</Modal>
</Modal>
<div
<div
class=
"addimg demo-upload-list"
:style=
"
{ 'left': (index) * 63 + 'px' }"
class=
"addimg demo-upload-list"
v-for="(item, index) in imgList" :key="index">
:style=
"
{'left':(index)*63+'px'}"
<img
:src=
"item"
alt
v-if=
"item != ''"
style=
"pointer-events: all"
@
click=
"handleView(index)"
/>
v-for="(item,index) in imgList"
:key="index"
<div
class=
"demo-upload-list-cover"
v-if=
"item != ''"
>
>
<Icon
type=
"ios-eye-outline"
@
click
.
native=
"handleView(index)"
style=
"font-size: 20px;"
></Icon>
<img
:src=
"item"
alt
v-if=
"item!=''"
style=
"pointer-events: all"
@
click=
"handleView(index)"
/>
<div
class=
"demo-upload-list-cover"
v-if=
"item!=''"
>
<Icon
type=
"ios-eye-outline"
@
click
.
native=
"handleView(index)"
style=
"font-size: 20px;"
></Icon>
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleRemove(index)"
style=
"font-size: 20px;"
></Icon>
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleRemove(index)"
style=
"font-size: 20px;"
></Icon>
</div>
</div>
</div>
</div>
<div
class=
"addimg demo-upload-list"
:style=
"
{'left':imgList.length*63+'px'}">
<div
class=
"addimg demo-upload-list"
:style=
"
{ 'left': imgList.length * 63 + 'px' }">
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
@
click=
"uploadImg()"
></i>
@
click=
"uploadImg()"
></i>
</div>
</div>
</FormItem>
</FormItem>
</Col>
</Col>
<input
<input
type=
"file"
name
id=
"uploadImg"
style=
"display:none;"
@
change=
"changeImg"
/>
type=
"file"
</Row>
name
id=
"uploadImg"
<Row>
style=
"display:none;"
<Col
span=
"24"
>
@
change=
"changeImg"
/>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem
label=
"备注"
>
<FormItem
label=
"备注"
>
<Input
<Input
type=
"textarea"
:rows=
"3"
v-model=
"formItem.remark"
placeholder=
"300字以内"
></Input>
type=
"textarea"
:rows=
"3"
v-model=
"formItem.remark"
placeholder=
"300字以内"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
</Card>
</Card>
</Col>
</Col>
<Col
span=
"14"
>
<Col
span=
"14"
>
<Tabs
type
=
'card'
@
on-click=
"clientRepairList"
v-model=
"activeTab"
>
<Tabs
type
=
'card'
@
on-click=
"clientRepairList"
v-model=
"activeTab"
>
<TabPane
label=
"报修详情"
>
<TabPane
label=
"报修详情"
>
<Collapse
v-model=
"openPanel"
>
<Collapse
v-model=
"openPanel"
>
<Panel>
<Panel>
报修人
报修人
<div
slot=
"content"
>
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
name
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
name
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
jobTitle
}}
</div></div>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
jobTitle
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
companyName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
companyName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
deptName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
deptName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
phone
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
phone
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
undef
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
undef
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
tel
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
tel
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
sex
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
sex
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
</Panel>
</Panel>
<Panel
v-show=
"formItem.replacementRepair
==
'1'"
>
<Panel
v-show=
"formItem.replacementRepair
==
'1'"
>
联系人
联系人
<div
slot=
"content"
>
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactJobTitle
}}
</div></div>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactJobTitle
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactCompanyName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactCompanyName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactDeptName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactDeptName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactPhone
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactPhone
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactUndef
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactUndef
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactTel
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactTel
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactSex
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactSex
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
...
@@ -377,10 +323,75 @@
...
@@ -377,10 +323,75 @@
<div
slot=
"content"
>
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
执行人:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
userName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
执行人:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
userName
}}
</div>
</div>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
参与者:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
participators
}}
</div>
</div>
</Col>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"24"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
解决方法标签:
</label>
<div
class=
"solveTabs"
style=
"display: inline-block"
v-for=
"(item, index) in formItem.repairLabel"
:key=
"index"
>
{{
item
}}
</div>
</div>
</Col>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"24"
style=
"padding: 16px"
>
<div
style=
"display: flex;"
>
<label
style=
"text-align: right;padding: 10px 12px 10px 0;width: 80px;flex-shrink: 0;"
>
验收图片:
</label>
<div
class=
"verificationImgList"
>
<img
class=
"verificationImg"
v-for=
"item in formItem.repairImgs"
:src=
"item"
alt=
""
@
click=
"getImg(item)"
>
</div>
<Modal
title=
"View Image"
v-model=
"visible"
>
<img
:src=
"imgUrl"
v-if=
"visible"
style=
"width: 100%"
>
</Modal>
</div>
</Col>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"24"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
备注:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
finishRemark
}}
</div>
</div>
</Col>
</Col>
</Row>
</div>
</Panel>
<Panel>
用户评价
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
参与者:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
participators
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
评价星级:
</label>
<div
style=
"display: inline-block"
>
<Rate
disabled
v-model=
"formItem.repairEstimate.star"
></Rate>
</div>
</div>
</Col>
<Col
span=
"16"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
评价标签:
</label>
<div
class=
"solveTabs"
style=
"display: inline-block"
v-for=
"(item, index) in formItem.estimateLabel"
:key=
"index"
>
{{
item
}}
</div>
</div>
</Col>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"24"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
评价内容:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
repairEstimate
.
remark
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
...
@@ -390,15 +401,21 @@
...
@@ -390,15 +401,21 @@
<div
slot=
"content"
>
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
报修来源:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
repairSource
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
报修来源:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
repairSource
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
创建时间:
</label><div
style=
"display: inline-block"
>
{{
workOrder
.
gmtCreate
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
创建时间:
</label>
<div
style=
"display: inline-block"
>
{{
workOrder
.
gmtCreate
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
最后修改时间:
</label><div
style=
"display: inline-block"
>
{{
workOrder
.
gmtModified
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
最后修改时间:
</label>
<div
style=
"display: inline-block"
>
{{
workOrder
.
gmtModified
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
...
@@ -409,343 +426,207 @@
...
@@ -409,343 +426,207 @@
<div
class=
"tabBox"
style=
"background-color:white;border:1px solid #dddee1;border-top:none;padding:10px;"
>
<div
class=
"tabBox"
style=
"background-color:white;border:1px solid #dddee1;border-top:none;padding:10px;"
>
<Row
:gutter=
"10"
style=
"margin:0px 10px;"
>
<Row
:gutter=
"10"
style=
"margin:0px 10px;"
>
<Col
span=
"24"
style=
"margin:20px 0px 0px;"
>
<Col
span=
"24"
style=
"margin:20px 0px 0px;"
>
<template>
<template>
<Timeline
style=
"text-align:left"
>
<Timeline
style=
"text-align:left"
>
<TimelineItem
<TimelineItem
v-for=
"(item, index) in recordEntityList"
:color=
"item.state ? '#2d8cf0' : '#2c3e50'"
v-for=
"(item,index) in recordEntityList"
:style=
"
{ color: item.state ? '#2d8cf0' : '' }" :key="index">
:color=
"item.state?'#2d8cf0':'#2c3e50'"
<p
class=
"time"
>
{{
item
.
gmtCreate
}}
</p>
:style=
"
{color:item.state?'#2d8cf0':''}"
<p
class=
"content"
>
{{
item
.
subject
}}
</p>
:key="index"
<p
class=
"content"
>
{{
item
.
title
}}
</p>
>
<div
style=
"max-height: 110px;"
>
<p
class=
"time"
>
{{
item
.
gmtCreate
}}
</p>
<div
style=
"display:inline-block;width:80px;height:70px;overflow:hidden;margin: 0 10px;"
<p
class=
"content"
>
{{
item
.
subject
}}
</p>
v-for=
"(item1, index1) in item.progress_img"
:key=
"index1"
>
<p
class=
"content"
>
{{
item
.
title
}}
</p>
<img
style=
"width:80px;height:80px"
:src=
"item1"
alt
v-if=
"item1 != ''"
<div
style=
"max-height: 110px;"
>
@
click=
"showtheimg1(item1, index, index1)"
/>
<div
style=
"display:inline-block;width:80px;height:70px;overflow:hidden;margin: 0 10px;"
v-for=
"(item1,index1) in item.progress_img"
:key=
"index1"
>
<img
style=
"width:80px;height:80px"
:src=
"item1"
alt
v-if=
"item1!=''"
@
click=
"showtheimg1(item1,index,index1)"
/>
</div>
</div>
</div>
</TimelineItem>
</div>
</TimelineItem>
<Modal
title=
"图片查看"
v-model=
"visible1"
:closable=
"false"
>
<img
:src=
"progressary[showimg1]"
v-if=
"visible1"
style=
"width: 100%"
/>
<Modal
title=
"图片查看"
v-model=
"visible1"
:closable=
"false"
>
</Modal>
<img
:src=
"progressary[showimg1]"
v-if=
"visible1"
style=
"width: 100%"
/>
</Timeline>
</Modal>
</
template
>
</Timeline>
<!-- </Card> -->
</
template
>
<!-- </Card> -->
</Col>
</Col>
</Row>
</Row>
</div>
</div>
</TabPane>
</TabPane>
<TabPane
label=
"历史报修"
>
<TabPane
label=
"历史报修"
>
<div
style=
"background-color:white;border:1px solid #dddee1;border-top:none;padding:10px;"
>
<div
style=
"background-color:white;border:1px solid #dddee1;border-top:none;padding:10px;"
>
<m-table
:config=
"tableConfig"
:searchParams=
"repairHistoryForm"
ref=
"repairHistoryTable"
:isFirst=
"isFirst"
></m-table>
<m-table
:config=
"tableConfig"
:searchParams=
"repairHistoryForm"
ref=
"repairHistoryTable"
:isFirst=
"isFirst"
></m-table>
</div>
</div>
</TabPane>
</TabPane>
</Tabs>
</Tabs>
</Col>
</Col>
</Row>
</Row>
</Card>
</Card>
<!-- 派单 -->
<!-- 派单 -->
<Modal
<Modal
v-model=
"changeUserModal"
:title=
"workOrder.state == '待维修' ? '变更执行人' : '派单信息'"
width=
"500"
v-model=
"changeUserModal"
@
on-ok=
"changeUserSumbit"
@
on-cancel=
"changeUserModal = false"
>
:title=
"workOrder.state=='待维修'?'变更执行人':'派单信息'"
<Form
:model=
"dispatchItem"
:label-width=
"80"
:rules=
"ruleValidate"
>
width=
"500"
<Row
type=
"flex"
style=
"margin-top:20px;margin-bottom:20px"
justify=
"start"
>
@
on-ok=
"changeUserSumbit"
<Col
span=
"20"
>
@
on-cancel=
"changeUserModal=false"
>
<Form
:model=
"dispatchItem"
:label-width=
"80"
:rules=
"ruleValidate"
>
<Row
type=
"flex"
style=
"margin-top:20px;margin-bottom:20px"
justify=
"start"
>
<Col
span=
"20"
>
<FormItem
label=
"执行人"
prop=
"executor"
>
<FormItem
label=
"执行人"
prop=
"executor"
>
<Select
<Select
:v-model=
"dispatchItem.userName"
filterable
@
on-change=
"changeUser"
placeholder=
"请选择执行人"
>
:v-model=
"dispatchItem.userName"
<Option
v-for=
"(item, index) in userlist"
:label=
"item.name"
:value=
"index"
:key=
"index"
>
filterable
<span
@
on-change=
"changeUser"
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{
placeholder=
"请选择执行人"
item.name
>
}}
</span>
<Option
<span>
{{ item.problemNum == null ? 0 : item.problemNum }}单
</span>
v-for=
"(item, index) in userlist"
:label=
"item.name"
:value=
"index"
:key=
"index"
>
<span
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{item.name}}
</span>
<span>
{{item.problemNum==null?0:item.problemNum}}单
</span>
</Option>
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row
style=
"margin:20px 0px"
>
<Row
style=
"margin:20px 0px"
>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"参与者"
>
<FormItem
label=
"参与者"
>
<Select
v-model=
"dispatchItem.participatorids"
multiple
style=
"width:100%;"
>
<Select
v-model=
"dispatchItem.participatorids"
multiple
style=
"width:100%;"
>
<Option
<Option
:value=
"item.id"
:label=
"item.name"
v-for=
"(item, index) in userlist"
:key=
"index"
>
:value=
"item.id"
<span
:label=
"item.name"
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{
v-for=
"(item,index) in userlist"
item.name
:key=
"index"
}}
</span>
>
<span>
{{ item.problemNum == null ? 0 : item.problemNum }}单
</span>
<span
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{item.name}}
</span>
<span>
{{item.problemNum==null?0:item.problemNum}}单
</span>
</Option>
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<Row
v-if=
"workOrder.state==
'待维修'"
>
<Row
v-if=
"workOrder.state ==
'待维修'"
>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"变更说明"
>
<FormItem
label=
"变更说明"
>
<Input
<Input
v-model=
"dispatchItem.changeDescription"
type=
"textarea"
:autosize=
"{ minRows: 4, maxRows: 5 }"
v-model=
"dispatchItem.changeDescription"
placeholder=
"请输入备注信息"
></Input>
type=
"textarea"
:autosize=
"{minRows: 4,maxRows: 5}"
placeholder=
"请输入备注信息"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
</Modal>
</Modal>
<!--完成工单确认-->
<!--完成工单确认-->
<Modal
v-model=
"completeModal"
width=
"300"
title=
"提示"
>
<Modal
v-model=
"completeModal"
width=
"300"
title=
"提示"
>
<p
id=
"note-info"
>
确认完成工单?
</p>
<p
id=
"note-info"
>
确认完成工单?
</p>
<div
slot=
"footer"
style=
"text-align:center;margin:0 auto;"
>
<div
slot=
"footer"
style=
"text-align:center;margin:0 auto;"
>
<Button
type=
"ghost"
size=
"default"
@
click=
"completeModal=false"
>
取消
</Button>
<Button
type=
"ghost"
size=
"default"
@
click=
"completeModal = false"
>
取消
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"complete()"
>
确定
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"complete()"
>
确定
</Button>
</div>
</div>
</Modal>
</Modal>
<!-- 备注 -->
<!-- 备注 -->
<Modal
<Modal
v-model=
"remarkModal"
width=
"800"
title=
"备注"
@
on-ok=
"remarkCommit"
@
on-cancel=
"remarkModal = false"
>
v-model=
"remarkModal"
<Form
:model=
"remarkForm"
:label-width=
"80"
>
width=
"800"
<Row>
title=
"备注"
<Col
span=
"24"
style=
"margin:15px 0"
>
@
on-ok=
"remarkCommit"
@
on-cancel=
"remarkModal = false"
>
<Form
:model=
"remarkForm"
:label-width=
"80"
>
<Row>
<Col
span=
"24"
style=
"margin:15px 0"
>
<FormItem
label=
"图片描述"
>
<FormItem
label=
"图片描述"
>
<Modal
<Modal
title=
"图片查看"
v-model=
"visibleRemarkImg"
:closable=
"true"
:mask-closable=
"false"
>
title=
"图片查看"
v-model=
"visibleRemarkImg"
:closable=
"true"
:mask-closable=
"false"
>
<img
:src=
"remarkImgList[showRemarkImg]"
v-if=
"visibleRemarkImg"
style=
"width: 100%"
/>
<img
:src=
"remarkImgList[showRemarkImg]"
v-if=
"visibleRemarkImg"
style=
"width: 100%"
/>
</Modal>
</Modal>
<div
<div
class=
"addimg demo-upload-list"
:style=
"{ 'left': (index) * 63 + 'px' }"
class=
"addimg demo-upload-list"
v-for=
"(item, index) in remarkImgList"
:key=
"index"
>
:style=
"{'left':(index)*63+'px'}"
<img
:src=
"item"
alt
v-if=
"item != ''"
style=
"pointer-events: all"
/>
v-for=
"(item,index) in remarkImgList"
<div
class=
"demo-upload-list-cover"
v-if=
"item != ''"
>
:key=
"index"
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleRemoveRemarkImg(index)"
style=
"font-size: 20px;"
>
>
</Icon>
<img
:src=
"item"
alt
v-if=
"item!=''"
style=
"pointer-events: all"
/>
<div
class=
"demo-upload-list-cover"
v-if=
"item!=''"
>
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleRemoveRemarkImg(index)"
style=
"font-size: 20px;"
></Icon>
</div>
</div>
</div>
</div>
<div
class=
"addimg demo-upload-list"
:style=
"{'left':remarkImgList.length*63+'px'}"
>
<div
class=
"addimg demo-upload-list"
:style=
"{ 'left': remarkImgList.length * 63 + 'px' }"
>
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
@
click=
"uploadRemarkImg()"
></i>
@
click=
"uploadRemarkImg()"
></i>
</div>
</div>
</FormItem>
</FormItem>
<input
type=
"file"
name
id=
"uploadRemarkImg"
style=
"display:none;"
@
change=
"changeRemarkImg"
/>
<input
type=
"file"
name
id=
"uploadRemarkImg"
style=
"display:none;"
@
change=
"changeRemarkImg"
/>
</Col>
</Col>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"备注"
>
<FormItem
label=
"备注"
>
<Input
<Input
v-model=
"remarkForm.remark"
type=
"textarea"
:autosize=
"{ minRows: 4, maxRows: 5 }"
v-model=
"remarkForm.remark"
placeholder=
"请输入备注信息"
></Input>
type=
"textarea"
:autosize=
"{minRows: 4,maxRows: 5}"
placeholder=
"请输入备注信息"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
<div
slot=
"footer"
style=
"text-align:right;"
>
<div
slot=
"footer"
style=
"text-align:right;"
>
<Row>
<Row>
<Col
span=
"24"
>
<Col
span=
"24"
>
<Button
size=
"default"
@
click=
"remarkModal = false"
>
取消
</Button>
<Button
size=
"default"
@
click=
"remarkModal = false"
>
取消
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"remarkCommit"
:loading=
"modal_loading"
>
确定
</Button>
<Button
type=
"primary"
size=
"default"
@
click=
"remarkCommit"
:loading=
"modal_loading"
>
确定
</Button>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
</Modal>
</Modal>
<!-- 客户新增 -->
<!-- 客户新增 -->
<Modal
<Modal
v-model=
"addCustModal"
title=
"客户新增"
@
on-ok=
"addCustSumbit"
:loading=
"addCustLoading"
>
v-model=
"addCustModal"
<Form
ref=
"addCustRef"
:model=
"addCustForm"
:label-width=
"100"
:rules=
"addCustRule"
>
title=
"客户新增"
@
on-ok=
"addCustSumbit"
:loading=
"addCustLoading"
>
<Form
ref=
"addCustRef"
:model=
"addCustForm"
:label-width=
"100"
:rules=
"addCustRule"
>
<Row>
<Row>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"公司"
prop=
"companyCode"
>
label=
"公司"
<Select
v-model=
"addCustForm.companyCode"
style=
"text-align: left"
ref=
"companySelect"
filterable
prop=
"companyCode"
@
on-change=
"getDept"
clearable
>
>
<Option
v-for=
"item in companyList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{
<Select
item.groupName
v-model=
"addCustForm.companyCode"
}}
</Option>
style=
"text-align: left"
<!-- <Option value="">硬件问题</Option>
ref=
"companySelect"
filterable
@
on-change=
"getDept"
clearable
>
<Option
v-for=
"item in companyList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{ item.groupName}}
</Option>
<!-- <Option value="">硬件问题</Option>
<Option value="-1">软件问题</Option>-->
<Option value="-1">软件问题</Option>-->
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"部门"
prop=
"deptCode"
>
label=
"部门"
<Select
v-model=
"addCustForm.deptCode"
style=
"text-align: left"
ref=
"deptSelect"
filterable
clearable
>
prop=
"deptCode"
<Option
v-for=
"item in deptList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{
>
item.groupName
<Select
}}
</Option>
v-model=
"addCustForm.deptCode"
<!-- <Option value="">硬件问题</Option>
style=
"text-align: left"
ref=
"deptSelect"
filterable
clearable
>
<Option
v-for=
"item in deptList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{ item.groupName}}
</Option>
<!-- <Option value="">硬件问题</Option>
<Option value="-1">软件问题</Option>-->
<Option value="-1">软件问题</Option>-->
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"姓名"
prop=
"name"
>
label=
"姓名"
<Input
v-model=
"addCustForm.name"
:maxlength=
"20"
placeholder=
"请输入姓名"
></Input>
prop=
"name"
</FormItem>
>
<Input
v-model=
"addCustForm.name"
:maxlength=
"20"
placeholder=
"请输入姓名"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"优先级"
prop=
"priority"
>
label=
"优先级"
<Select
v-model=
"addCustForm.priority"
placeholder=
"请选择优先级"
>
prop=
"priority"
<Option
v-for=
"(item, index) in priority"
:value=
"item.value"
:key=
"index"
>
{{ item.name }}
</Option>
>
<!-- <Option value="待派单">高</Option>
<Select
v-model=
"addCustForm.priority"
placeholder=
"请选择优先级"
>
<Option
v-for=
"(item,index) in priority"
:value=
"item.value"
:key=
"index"
>
{{item.name}}
</Option>
<!-- <Option value="待派单">高</Option>
<Option value="待维修">很高</Option> -->
<Option value="待维修">很高</Option> -->
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"手机号"
prop=
"phone"
>
label=
"手机号"
<Input
v-model=
"addCustForm.phone"
:maxlength=
"20"
placeholder=
"请输入手机号"
></Input>
prop=
"phone"
</FormItem>
>
<Input
v-model=
"addCustForm.phone"
:maxlength=
"20"
placeholder=
"请输入手机号"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"座机"
prop=
"tel"
>
label=
"座机"
<Input
v-model=
"addCustForm.tel"
:maxlength=
"12"
placeholder=
"请输入座机号码"
></Input>
prop=
"tel"
</FormItem>
>
<Input
v-model=
"addCustForm.tel"
:maxlength=
"12"
placeholder=
"请输入座机号码"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"内线号码"
prop=
"undef"
>
label=
"内线号码"
<Input
v-model=
"addCustForm.undef"
:maxlength=
"12"
placeholder=
"请输入内线号码"
></Input>
prop=
"undef"
</FormItem>
>
<Input
v-model=
"addCustForm.undef"
:maxlength=
"12"
placeholder=
"请输入内线号码"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
label=
"位置"
>
<FormItem
label=
"位置"
>
<Input
<Input
v-model=
"addCustForm.officeLocation"
:maxlength=
"30"
placeholder=
"请输入位置"
></Input>
v-model=
"addCustForm.officeLocation"
</FormItem>
:maxlength=
"30"
placeholder=
"请输入位置"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
label=
"性别"
>
<FormItem
label=
"性别"
>
<RadioGroup
<RadioGroup
v-model=
"addCustForm.sex"
>
v-model=
"addCustForm.sex"
<Radio
label=
"男"
>
>
<span>
男
</span>
<Radio
label=
"男"
>
</Radio>
<span>
男
</span>
<Radio
label=
"女"
>
</Radio>
<span>
女
</span>
<Radio
label=
"女"
>
</Radio>
<span>
女
</span>
</RadioGroup>
</Radio>
</FormItem>
</RadioGroup>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
...
@@ -759,10 +640,11 @@ import util from "@/assets/js/util";
...
@@ -759,10 +640,11 @@ import util from "@/assets/js/util";
import
{
validateMobile
,
validateNumber
}
from
"@/assets/js/validate"
;
import
{
validateMobile
,
validateNumber
}
from
"@/assets/js/validate"
;
import
{
initCustSearchOption
,
getCustOrgInfo
,
getCustSex
,
getCustContactNumber
}
from
"@/utils/workOrder"
import
{
initCustSearchOption
,
getCustOrgInfo
,
getCustSex
,
getCustContactNumber
}
from
"@/utils/workOrder"
import
Bus
from
"@/bus"
;
import
Bus
from
"@/bus"
;
import
{
async
}
from
"q"
;
export
default
{
export
default
{
name
:
'workOrderEdit'
,
name
:
'workOrderEdit'
,
data
()
{
data
()
{
return
{
return
{
isOtherProblem
:
false
,
isOtherProblem
:
false
,
companyList
:
[],
companyList
:
[],
...
@@ -784,8 +666,8 @@ export default {
...
@@ -784,8 +666,8 @@ export default {
{
{
message
:
"请输入正确的手机号"
,
message
:
"请输入正确的手机号"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
var
reg
=
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
;
var
reg
=
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
;
if
(
!
value
)
{
if
(
!
value
)
{
return
value
;
return
value
;
}
else
if
(
!
reg
.
test
(
value
))
{
}
else
if
(
!
reg
.
test
(
value
))
{
...
@@ -800,7 +682,7 @@ export default {
...
@@ -800,7 +682,7 @@ export default {
{
{
message
:
"请输入正确的座机号码"
,
message
:
"请输入正确的座机号码"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
if
(
!
value
)
return
''
;
if
(
!
value
)
return
''
;
var
reg
=
/
[
0-9
\-]
/
;
var
reg
=
/
[
0-9
\-]
/
;
// var reg=/0\d{2,3}\-\d{7,8}/
// var reg=/0\d{2,3}\-\d{7,8}/
...
@@ -816,7 +698,7 @@ export default {
...
@@ -816,7 +698,7 @@ export default {
{
{
message
:
"请输入正确的内线号码"
,
message
:
"请输入正确的内线号码"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
if
(
!
value
)
return
''
;
if
(
!
value
)
return
''
;
var
reg
=
/^
\d
+$/
;
var
reg
=
/^
\d
+$/
;
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
...
@@ -832,7 +714,7 @@ export default {
...
@@ -832,7 +714,7 @@ export default {
]
]
},
},
priority
:
[],
priority
:
[],
openPanel
:
[
'0'
,
'1'
,
'2'
,
'3'
],
openPanel
:
[
'0'
,
'1'
,
'2'
,
'3'
],
// 派单表单
// 派单表单
dispatchItem
:
{
dispatchItem
:
{
userId
:
""
,
userId
:
""
,
...
@@ -924,8 +806,8 @@ export default {
...
@@ -924,8 +806,8 @@ export default {
contactName
:
[
contactName
:
[
{
required
:
true
,
message
:
"请填写联系人姓名"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请填写联系人姓名"
,
trigger
:
"blur"
}
],
],
replacementRepair
:[
replacementRepair
:
[
{
required
:
true
,
}
{
required
:
true
,
}
],
],
reservation_type
:
[
reservation_type
:
[
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"blur"
}
...
@@ -953,7 +835,7 @@ export default {
...
@@ -953,7 +835,7 @@ export default {
},
},
// 设置结束时间大于开始时间
// 设置结束时间大于开始时间
end
:
{
end
:
{
disabledDate
:
function
(
date
)
{
disabledDate
:
function
(
date
)
{
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
startUpdateTime
);
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
startUpdateTime
);
}.
bind
(
this
)
}.
bind
(
this
)
},
},
...
@@ -992,10 +874,10 @@ export default {
...
@@ -992,10 +874,10 @@ export default {
params
.
row
.
priority
===
"一级"
params
.
row
.
priority
===
"一级"
?
"error"
?
"error"
:
params
.
row
.
priority
===
"二级"
:
params
.
row
.
priority
===
"二级"
?
"warning"
?
"warning"
:
params
.
row
.
priority
===
"三级"
:
params
.
row
.
priority
===
"三级"
?
"success"
?
"success"
:
"info"
,
:
"info"
,
size
:
"small"
size
:
"small"
}
}
},
},
...
@@ -1072,19 +954,22 @@ export default {
...
@@ -1072,19 +954,22 @@ export default {
},
},
repairHistoryForm
:
{
repairHistoryForm
:
{
clientId
:
""
clientId
:
""
}
},
parentList
:
[],
sublevelList
:
[],
visible
:
false
,
imgUrl
:
''
};
};
},
},
mounted
()
{
mounted
()
{
// console.log(this.$route.params)
// console.log(this.$route.params)
},
},
created
()
{
created
()
{
let
self
=
this
let
self
=
this
self
.
firstLoad
()
self
.
firstLoad
()
},
},
beforeCreate
()
{
beforeCreate
()
{
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/user/searchUserProblemNum"
,
"/api/user/searchUserProblemNum"
,
...
@@ -1093,10 +978,34 @@ export default {
...
@@ -1093,10 +978,34 @@ export default {
this
.
userlist
=
res
.
responseResult
.
list
;
this
.
userlist
=
res
.
responseResult
.
list
;
this
.
userlist
.
sort
(
util
.
compare1
(
"problemNum"
));
this
.
userlist
.
sort
(
util
.
compare1
(
"problemNum"
));
},
},
res
=>
{}
res
=>
{
}
);
);
},
},
methods
:
{
methods
:
{
getImg
(
item
)
{
this
.
visible
=
true
;
this
.
imgUrl
=
item
},
getTreeList
()
{
const
that
=
this
this
.
$request
.
post
(
"/api/emaint/problem-base/getTreeList"
,
qs
.
stringify
({
dataSource
:
that
.
formItem
.
dataSource
}),
async
res
=>
{
this
.
parentList
=
await
res
.
responseResult
.
map
(
item
=>
{
item
.
parentId
=
`
${
item
.
parentId
}
`
return
item
})
let
arr
=
await
res
.
responseResult
.
filter
(
item
=>
item
.
parentProblem
==
that
.
formItem
.
problemClass
)
if
(
arr
.
length
&&
arr
[
0
].
childList
)
{
this
.
sublevelList
=
arr
[
0
].
childList
.
map
(
item
=>
{
item
.
id
=
`
${
item
.
id
}
`
return
item
})
}
}
);
},
firstLoad
()
{
firstLoad
()
{
this
.
activeTab
=
0
this
.
activeTab
=
0
this
.
onCreate
=
true
this
.
onCreate
=
true
...
@@ -1104,7 +1013,7 @@ export default {
...
@@ -1104,7 +1013,7 @@ export default {
this
.
getWorkOrder
(
orderId
)
this
.
getWorkOrder
(
orderId
)
this
.
getProblemPriority
()
this
.
getProblemPriority
()
},
},
getProblemPriority
()
{
getProblemPriority
()
{
// 优先级下拉列表
// 优先级下拉列表
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/dictionary/optionsByGroupCode"
,
"/api/dictionary/optionsByGroupCode"
,
...
@@ -1120,7 +1029,7 @@ export default {
...
@@ -1120,7 +1029,7 @@ export default {
}
}
);
);
},
},
custSearch
(
query
)
{
custSearch
(
query
)
{
let
self
=
this
let
self
=
this
if
(
query
!==
""
)
{
if
(
query
!==
""
)
{
this
.
callIDOptions
=
[];
this
.
callIDOptions
=
[];
...
@@ -1132,7 +1041,7 @@ export default {
...
@@ -1132,7 +1041,7 @@ export default {
// callID_list 处理展示数组
// callID_list 处理展示数组
this
.
callIDOptions
=
[];
this
.
callIDOptions
=
[];
let
callIDList
=
res
.
responseResult
.
data
;
let
callIDList
=
res
.
responseResult
.
data
;
if
(
callIDList
!=
null
&&
callIDList
!=
undefined
)
{
if
(
callIDList
!=
null
&&
callIDList
!=
undefined
)
{
initCustSearchOption
(
callIDList
,
query
,
this
.
callIDOptions
)
initCustSearchOption
(
callIDList
,
query
,
this
.
callIDOptions
)
}
}
// 初始化选择项
// 初始化选择项
...
@@ -1166,7 +1075,7 @@ export default {
...
@@ -1166,7 +1075,7 @@ export default {
// console.log(this.formItem);
// console.log(this.formItem);
}
}
},
},
contactCustSearch
(
query
,
type
)
{
contactCustSearch
(
query
,
type
)
{
if
(
query
!==
""
)
{
if
(
query
!==
""
)
{
this
.
contactOptions
=
[];
this
.
contactOptions
=
[];
this
.
$request
.
post
(
this
.
$request
.
post
(
...
@@ -1177,8 +1086,8 @@ export default {
...
@@ -1177,8 +1086,8 @@ export default {
// contactList 处理展示数组
// contactList 处理展示数组
this
.
contactOptions
=
[];
this
.
contactOptions
=
[];
let
contactList
=
res
.
responseResult
.
data
;
let
contactList
=
res
.
responseResult
.
data
;
if
(
contactList
!=
null
&&
contactList
!=
undefined
)
{
if
(
contactList
!=
null
&&
contactList
!=
undefined
)
{
initCustSearchOption
(
contactList
,
query
,
this
.
contactOptions
);
initCustSearchOption
(
contactList
,
query
,
this
.
contactOptions
);
}
}
},
},
res
=>
{
res
=>
{
...
@@ -1188,7 +1097,7 @@ export default {
...
@@ -1188,7 +1097,7 @@ export default {
this
.
contactOptions
=
[];
this
.
contactOptions
=
[];
this
.
formItem
.
contactClient
=
""
;
this
.
formItem
.
contactClient
=
""
;
this
.
formItem
.
contactPhone
=
""
;
this
.
formItem
.
contactPhone
=
""
;
this
.
formItem
.
contactNumber
=
""
;
this
.
formItem
.
contactNumber
=
""
;
this
.
formItem
.
contactUndef
=
""
;
this
.
formItem
.
contactUndef
=
""
;
this
.
formItem
.
contactDeptName
=
""
;
this
.
formItem
.
contactDeptName
=
""
;
this
.
formItem
.
contactJobTitle
=
""
;
this
.
formItem
.
contactJobTitle
=
""
;
...
@@ -1199,7 +1108,7 @@ export default {
...
@@ -1199,7 +1108,7 @@ export default {
this
.
formItem
.
contactClientId
=
""
;
this
.
formItem
.
contactClientId
=
""
;
}
}
},
},
handleRemove
(
index
)
{
handleRemove
(
index
)
{
this
.
imgFiles
.
splice
(
index
,
1
);
this
.
imgFiles
.
splice
(
index
,
1
);
this
.
imgList
.
splice
(
index
,
1
);
this
.
imgList
.
splice
(
index
,
1
);
if
(
this
.
editImgList
[
index
].
indexOf
(
"http"
)
!==
-
1
)
{
if
(
this
.
editImgList
[
index
].
indexOf
(
"http"
)
!==
-
1
)
{
...
@@ -1208,7 +1117,7 @@ export default {
...
@@ -1208,7 +1117,7 @@ export default {
},
},
handleRemoveRemarkImg
(
index
)
{
handleRemoveRemarkImg
(
index
)
{
this
.
remarkImgFiles
.
splice
(
index
,
1
);
this
.
remarkImgFiles
.
splice
(
index
,
1
);
this
.
remarkImgList
.
splice
(
index
,
1
);
this
.
remarkImgList
.
splice
(
index
,
1
);
},
},
...
@@ -1216,12 +1125,12 @@ export default {
...
@@ -1216,12 +1125,12 @@ export default {
// 位置自动检索
// 位置自动检索
locationChange
(
value
)
{
locationChange
(
value
)
{
console
.
log
(
value
,
"cv"
);
console
.
log
(
value
,
"cv"
);
this
.
formItem
.
officeLocation
=
value
;
this
.
formItem
.
officeLocation
=
value
;
},
},
officeLocationSearch
(
value
,
option
)
{
officeLocationSearch
(
value
,
option
)
{
this
.
officeLocations
=
this
.
officeLocationsBackup
.
filter
(
item
=>
{
this
.
officeLocations
=
this
.
officeLocationsBackup
.
filter
(
item
=>
{
return
(
return
(
item
item
...
@@ -1232,7 +1141,7 @@ export default {
...
@@ -1232,7 +1141,7 @@ export default {
});
});
},
},
changeImg
(
e
)
{
changeImg
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
var
file
=
e
.
target
.
files
[
0
];
var
file
=
e
.
target
.
files
[
0
];
if
(
file
.
type
.
indexOf
(
"image/"
)
==
-
1
)
{
if
(
file
.
type
.
indexOf
(
"image/"
)
==
-
1
)
{
...
@@ -1246,13 +1155,13 @@ export default {
...
@@ -1246,13 +1155,13 @@ export default {
var
reader
=
new
FileReader
();
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
readAsDataURL
(
file
);
var
that
=
this
;
var
that
=
this
;
reader
.
onload
=
function
()
{
reader
.
onload
=
function
()
{
that
.
imgList
.
push
(
this
.
result
);
that
.
imgList
.
push
(
this
.
result
);
that
.
imgFiles
.
push
(
file
);
that
.
imgFiles
.
push
(
file
);
};
};
},
},
changeRemarkImg
(
e
)
{
changeRemarkImg
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
var
file
=
e
.
target
.
files
[
0
];
var
file
=
e
.
target
.
files
[
0
];
if
(
file
.
type
.
indexOf
(
"image/"
)
==
-
1
)
{
if
(
file
.
type
.
indexOf
(
"image/"
)
==
-
1
)
{
...
@@ -1266,14 +1175,14 @@ export default {
...
@@ -1266,14 +1175,14 @@ export default {
var
reader
=
new
FileReader
();
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
readAsDataURL
(
file
);
var
that
=
this
;
var
that
=
this
;
reader
.
onload
=
function
()
{
reader
.
onload
=
function
()
{
that
.
remarkImgList
.
push
(
this
.
result
);
that
.
remarkImgList
.
push
(
this
.
result
);
that
.
remarkImgFiles
.
push
(
file
);
that
.
remarkImgFiles
.
push
(
file
);
};
};
},
},
// 加载常见问题
// 加载常见问题
getQuestionList
(
val
)
{
getQuestionList
(
val
)
{
let
self
=
this
;
let
self
=
this
;
this
.
problemTypeList
.
forEach
(
v
=>
{
this
.
problemTypeList
.
forEach
(
v
=>
{
if
(
v
.
problem
==
self
.
formItem
.
problemType
)
{
if
(
v
.
problem
==
self
.
formItem
.
problemType
)
{
...
@@ -1285,26 +1194,37 @@ export default {
...
@@ -1285,26 +1194,37 @@ export default {
res
=>
{
res
=>
{
this
.
questionList
=
res
.
responseResult
;
this
.
questionList
=
res
.
responseResult
;
},
},
res
=>
{}
res
=>
{
}
);
);
}
}
});
});
},
},
// 加载问题项
// 加载问题项
getProblemList
(
val
)
{
async
getProblemList
(
val
)
{
this
.
treeList
.
forEach
(
v
=>
{
if
(
val
)
{
if
(
v
.
parentProblem
==
this
.
formItem
.
problemClass
)
{
this
.
formItem
.
problemType
=
''
this
.
problemTypeList
=
v
.
childList
;
let
arr
=
this
.
parentList
.
filter
(
item
=>
item
.
parentProblem
==
val
)
if
(
val
)
{
if
(
arr
.
length
&&
arr
[
0
].
childList
)
{
this
.
formItem
.
problemType
=
""
;
this
.
sublevelList
=
arr
[
0
].
childList
.
map
(
item
=>
{
this
.
questionList
=
[];
item
.
id
=
`
${
item
.
id
}
`
}
return
item
})
}
}
});
}
// this.treeList.forEach(v => {
// if (v.parentProblem == this.formItem.problemClass) {
// this.problemTypeList = v.childList;
// if (val) {
// this.formItem.problemType = "";
// this.questionList = [];
// }
// }
// });
},
},
// 数组去重
// 数组去重
uniq
(
array
)
{
uniq
(
array
)
{
var
temp
=
[];
//一个新的临时数组
var
temp
=
[];
//一个新的临时数组
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
temp
.
indexOf
(
array
[
i
])
==
-
1
)
{
if
(
temp
.
indexOf
(
array
[
i
])
==
-
1
)
{
...
@@ -1314,7 +1234,7 @@ export default {
...
@@ -1314,7 +1234,7 @@ export default {
return
temp
;
return
temp
;
},
},
initCustOfficeLocation
(
clientId
,
onCreate
)
{
initCustOfficeLocation
(
clientId
,
onCreate
)
{
let
self
=
this
let
self
=
this
this
.
$request
.
post
(
this
.
$request
.
post
(
...
@@ -1326,16 +1246,16 @@ export default {
...
@@ -1326,16 +1246,16 @@ export default {
JSON
.
stringify
(
self
.
officeLocations
)
JSON
.
stringify
(
self
.
officeLocations
)
);
);
console
.
log
(
self
.
officeLocations
[
0
]);
console
.
log
(
self
.
officeLocations
[
0
]);
if
(
self
.
officeLocations
[
0
]
!==
undefined
&&
self
.
officeLocations
[
0
]
!==
"undefined"
&&
!
onCreate
)
{
if
(
self
.
officeLocations
[
0
]
!==
undefined
&&
self
.
officeLocations
[
0
]
!==
"undefined"
&&
!
onCreate
)
{
self
.
formItem
.
officeLocation
=
self
.
officeLocations
[
0
];
self
.
formItem
.
officeLocation
=
self
.
officeLocations
[
0
];
}
}
},
},
res
=>
{}
res
=>
{
}
);
);
},
},
// 输入手机号进行检索
// 输入手机号进行检索
custChange
(
val
)
{
custChange
(
val
)
{
if
(
!
val
)
return
;
if
(
!
val
)
return
;
// 兼容旧数据,旧数据没有部门
// 兼容旧数据,旧数据没有部门
let
noDept
=
false
;
let
noDept
=
false
;
...
@@ -1344,7 +1264,7 @@ export default {
...
@@ -1344,7 +1264,7 @@ export default {
// console.log('custChange ' + val);
// console.log('custChange ' + val);
var
flag
=
false
;
var
flag
=
false
;
this
.
callIDOptions
.
forEach
(
obj
=>
{
this
.
callIDOptions
.
forEach
(
obj
=>
{
if
(
(
obj
.
name
===
val
||
(
noDept
&&
obj
.
name
.
indexOf
(
val
)
!==
-
1
))
&&
obj
.
data
)
{
if
(
(
obj
.
name
===
val
||
(
noDept
&&
obj
.
name
.
indexOf
(
val
)
!==
-
1
))
&&
obj
.
data
)
{
flag
=
true
;
flag
=
true
;
let
v
=
obj
.
data
;
let
v
=
obj
.
data
;
this
.
formItem
.
phone
=
v
.
phone
;
this
.
formItem
.
phone
=
v
.
phone
;
...
@@ -1419,9 +1339,9 @@ export default {
...
@@ -1419,9 +1339,9 @@ export default {
this
.
onCreate
=
false
this
.
onCreate
=
false
},
},
contactCustChange
()
{
contactCustChange
()
{
console
.
log
(
this
.
formItem
.
contactClient
);
console
.
log
(
this
.
formItem
.
contactClient
);
if
(
!
this
.
formItem
.
contactClient
||
this
.
formItem
.
contactClient
==
"undefined"
)
{
if
(
!
this
.
formItem
.
contactClient
||
this
.
formItem
.
contactClient
==
"undefined"
)
{
return
;
return
;
}
}
var
flag
=
false
;
var
flag
=
false
;
...
@@ -1493,7 +1413,7 @@ export default {
...
@@ -1493,7 +1413,7 @@ export default {
},
},
// 报修提交
// 报修提交
submit
()
{
submit
()
{
this
.
modal_loading
=
true
;
this
.
modal_loading
=
true
;
this
.
$Spin
.
show
();
this
.
$Spin
.
show
();
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
...
@@ -1512,7 +1432,7 @@ export default {
...
@@ -1512,7 +1432,7 @@ export default {
}
else
{
}
else
{
reservationIs
=
true
;
reservationIs
=
true
;
}
}
if
(
this
.
formItem
.
problemClass
&&
this
.
formItem
.
problemType
&&
reservationIs
===
true
)
{
if
(
this
.
formItem
.
problemClass
&&
this
.
formItem
.
problemType
&&
reservationIs
===
true
)
{
var
newarr
=
[];
var
newarr
=
[];
this
.
userlist
.
forEach
(
v
=>
{
this
.
userlist
.
forEach
(
v
=>
{
if
(
this
.
formItem
.
participatorids
.
indexOf
(
v
.
id
)
!=
-
1
)
{
if
(
this
.
formItem
.
participatorids
.
indexOf
(
v
.
id
)
!=
-
1
)
{
...
@@ -1522,7 +1442,7 @@ export default {
...
@@ -1522,7 +1442,7 @@ export default {
this
.
formItem
.
participatorids
=
this
.
formItem
.
participatorids
.
toString
();
this
.
formItem
.
participatorids
=
this
.
formItem
.
participatorids
.
toString
();
this
.
formItem
.
participators
=
newarr
.
toString
();
this
.
formItem
.
participators
=
newarr
.
toString
();
if
(
this
.
formItem
.
replacementRepair
!=
""
&&
this
.
formItem
.
replacementRepair
!=
undefined
)
{
if
(
this
.
formItem
.
replacementRepair
!=
""
&&
this
.
formItem
.
replacementRepair
!=
undefined
)
{
this
.
formItem
.
replacementRepair
=
parseInt
(
this
.
formItem
.
replacementRepair
=
parseInt
(
this
.
formItem
.
replacementRepair
this
.
formItem
.
replacementRepair
);
);
...
@@ -1553,7 +1473,7 @@ export default {
...
@@ -1553,7 +1473,7 @@ export default {
if
(
this
.
editImgList
)
{
if
(
this
.
editImgList
)
{
if
(
this
.
editImgList
.
length
>
1
)
{
if
(
this
.
editImgList
.
length
>
1
)
{
data
.
append
(
"changeProblemImgs"
,
this
.
editImgList
.
join
(
'|~|'
));
data
.
append
(
"changeProblemImgs"
,
this
.
editImgList
.
join
(
'|~|'
));
}
else
if
(
this
.
editImgList
.
length
===
1
){
}
else
if
(
this
.
editImgList
.
length
===
1
)
{
data
.
append
(
"changeProblemImgs"
,
this
.
editImgList
[
0
]);
data
.
append
(
"changeProblemImgs"
,
this
.
editImgList
[
0
]);
}
}
}
}
...
@@ -1594,11 +1514,11 @@ export default {
...
@@ -1594,11 +1514,11 @@ export default {
}
}
},
},
// 上一步
// 上一步
goBack
()
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
// 选择文件
// 选择文件
uploadImg
()
{
uploadImg
()
{
document
.
querySelector
(
"#uploadImg"
).
click
();
document
.
querySelector
(
"#uploadImg"
).
click
();
},
},
...
@@ -1607,22 +1527,22 @@ export default {
...
@@ -1607,22 +1527,22 @@ export default {
},
},
// 图片幻灯
// 图片幻灯
handleView
(
index
)
{
handleView
(
index
)
{
this
.
showImg
=
index
;
this
.
showImg
=
index
;
this
.
visible
=
true
;
this
.
visible
=
true
;
},
},
// 图片幻灯
// 图片幻灯
handleViewRemarkImg
(
index
)
{
handleViewRemarkImg
(
index
)
{
this
.
showRemarkImg
=
index
;
this
.
showRemarkImg
=
index
;
this
.
visibleRemarkImg
=
true
;
this
.
visibleRemarkImg
=
true
;
},
},
// 历史报修
// 历史报修
clientRepairList
(
e
)
{
clientRepairList
(
e
)
{
if
(
e
==
0
)
return
;
if
(
e
==
0
)
return
;
if
(
this
.
repairHistoryForm
.
clientId
==
""
||
this
.
repairHistoryForm
.
clientId
==
null
)
{
if
(
this
.
repairHistoryForm
.
clientId
==
""
||
this
.
repairHistoryForm
.
clientId
==
null
)
{
this
.
$Message
.
error
(
"请先输入手机号!"
);
this
.
$Message
.
error
(
"请先输入手机号!"
);
}
else
{
}
else
{
this
.
showRepairHistory
=
true
;
this
.
showRepairHistory
=
true
;
this
.
tableConfig
.
url
=
this
.
tableConfig
.
url
=
"/api/emaint/repairProblem/clientRepairProblemList"
;
"/api/emaint/repairProblem/clientRepairProblemList"
;
this
.
$refs
.
repairHistoryTable
.
init
();
this
.
$refs
.
repairHistoryTable
.
init
();
...
@@ -1630,7 +1550,7 @@ export default {
...
@@ -1630,7 +1550,7 @@ export default {
},
},
//是否预约单
//是否预约单
reservationChange
(
e
)
{
reservationChange
(
e
)
{
if
(
e
==
"1"
)
{
if
(
e
==
"1"
)
{
this
.
isReservation
=
true
;
this
.
isReservation
=
true
;
console
.
log
(
this
.
isReservation
);
console
.
log
(
this
.
isReservation
);
...
@@ -1641,11 +1561,11 @@ export default {
...
@@ -1641,11 +1561,11 @@ export default {
}
}
},
},
//预约时间
//预约时间
changeDate
(
e
)
{
changeDate
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
this
.
formItem
.
appointmentTime
=
e
;
this
.
formItem
.
appointmentTime
=
e
;
},
},
openChangeUserModal
()
{
openChangeUserModal
()
{
this
.
changeUserModal
=
true
;
this
.
changeUserModal
=
true
;
if
(
this
.
state
==
"待维修"
)
{
if
(
this
.
state
==
"待维修"
)
{
this
.
dispatchItem
.
userId
=
this
.
formItem
.
userId
;
this
.
dispatchItem
.
userId
=
this
.
formItem
.
userId
;
...
@@ -1654,11 +1574,11 @@ export default {
...
@@ -1654,11 +1574,11 @@ export default {
this
.
dispatchItem
.
changeDescription
=
this
.
formItem
.
changeDescription
;
this
.
dispatchItem
.
changeDescription
=
this
.
formItem
.
changeDescription
;
}
}
},
},
openCompleteModal
()
{
openCompleteModal
()
{
this
.
completeModal
=
true
;
this
.
completeModal
=
true
;
},
},
// 备注按钮
// 备注按钮
openRemarkModal
()
{
openRemarkModal
()
{
this
.
remarkModal
=
true
;
this
.
remarkModal
=
true
;
this
.
remarkForm
=
{
this
.
remarkForm
=
{
id
:
""
,
id
:
""
,
...
@@ -1669,7 +1589,7 @@ export default {
...
@@ -1669,7 +1589,7 @@ export default {
this
.
remarkForm
.
id
=
this
.
formItem
.
id
;
this
.
remarkForm
.
id
=
this
.
formItem
.
id
;
console
.
log
(
this
.
remarkForm
);
console
.
log
(
this
.
remarkForm
);
},
},
getProblemBase
(
callback
)
{
getProblemBase
(
callback
)
{
let
self
=
this
let
self
=
this
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/problem-base/treeList"
,
"/api/emaint/problem-base/treeList"
,
...
@@ -1680,17 +1600,38 @@ export default {
...
@@ -1680,17 +1600,38 @@ export default {
callback
()
callback
()
}
}
},
},
res
=>
{}
res
=>
{
}
);
);
},
},
getWorkOrder
(
id
){
getArrImgs
(
str
,
split
)
{
let
newArr
=
[]
if
(
str
.
includes
(
split
))
{
let
arr
=
str
.
split
(
split
)
arr
.
forEach
(
item
=>
{
newArr
.
push
(
item
)
});
}
else
{
newArr
.
push
(
str
)
}
return
newArr
},
getWorkOrder
(
id
)
{
let
self
=
this
let
self
=
this
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/repairProblem/view"
,
"/api/emaint/repairProblem/view"
,
qs
.
stringify
({
id
:
id
}),
qs
.
stringify
({
id
:
id
}),
res
=>
{
res
=>
{
var
data
=
res
.
responseResult
;
var
data
=
res
.
responseResult
;
let
dataSourceName
=
''
if
(
data
.
dataSource
==
'0'
)
{
dataSourceName
=
'特房集团'
}
else
if
(
data
.
dataSource
==
'1'
)
{
dataSourceName
=
'塔楼客户'
}
else
if
(
data
.
dataSource
==
'2'
)
{
dataSourceName
=
'轨道集团'
}
self
.
workOrder
=
data
self
.
workOrder
=
data
data
.
repairImgs
=
this
.
getArrImgs
(
data
.
repairImgs
,
'|~|'
)
this
.
formItem
=
{
this
.
formItem
=
{
id
:
data
.
id
,
id
:
data
.
id
,
callID
:
data
.
callID
,
callID
:
data
.
callID
,
...
@@ -1710,17 +1651,18 @@ export default {
...
@@ -1710,17 +1651,18 @@ export default {
problemClass
:
data
.
problemClass
,
problemClass
:
data
.
problemClass
,
problemType
:
data
.
problemType
,
problemType
:
data
.
problemType
,
remark
:
data
.
remark
,
remark
:
data
.
remark
,
participatorids
:
!
data
.
participatorids
?[]:
data
.
participatorids
.
split
(
","
),
participatorids
:
!
data
.
participatorids
?
[]
:
data
.
participatorids
.
split
(
","
),
userName
:
data
.
userName
,
userName
:
data
.
userName
,
userId
:
data
.
userId
,
userId
:
data
.
userId
,
problem
:
!
data
.
problem
?[]:
data
.
problem
.
split
(
','
),
problem
:
!
data
.
problem
?
[]
:
data
.
problem
.
split
(
','
),
changeDescription
:
data
.
changeDescription
,
changeDescription
:
data
.
changeDescription
,
problemImgs
:
data
.
problemImgs
,
problemImgs
:
data
.
problemImgs
,
participators
:
data
.
participators
,
participators
:
data
.
participators
,
replacementRepair
:
data
.
replacementRepair
+
''
,
replacementRepair
:
data
.
replacementRepair
+
''
,
appointmentTime
:
data
.
appointmentTime
,
appointmentTime
:
data
.
appointmentTime
,
reservations
:
data
.
reservations
?
data
.
reservations
+
''
:
'0'
,
reservations
:
data
.
reservations
?
data
.
reservations
+
''
:
'0'
,
dataSource
:
data
.
dataSource
,
dataSourceName
:
dataSourceName
,
contactClientId
:
data
.
contactClientId
,
contactClientId
:
data
.
contactClientId
,
contactName
:
data
.
contactName
,
contactName
:
data
.
contactName
,
contactPhone
:
data
.
contactPhone
,
contactPhone
:
data
.
contactPhone
,
...
@@ -1732,8 +1674,13 @@ export default {
...
@@ -1732,8 +1674,13 @@ export default {
contactSex
:
data
.
contactSex
,
contactSex
:
data
.
contactSex
,
contactTel
:
data
.
contactTel
,
contactTel
:
data
.
contactTel
,
contactUndef
:
data
.
contactUndef
,
contactUndef
:
data
.
contactUndef
,
repairLabel
:
data
.
repairLabel
,
finishRemark
:
data
.
finishRemark
,
repairEstimate
:
data
.
repairEstimate
,
estimateLabel
:
data
.
estimateLabel
,
repairImgs
:
data
.
repairImgs
};
};
this
.
getTreeList
()
// 历史报修
// 历史报修
this
.
repairHistoryForm
.
clientId
=
this
.
formItem
.
contactClientId
;
this
.
repairHistoryForm
.
clientId
=
this
.
formItem
.
contactClientId
;
...
@@ -1821,12 +1768,12 @@ export default {
...
@@ -1821,12 +1768,12 @@ export default {
let
custName
=
data
.
name
;
let
custName
=
data
.
name
;
let
contactCustName
=
data
.
contactName
;
let
contactCustName
=
data
.
contactName
;
self
.
$nextTick
(()
=>
{
self
.
$nextTick
(()
=>
{
if
(
custName
!=
null
)
{
if
(
custName
!=
null
)
{
self
.
$refs
[
"callidselect"
].
query
=
custName
self
.
$refs
[
"callidselect"
].
query
=
custName
}
}
if
(
contactCustName
!=
null
)
{
if
(
contactCustName
!=
null
)
{
self
.
$refs
[
"contactSelect"
].
query
=
contactCustName
self
.
$refs
[
"contactSelect"
].
query
=
contactCustName
}
}
var
transfer
=
document
.
getElementsByClassName
(
var
transfer
=
document
.
getElementsByClassName
(
"ivu-select-dropdown"
"ivu-select-dropdown"
)[
1
];
)[
1
];
...
@@ -1854,21 +1801,21 @@ export default {
...
@@ -1854,21 +1801,21 @@ export default {
);
);
},
},
// 进度图片
// 进度图片
showtheimg1
(
item
,
index
,
index1
)
{
showtheimg1
(
item
,
index
,
index1
)
{
this
.
showimg1
=
index1
;
this
.
showimg1
=
index1
;
this
.
visible1
=
true
;
this
.
visible1
=
true
;
this
.
progressary
=
this
.
recordEntityList
[
index
].
progress_img
;
this
.
progressary
=
this
.
recordEntityList
[
index
].
progress_img
;
},
},
changeUser
(
val
)
{
changeUser
(
val
)
{
let
self
=
this
let
self
=
this
self
.
userlist
.
map
((
item
,
index
)
=>
{
self
.
userlist
.
map
((
item
,
index
)
=>
{
if
(
index
===
val
)
{
if
(
index
===
val
)
{
self
.
dispatchItem
.
userName
=
item
.
name
self
.
dispatchItem
.
userName
=
item
.
name
self
.
dispatchItem
.
userId
=
item
.
id
self
.
dispatchItem
.
userId
=
item
.
id
}
}
})
})
},
},
complete
()
{
complete
()
{
this
.
completeModal
=
false
;
this
.
completeModal
=
false
;
this
.
modal_loading
=
true
;
this
.
modal_loading
=
true
;
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
...
@@ -1878,7 +1825,7 @@ export default {
...
@@ -1878,7 +1825,7 @@ export default {
this
.
isok
=
true
;
this
.
isok
=
true
;
let
headers
=
{
headers
:
{
"Content-Type"
:
"multipart/form-data"
}
};
//修改成文件上传的请求头
let
headers
=
{
headers
:
{
"Content-Type"
:
"multipart/form-data"
}
};
//修改成文件上传的请求头
axios
axios
.
post
(
"/api/emaint/repairProblem/complete?id="
+
this
.
formItem
.
id
,
headers
)
.
post
(
"/api/emaint/repairProblem/complete?id="
+
this
.
formItem
.
id
,
headers
)
.
then
(
.
then
(
resdata
=>
{
resdata
=>
{
if
(
resdata
.
data
.
statusCode
==
200
)
{
if
(
resdata
.
data
.
statusCode
==
200
)
{
...
@@ -1910,7 +1857,7 @@ export default {
...
@@ -1910,7 +1857,7 @@ export default {
);
);
},
},
remarkCommit
()
{
remarkCommit
()
{
console
.
log
(
this
.
remarkImgFiles
);
console
.
log
(
this
.
remarkImgFiles
);
this
.
modal_loading
=
true
;
this
.
modal_loading
=
true
;
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
...
@@ -1937,7 +1884,7 @@ export default {
...
@@ -1937,7 +1884,7 @@ export default {
title
:
"提示信息"
,
title
:
"提示信息"
,
content
:
res
.
data
.
responseResult
content
:
res
.
data
.
responseResult
});
});
// this.getinfo(); //备注提交
// this.getinfo(); //备注提交
this
.
isok
=
false
;
this
.
isok
=
false
;
this
.
$Spin
.
hide
();
this
.
$Spin
.
hide
();
},
},
...
@@ -1957,7 +1904,7 @@ export default {
...
@@ -1957,7 +1904,7 @@ export default {
},
},
// 执行人变更
// 执行人变更
changeUserSumbit
()
{
changeUserSumbit
()
{
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
return
;
return
;
...
@@ -1967,31 +1914,31 @@ export default {
...
@@ -1967,31 +1914,31 @@ export default {
// this.modal_loading=true
// this.modal_loading=true
if
(
this
.
dispatchItem
.
userId
!=
""
&&
this
.
dispatchItem
.
userId
!=
null
)
{
if
(
this
.
dispatchItem
.
userId
!=
""
&&
this
.
dispatchItem
.
userId
!=
null
)
{
// if (this.formItem.userId != this.dispatchItem.userId) {
// if (this.formItem.userId != this.dispatchItem.userId) {
var
participatorids
=
""
;
var
participatorids
=
""
;
participatorids
=
participatorids
=
this
.
dispatchItem
.
participatorids
==
null
this
.
dispatchItem
.
participatorids
==
null
?
""
?
""
:
this
.
dispatchItem
.
participatorids
.
toString
();
:
this
.
dispatchItem
.
participatorids
.
toString
();
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/repairProblem/updateUser"
,
"/api/emaint/repairProblem/updateUser"
,
qs
.
stringify
({
qs
.
stringify
({
id
:
this
.
formItem
.
id
,
id
:
this
.
formItem
.
id
,
userId
:
this
.
dispatchItem
.
userId
,
userId
:
this
.
dispatchItem
.
userId
,
participatorids
:
participatorids
,
participatorids
:
participatorids
,
changeDescription
:
this
.
dispatchItem
.
changeDescription
changeDescription
:
this
.
dispatchItem
.
changeDescription
}),
}),
res
=>
{
res
=>
{
this
.
isok
=
false
;
this
.
isok
=
false
;
this
.
$Message
.
success
(
res
.
responseResult
);
this
.
$Message
.
success
(
res
.
responseResult
);
this
.
$Spin
.
hide
();
this
.
$Spin
.
hide
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$router
.
push
({
name
:
"order_list"
});
this
.
$router
.
push
({
name
:
"order_list"
});
},
1000
);
},
1000
);
},
},
res
=>
{
res
=>
{
this
.
$Spin
.
hide
();
this
.
$Spin
.
hide
();
}
}
);
);
// } else {
// } else {
// this.isok = false;
// this.isok = false;
// this.$Message.error("请变更执行人");
// this.$Message.error("请变更执行人");
...
@@ -2002,21 +1949,21 @@ export default {
...
@@ -2002,21 +1949,21 @@ export default {
this
.
$Spin
.
hide
();
this
.
$Spin
.
hide
();
}
}
},
},
handleAddCust
()
{
handleAddCust
()
{
this
.
$refs
.
addCustRef
.
resetFields
();
this
.
$refs
.
addCustRef
.
resetFields
();
this
.
addCustModal
=
true
;
this
.
addCustModal
=
true
;
let
query
=
this
.
$refs
[
"callidselect"
].
query
let
query
=
this
.
$refs
[
"callidselect"
].
query
if
(
validateMobile
(
query
))
{
if
(
validateMobile
(
query
))
{
this
.
addCustForm
.
phone
=
query
;
this
.
addCustForm
.
phone
=
query
;
}
else
if
(
validateNumber
(
query
)
&&
query
&&
query
.
length
===
4
)
{
}
else
if
(
validateNumber
(
query
)
&&
query
&&
query
.
length
===
4
)
{
this
.
addCustForm
.
undef
=
query
;
this
.
addCustForm
.
undef
=
query
;
}
else
if
(
validateNumber
(
query
)
&&
query
)
{
}
else
if
(
validateNumber
(
query
)
&&
query
)
{
this
.
addCustForm
.
tel
=
query
;
this
.
addCustForm
.
tel
=
query
;
}
}
this
.
getCompany
()
this
.
getCompany
()
},
},
getCompany
()
{
getCompany
()
{
let
self
=
this
let
self
=
this
self
.
$refs
.
companySelect
.
clearSingleSelect
()
self
.
$refs
.
companySelect
.
clearSingleSelect
()
this
.
$request
.
post
(
this
.
$request
.
post
(
...
@@ -2029,14 +1976,14 @@ export default {
...
@@ -2029,14 +1976,14 @@ export default {
}
}
)
)
},
},
getDept
(
val
)
{
getDept
(
val
)
{
if
(
!
val
)
return
;
if
(
!
val
)
return
;
this
.
deptList
=
[]
this
.
deptList
=
[]
let
self
=
this
let
self
=
this
self
.
$refs
.
deptSelect
.
clearSingleSelect
()
self
.
$refs
.
deptSelect
.
clearSingleSelect
()
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/group/dept"
,
"/api/emaint/group/dept"
,
qs
.
stringify
({
parentCode
:
val
}),
qs
.
stringify
({
parentCode
:
val
}),
res
=>
{
res
=>
{
self
.
addCustForm
.
deptName
=
''
self
.
addCustForm
.
deptName
=
''
self
.
deptList
=
res
.
responseResult
;
self
.
deptList
=
res
.
responseResult
;
...
@@ -2045,7 +1992,7 @@ export default {
...
@@ -2045,7 +1992,7 @@ export default {
}
}
)
)
},
},
addCustSumbit
()
{
addCustSumbit
()
{
let
self
=
this
let
self
=
this
this
.
$refs
.
addCustRef
.
validate
((
valid
)
=>
{
this
.
$refs
.
addCustRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -2077,22 +2024,24 @@ export default {
...
@@ -2077,22 +2024,24 @@ export default {
}
}
}
}
},
},
watch
:{
watch
:
{
callIDOptions
(
val
)
{
callIDOptions
(
val
)
{
if
(
!
val
||
val
.
length
<=
0
)
{
if
(
!
val
||
val
.
length
<=
0
)
{
}
}
}
}
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.ivu-card-extra
{
.ivu-card-extra
{
left
:
50px
!important
;
left
:
50px
!important
;
}
}
#username_form
.ivu-form-item-content
{
#username_form
.ivu-form-item-content
{
text-align
:
left
!important
;
text-align
:
left
!important
;
}
}
.demo-upload-list
{
.demo-upload-list
{
display
:
inline-block
;
display
:
inline-block
;
width
:
60px
;
width
:
60px
;
...
@@ -2174,7 +2123,7 @@ p.addbutton {
...
@@ -2174,7 +2123,7 @@ p.addbutton {
padding-left
:
1px
;
padding-left
:
1px
;
}
}
p
.addbutton
>
button
{
p
.addbutton
>
button
{
padding
:
10px
20px
;
padding
:
10px
20px
;
border
:
none
;
border
:
none
;
}
}
...
@@ -2187,31 +2136,59 @@ p.addbutton > button {
...
@@ -2187,31 +2136,59 @@ p.addbutton > button {
div
.ivu-form-item
{
div
.ivu-form-item
{
margin-bottom
:
20px
!important
;
margin-bottom
:
20px
!important
;
}
}
.ivu-card-body
{
.ivu-card-body
{
padding
:
2px
;
padding
:
2px
;
}
}
</
style
>
</
style
>
<
style
>
<
style
>
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-content
{
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-content
{
margin-left
:
10px
!important
;
margin-left
:
10px
!important
;
}
}
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-error-tip
{
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-error-tip
{
left
:
25px
;
left
:
25px
;
}
}
.workOrderManage
.search-card
.search-body
.ivu-select-dropdown-list
{
.workOrderManage
.search-card
.search-body
.ivu-select-dropdown-list
{
text-align
:
left
;
text-align
:
left
;
}
}
.location
{
.location
{
margin
:
0
;
margin
:
0
;
line-height
:
normal
;
line-height
:
normal
;
padding
:
7px
16px
;
padding
:
7px
16px
;
clear
:
both
;
clear
:
both
;
color
:
#515a6e
;
color
:
#515a6e
;
font-size
:
12px
!important
;
font-size
:
12px
!important
;
white-space
:
nowrap
;
white-space
:
nowrap
;
list-style
:
none
;
list-style
:
none
;
cursor
:
pointer
;
cursor
:
pointer
;
transition
:
background
.2s
ease-in-out
;
transition
:
background
.2s
ease-in-out
;
}
}
.solveTabs
{
border
:
1px
solid
#57a3f3
;
color
:
#57a3f3
;
border-radius
:
3px
;
padding
:
3px
8px
;
margin-bottom
:
5px
;
}
.solveTabs
+
.solveTabs
{
margin-left
:
5px
;
}
.verificationImgList
{
margin-top
:
10px
;
}
.verificationImgList
.verificationImg
{
cursor
:
pointer
;
width
:
120px
;
height
:
120px
;
border
:
1px
solid
#ccc
;
border-radius
:
2px
;
margin-right
:
5px
;
}
</
style
>
</
style
>
src/views/workOrderManage/index.vue
View file @
9a4daf48
...
@@ -2,420 +2,341 @@
...
@@ -2,420 +2,341 @@
<div>
<div>
<Card>
<Card>
<div
slot=
"title"
>
<div
slot=
"title"
>
<!--工具栏-->
<!--工具栏-->
<Button
slot=
"extra"
type=
"primary"
:loading=
"modal_loading"
@
click=
"repairS
ubmit"
>
<Button
slot=
"extra"
type=
"primary"
:loading=
"modal_loading"
@
click=
"s
ubmit"
>
提交
提交
</Button>
</Button>
<Button
slot=
"extra"
style=
"margin-left: 10px"
@
click=
"goBack"
>
<Button
slot=
"extra"
style=
"margin-left: 10px"
@
click=
"goBack"
>
返回
返回
</Button>
</Button>
</div>
</div>
<!-- 编辑工单 -->
<!-- 编辑工单 -->
<Row
:gutter=
"20"
>
<Row
:gutter=
"20"
>
<Col
span=
"10"
>
<Col
span=
"10"
>
<Card
>
<Card
>
<p
slot=
"title"
>
工单信息:
<span></span></p>
<p
slot=
"title"
>
工单信息:
<span></span></p>
<Form
ref=
"kfxx"
:model=
"formItem"
:label-width=
"120"
:rules=
"ruleValidate"
>
<Form
ref=
"kfxx"
:model=
"formItem"
:label-width=
"120"
:rules=
"ruleValidate"
>
<Row
type=
"flex"
justify=
"start"
>
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"报修人"
prop=
"callID"
>
<FormItem
label=
"报修人"
prop=
"callID"
>
<Select
<Select
v-model=
"formItem.callID"
filterable
ref=
"callidselect"
remote
:remote-method=
"custSearch"
v-model=
"formItem.callID"
icon=
"search"
:blur=
"callIDblur"
@
on-change=
"custChange"
:maxlength=
"20"
filterable
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
>
ref=
"callidselect"
<Option
v-for=
"(option, index) in callIDOptions"
:value=
"option.name"
:key=
"index"
remote
:label=
"option.label"
>
{{
option
.
name
}}
</Option>
:remote-method=
"custSearch"
</Select>
icon=
"search"
</FormItem>
:blur=
"callIDblur"
</Col>
@
on-change=
"custChange"
<Col
span=
"4"
>
:maxlength=
"20"
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
></Button></div>
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
</Col>
>
</Row>
<Option
v-for=
"(option, index) in callIDOptions"
:value=
"option.name"
:key=
"index"
:label=
"option.label"
>
{{
option
.
name
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"4"
>
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
></Button></div>
</Col>
</Row>
<Row>
<Row>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"代报修"
style=
"width: 100%;text-align: left;"
>
<FormItem
label=
"代报修"
style=
"width: 100%;text-align: left;"
>
<RadioGroup
v-model=
"formItem.replacementRepair"
>
<RadioGroup
v-model=
"formItem.replacementRepair"
>
<Radio
label=
"1"
>
<Radio
label=
"1"
>
<span>
是
</span>
<span>
是
</span>
</Radio>
</Radio>
<Radio
label=
"0"
>
<Radio
label=
"0"
>
<span>
否
</span>
<span>
否
</span>
</Radio>
</Radio>
</RadioGroup>
</RadioGroup>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<!-- 联系人姓名 -->
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"20"
>
<FormItem
label=
"联系人"
prop=
"contactName"
>
<Input
type=
"text"
v-model=
"formItem.contactName"
:disabled=
"formItem.replacementRepair === '1' ? false : true"
v-show=
"formItem.replacementRepair !== '1'"
></Input>
<Select
v-model=
"formItem.contactClient"
filterable
ref=
"contactSelect"
remote
:remote-method=
"contactCustSearch"
icon=
"search"
@
on-change=
"contactCustChange"
:maxlength=
"20"
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
:disabled=
"formItem.replacementRepair === '1' ? false : true"
v-show=
"formItem.replacementRepair === '1'"
>
<Option
v-for=
"(option, index) in contactOptions"
:value=
"option.name"
:key=
"index"
:label=
"option.label"
>
{{
option
.
name
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"4"
>
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
v-show=
"formItem.replacementRepair === '1'"
></Button></div>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"工单来源"
prop=
"dataSource"
>
<RadioGroup
v-model=
"formItem.dataSource"
@
on-change=
"changDataSource"
>
<Radio
:label=
"item.dataSource"
v-for=
"item in organization"
:key=
"item.dataSource"
>
{{
item
.
label
}}
</Radio>
</RadioGroup>
</FormItem>
</Col>
</Row>
<!-- 联系人号码 -->
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"20"
>
<FormItem
label=
"联系电话"
prop=
"contactNumber"
>
<Input
type=
"text"
v-model=
"formItem.contactNumber"
></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"20"
>
<FormItem
label=
"位置"
prop=
"officeLocation"
>
<AutoComplete
v-model=
"formItem.officeLocation"
placeholder=
"请输入位置"
@
on-search=
"handleSearch1"
>
<option
@
click=
"locationChange(item)"
:value=
"item"
v-for=
"item in officeLocations"
:key=
"item"
>
{{
item
}}
</option>
</AutoComplete>
<!-- 联系人姓名 -->
</FormItem>
<Row
type=
"flex"
justify=
"start"
>
</Col>
<Col
span=
"20"
>
</Row>
<FormItem
label=
"联系人"
prop=
"contactName"
>
<Input
type=
"text"
v-model=
"formItem.contactName"
:disabled=
"formItem.replacementRepair==='1'?false:true"
v-show=
"formItem.replacementRepair!=='1'"
></Input>
<Select
v-model=
"formItem.contactClient"
filterable
ref=
"contactSelect"
remote
:remote-method=
"contactCustSearch"
icon=
"search"
@
on-change=
"contactCustChange"
:maxlength=
"20"
placeholder=
"客户姓名 / 手机号 / 座机 / 内线号码 "
:disabled=
"formItem.replacementRepair==='1'?false:true"
v-show=
"formItem.replacementRepair==='1'"
>
<Option
v-for=
"(option, index) in contactOptions"
:value=
"option.name"
:key=
"index"
:label=
"option.label"
>
{{
option
.
name
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
span=
"4"
>
<div
style=
"margin-top: 1px"
><Button
icon=
"plus-round"
@
click=
"handleAddCust"
v-show=
"formItem.replacementRepair==='1'"
></Button></div>
</Col>
</Row>
<!-- 联系人号码 -->
<Row>
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"20"
>
<Col
span=
"20"
>
<FormItem
label=
"优先级"
>
<FormItem
label=
"联系电话"
prop=
"contactNumber"
>
<Select
v-model=
"formItem.priority"
style=
"text-align: left"
placeholder=
"请选择优先级"
>
<Input
type=
"text"
v-model=
"formItem.contactNumber"
></Input>
<Option
v-for=
"(item, index) in priority"
:value=
"item.value"
:key=
"index"
style=
"text-align: left;"
>
</FormItem>
{{
item
.
name
}}
</Option>
</Col>
</Select>
</Row>
</FormItem>
</Col>
</Row>
<Row
type=
"flex"
justify=
"start"
>
<Col
span=
"12"
>
<FormItem
label=
"预约单"
prop=
"reservations"
style=
"width: 100%;text-align: left;"
>
<RadioGroup
v-model=
"formItem.reservations"
@
on-change=
"reservationChange"
>
<Radio
label=
"1"
><span>
是
</span></Radio>
<Radio
label=
"0"
><span>
否
</span></Radio>
</RadioGroup>
</FormItem>
</Col>
</Row>
<Row
v-show=
"isReservation"
>
<Col
span=
"12"
style=
"margin-right:10px;"
>
<FormItem
label=
"预约时间"
prop=
"appointmentTime"
style=
"width: 100%;text-align: left;"
>
<DatePicker
type=
"datetime"
@
on-change=
"changeDate"
v-model=
"formItem.appointmentTime"
placeholder=
"选择预约时间"
style=
"width: 180px"
></DatePicker>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"报修类型"
prop=
"problemClass"
>
<Select
v-model=
"formItem.problemClass"
@
on-change=
"findchildren"
style=
"text-align: left"
>
<Option
v-for=
"item in parentList"
:value=
"item.parentProblem"
:key=
"item.parentId"
style=
"text-align: left;"
>
{{
item
.
parentProblem
}}
</Option>
</Select>
</FormItem>
</Col>
<Row>
<Col
span=
"7"
>
<Col
span=
"20"
>
<FormItem
:label-width=
"5"
>
<FormItem
label=
"位置"
prop=
"officeLocation"
>
<Select
v-model=
"formItem.problemType"
@
on-change=
"((val) =>
{ findchildren2(val) })"
<AutoComplete
style="text-align: left">
v-model=
"formItem.officeLocation"
<Option
v-for=
"item in sublevelList"
:value=
"item.problem"
:key=
"item.id"
style=
"text-align: left;"
>
placeholder=
"请输入位置"
{{
@
on-search=
"handleSearch1"
item
.
problem
>
}}
</Option>
<option
</Select>
@
click=
"locationChange(item)"
</FormItem>
:value=
"item"
</Col>
v-for=
"item in officeLocations"
</Row>
:key=
"item"
<Row>
>
{{
item
}}
</option>
<Col
span=
"24"
>
</AutoComplete>
<FormItem
label=
"问题项"
style=
"text-align:left"
>
<CheckboxGroup
v-model=
"formItem.problem"
@
on-change=
"checkProblem"
>
</FormItem>
<Checkbox
:key=
"index"
:label=
"item.problem"
v-for=
"(item, index) in questionList"
>
</Col>
<span>
{{
item
.
problem
}}
</span>
</Row>
</Checkbox>
<Checkbox
key=
"other"
label=
"其他"
><span>
其他
</span></Checkbox>
<Row>
</CheckboxGroup>
<Col
span=
"20"
>
</FormItem>
<FormItem
label=
"优先级"
>
</Col>
<Select
</Row>
v-model=
"formItem.priority"
<Row
v-show=
"isOtherProblem"
>
style=
"text-align: left"
<Col
span=
"20"
>
placeholder=
"请选择优先级"
<FormItem
label=
"其他问题项"
prop=
"otherProblem"
>
>
<Input
type=
"text"
v-model=
"formItem.otherProblem"
placeholder=
"请简短描述"
></Input>
<Option
</FormItem>
v-for=
"(item,index) in priority"
</Col>
:value=
"item.value"
</Row>
:key=
"index"
<Row
style=
"margin-bottom:30px;"
>
style=
"text-align: left;"
<Col
span=
"24"
>
>
{{
item
.
name
}}
</Option>
<FormItem
label=
"图片描述"
>
</Select>
<Modal
title=
"图片查看"
v-model=
"visible"
:closable=
"true"
:mask-closable=
"false"
>
</FormItem>
<img
:src=
"imgList[showimg]"
v-if=
"visible"
style=
"width: 100%"
/>
</Col>
</Modal>
</Row>
<div
class=
"addimg demo-upload-list"
:style=
"
{ 'left': (index) * 63 + 'px' }"
<Row
type=
"flex"
justify=
"start"
>
v-for="(item, index) in imgList" :key="index">
<Col
span=
"12"
>
<img
:src=
"item"
alt
v-if=
"item != ''"
<FormItem
:style=
"
{ 'pointer-events': viewForm.id != '' ? 'none' : 'all' }" />
label=
"预约单"
<div
class=
"demo-upload-list-cover"
v-if=
"item != ''"
>
prop=
"reservation_type"
<Icon
type=
"ios-eye-outline"
@
click
.
native=
"handleView(index)"
style=
"font-size: 20px;"
></Icon>
style=
"width: 100%;text-align: left;"
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleRemove(index)"
style=
"font-size: 20px;"
></Icon>
>
</div>
<RadioGroup
v-model=
"formItem.reservations"
@
on-change=
"reservationChange"
>
</div>
<Radio
label=
"1"
><span>
是
</span></Radio>
<div
class=
"addimg demo-upload-list"
:style=
"
{ 'left': imgList.length * 63 + 'px' }">
<Radio
label=
"0"
><span>
否
</span></Radio>
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
@
click=
"uploadfile()"
></i>
</RadioGroup>
</div>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
<input
type=
"file"
name
id=
"upfile"
style=
"display:none;"
@
change=
"changefile"
/>
<Row
v-show=
"isReservation"
>
</Row>
<Col
span=
"12"
style=
"margin-right:10px;"
>
<FormItem
label=
"预约时间"
prop=
"appointmentTime"
style=
"width: 100%;text-align: left;"
>
<DatePicker
type=
"datetime"
@
on-change=
"changeDate"
v-model=
"formItem.appointmentTime"
placeholder=
"选择预约时间"
style=
"width: 180px"
></DatePicker>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"报修类型"
prop=
"one_type"
>
<Select
v-model=
"formItem.problemClass"
:disabled=
"viewForm.id!=''?true:false"
@
on-change=
"findchildren"
style=
"text-align: left"
>
<Option
v-for=
"(item,index) in treeList"
:value=
"item.parentProblem"
:key=
"index"
style=
"text-align: left;"
>
{{
item
.
parentProblem
}}
</Option>
<!--
<Option
value=
""
>
硬件问题
</Option>
<Option
value=
"-1"
>
软件问题
</Option>
-->
</Select>
</FormItem>
</Col>
<Col
span=
"7"
>
<FormItem
:label-width=
"5"
>
<Select
v-model=
"formItem.problemType"
:disabled=
"viewForm.id!=''?true:false"
@
on-change=
"findchildren2"
style=
"text-align: left"
>
<Option
v-for=
"(item,i) in childList"
:value=
"item.problem"
:key=
"i"
style=
"text-align: left;"
>
{{
item
.
problem
}}
</Option>
</Select>
</FormItem>
</Col>
</Row>
<Row>
<Col
span=
"24"
>
<FormItem
label=
"问题项"
style=
"text-align:left"
>
<CheckboxGroup
v-model=
"formItem.problem"
@
on-change=
"checkProblem"
>
<Checkbox
:key=
"index"
:label=
"item.problem"
v-for=
"(item,index) in questionList"
><span>
{{
item
.
problem
}}
</span></Checkbox>
<Checkbox
key=
"other"
label=
"其他"
><span>
其他
</span></Checkbox>
</CheckboxGroup>
</FormItem>
</Col>
</Row>
<Row
v-show=
"isOtherProblem"
>
<Col
span=
"20"
>
<FormItem
label=
"其他问题项"
prop=
"otherProblem"
>
<Input
type=
"text"
v-model=
"formItem.otherProblem"
placeholder=
"请简短描述"
></Input>
</FormItem>
</Col>
</Row>
<Row
style=
"margin-bottom:30px;"
>
<Col
span=
"24"
>
<FormItem
label=
"图片描述"
>
<Modal
title=
"图片查看"
v-model=
"visible"
:closable=
"true"
:mask-closable=
"false"
>
<img
:src=
"imgList[showimg]"
v-if=
"visible"
style=
"width: 100%"
/>
</Modal>
<div
class=
"addimg demo-upload-list"
:style=
"
{'left':(index)*63+'px'}"
v-for="(item,index) in imgList"
:key="index"
>
<img
:src=
"item"
alt
v-if=
"item!=''"
:style=
"
{'pointer-events':viewForm.id!=''?'none':'all'}"
/>
<div
class=
"demo-upload-list-cover"
v-if=
"item!=''"
>
<Icon
type=
"ios-eye-outline"
@
click
.
native=
"handleView(index)"
style=
"font-size: 20px;"
></Icon>
<Icon
type=
"ios-trash-outline"
@
click
.
native=
"handleRemove(index)"
style=
"font-size: 20px;"
></Icon>
</div>
</div>
<div
class=
"addimg demo-upload-list"
:style=
"
{'left':imgList.length*63+'px'}">
<i
class=
"ivu-icon ivu-icon-ios-plus-empty"
@
click=
"uploadfile()"
></i>
</div>
</FormItem>
</Col>
<input
type=
"file"
name
id=
"upfile"
style=
"display:none;"
@
change=
"changefile"
/>
</Row>
<Row>
<Row>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
label=
"备注"
>
<FormItem
label=
"备注"
>
<Input
<Input
type=
"textarea"
:rows=
"3"
:disabled=
"viewForm.id != '' ? true : false"
v-model=
"formItem.remark"
type=
"textarea"
placeholder=
"300字以内"
></Input>
:rows=
"3"
</FormItem>
:disabled=
"viewForm.id!=''?true:false"
</Col>
v-model=
"formItem.remark"
</Row>
placeholder=
"300字以内"
<Row
type=
"flex"
style=
"margin-top:20px;margin-bottom:20px"
justify=
"start"
>
></Input>
<Col
span=
"18"
>
</FormItem>
<FormItem
label=
"执行人"
>
</Col>
<Select
v-model=
"formItem.userName"
filterable
clearable
@
on-change=
"changeUser"
placeholder=
"请选择执行人"
>
</Row>
<Option
v-for=
"(item, index) in userList"
:label=
"item.name"
:value=
"item.id"
:key=
"index"
>
<Row
type=
"flex"
style=
"margin-top:20px;margin-bottom:20px"
justify=
"start"
>
<!--
{{
item
.
name
}}
-->
<Col
span=
"18"
>
<span
<FormItem
label=
"执行人"
>
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{
<Select
item
.
name
v-model=
"formItem.userName"
}}
</span>
filterable
<span>
{{
item
.
problemNum
==
null
?
0
:
item
.
problemNum
}}
单
</span>
clearable
</Option>
@
on-change=
"changeUser"
</Select>
placeholder=
"请选择执行人"
</FormItem>
>
</Col>
<Option
</Row>
v-for=
"(item, index) in userList"
<Row>
:label=
"item.name"
<Col
span=
"18"
>
:value=
"item.id"
<!--表单验证 prop='participatorids' -->
:key=
"index"
<FormItem
label=
"参与者"
>
>
<Select
v-model=
"formItem.participatorids"
multiple
style=
"width:100%;text-align: left;"
<!--
{{
item
.
name
}}
-->
placeholder=
"请选择参与者"
>
<span
<Option
:value=
"item.id"
:label=
"item.name"
v-for=
"(item, index) in userList"
:key=
"index"
>
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
<span
>
{{
item
.
name
}}
</span>
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{
<span>
{{
item
.
problemNum
==
null
?
0
:
item
.
problemNum
}}
单
</span>
item
.
name
</Option>
}}
</span>
</Select>
<span>
{{
item
.
problemNum
==
null
?
0
:
item
.
problemNum
}}
单
</span>
</FormItem>
</Option>
</Col>
</Select>
</Row>
</FormItem>
<Row>
</Col>
<Col
span=
"18"
>
</Row>
<!--表单验证 prop='participatorids' -->
</Form>
<FormItem
label=
"参与者"
>
</Card>
<Select
v-model=
"formItem.participatorids"
multiple
style=
"width:100%;text-align: left;"
placeholder=
"请选择参与者"
>
<Option
:value=
"item.id"
:label=
"item.name"
v-for=
"(item,index) in userList"
:key=
"index"
>
<span
style=
"float: left;max-width: 120px;min-width: 120px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{
item
.
name
}}
</span>
<span>
{{
item
.
problemNum
==
null
?
0
:
item
.
problemNum
}}
单
</span>
</Option>
</Select>
</FormItem>
</Col>
</Row>
</Form>
</Card>
</Col>
</Col>
<Col
span=
"14"
>
<Col
span=
"14"
>
<Tabs
type =
'card'
@
on-click=
"clientRepairList"
>
<Tabs
type=
'card'
@
on-click=
"clientRepairList"
>
<TabPane
label=
"报修详情"
>
<TabPane
label=
"报修详情"
>
<Collapse
v-model=
"openPanel"
>
<Collapse
v-model=
"openPanel"
>
<Panel>
<Panel>
报修人
报修人
<div
slot=
"content"
>
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
name
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label>
</Col>
<div
style=
"display: inline-block"
>
{{
formItem
.
name
}}
</div>
<Col
span=
"8"
style=
"padding: 16px"
>
</div>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
jobTitle
}}
</div></div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
</Row>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<div
style=
"display: inline-block"
>
{{
formItem
.
jobTitle
}}
</div>
<Col
span=
"8"
style=
"padding: 16px"
>
</div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
companyName
}}
</div></div>
</Col>
</Col>
</Row>
<Col
span=
"8"
style=
"padding: 16px"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
deptName
}}
</div></div>
<Col
span=
"8"
style=
"padding: 16px"
>
</Col>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label>
<Col
span=
"8"
style=
"padding: 16px"
>
<div
style=
"display: inline-block"
>
{{
formItem
.
companyName
}}
</div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
phone
}}
</div></div>
</div>
</Col>
</Col>
</Row>
<Col
span=
"8"
style=
"padding: 16px"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label>
<Col
span=
"8"
style=
"padding: 16px"
>
<div
style=
"display: inline-block"
>
{{
formItem
.
deptName
}}
</div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
undef
}}
</div></div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
tel
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label>
</Col>
<div
style=
"display: inline-block"
>
{{
formItem
.
phone
}}
</div>
<Col
span=
"8"
style=
"padding: 16px"
>
</div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
sex
}}
</div></div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
undef
}}
</div>
</div>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
tel
}}
</div>
</div>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
sex
}}
</div>
</div>
</Col>
</Row>
</div>
</div>
</Panel>
</Panel>
<Panel
v-show=
"formItem.replacementRepair==
'1'"
>
<Panel
v-show=
"formItem.replacementRepair ==
'1'"
>
联系人
联系人
<div
slot=
"content"
>
<div
slot=
"content"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
姓名:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactJobTitle
}}
</div></div>
<div
style=
"color: red"
><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
职务:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactJobTitle
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactCompanyName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
公司:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactCompanyName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactDeptName
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
部门:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactDeptName
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactPhone
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
手机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactPhone
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Row
:gutter=
"10"
style=
"margin-left:5px;color: black;"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactUndef
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
内线:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactUndef
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactTel
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
座机:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactTel
}}
</div>
</div>
</Col>
</Col>
<Col
span=
"8"
style=
"padding: 16px"
>
<Col
span=
"8"
style=
"padding: 16px"
>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label><div
style=
"display: inline-block"
>
{{
formItem
.
contactSex
}}
</div></div>
<div><label
style=
"text-align: right;padding: 10px 12px 10px 0;"
>
性别:
</label>
<div
style=
"display: inline-block"
>
{{
formItem
.
contactSex
}}
</div>
</div>
</Col>
</Col>
</Row>
</Row>
</div>
</div>
...
@@ -427,160 +348,82 @@
...
@@ -427,160 +348,82 @@
<m-table
:config=
"tableConfig"
:searchParams=
"repairHistoryForm"
ref=
"table"
:isFirst=
"isFirst"
></m-table>
<m-table
:config=
"tableConfig"
:searchParams=
"repairHistoryForm"
ref=
"table"
:isFirst=
"isFirst"
></m-table>
</div>
</div>
</TabPane>
</TabPane>
</Tabs>
</Tabs>
</Col>
</Col>
</Row>
</Row>
</Card>
</Card>
<!-- 客户新增 -->
<!-- 客户新增 -->
<Modal
<Modal
v-model=
"addCustModal"
title=
"客户新增"
@
on-ok=
"addCustSumbit"
:loading=
"addCustLoading"
>
v-model=
"addCustModal"
<Form
ref=
"addCustRef"
:model=
"addCustForm"
:label-width=
"100"
:rules=
"addCustRule"
>
title=
"客户新增"
@
on-ok=
"addCustSumbit"
:loading=
"addCustLoading"
>
<Form
ref=
"addCustRef"
:model=
"addCustForm"
:label-width=
"100"
:rules=
"addCustRule"
>
<Row>
<Row>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"公司"
prop=
"companyCode"
>
label=
"公司"
<Select
v-model=
"addCustForm.companyCode"
style=
"text-align: left"
ref=
"companySelect"
filterable
prop=
"companyCode"
@
on-change=
"getDept"
clearable
>
>
<Option
v-for=
"item in companyList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{
<Select
item
.
groupName
v-model=
"addCustForm.companyCode"
}}
</Option>
style=
"text-align: left"
<!--
<Option
value=
""
>
硬件问题
</Option>
ref=
"companySelect"
filterable
@
on-change=
"getDept"
clearable
>
<Option
v-for=
"item in companyList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{
item
.
groupName
}}
</Option>
<!--
<Option
value=
""
>
硬件问题
</Option>
<Option
value=
"-1"
>
软件问题
</Option>
-->
<Option
value=
"-1"
>
软件问题
</Option>
-->
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"部门"
prop=
"deptCode"
>
label=
"部门"
<Select
v-model=
"addCustForm.deptCode"
style=
"text-align: left"
ref=
"deptSelect"
filterable
clearable
>
prop=
"deptCode"
<Option
v-for=
"item in deptList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{
>
item
.
groupName
<Select
}}
</Option>
v-model=
"addCustForm.deptCode"
<!--
<Option
value=
""
>
硬件问题
</Option>
style=
"text-align: left"
ref=
"deptSelect"
filterable
clearable
>
<Option
v-for=
"item in deptList"
:value=
"item.groupNo"
:key=
"item.groupNo"
style=
"text-align: left;"
>
{{
item
.
groupName
}}
</Option>
<!--
<Option
value=
""
>
硬件问题
</Option>
<Option
value=
"-1"
>
软件问题
</Option>
-->
<Option
value=
"-1"
>
软件问题
</Option>
-->
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"姓名"
prop=
"name"
>
label=
"姓名"
<Input
v-model=
"addCustForm.name"
:maxlength=
"20"
placeholder=
"请输入姓名"
></Input>
prop=
"name"
</FormItem>
>
<Input
v-model=
"addCustForm.name"
:maxlength=
"20"
placeholder=
"请输入姓名"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"优先级"
prop=
"priority"
>
label=
"优先级"
<Select
v-model=
"addCustForm.priority"
placeholder=
"请选择优先级"
>
prop=
"priority"
<Option
v-for=
"(item, index) in priority"
:value=
"item.value"
:key=
"index"
>
{{
item
.
name
}}
</Option>
>
<!--
<Option
value=
"待派单"
>
高
</Option>
<Select
v-model=
"addCustForm.priority"
placeholder=
"请选择优先级"
>
<Option
v-for=
"(item,index) in priority"
:value=
"item.value"
:key=
"index"
>
{{
item
.
name
}}
</Option>
<!--
<Option
value=
"待派单"
>
高
</Option>
<Option
value=
"待维修"
>
很高
</Option>
-->
<Option
value=
"待维修"
>
很高
</Option>
-->
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"手机号"
prop=
"phone"
>
label=
"手机号"
<Input
v-model=
"addCustForm.phone"
:maxlength=
"20"
placeholder=
"请输入手机号"
></Input>
prop=
"phone"
</FormItem>
>
<Input
v-model=
"addCustForm.phone"
:maxlength=
"20"
placeholder=
"请输入手机号"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"座机"
prop=
"tel"
>
label=
"座机"
<Input
v-model=
"addCustForm.tel"
:maxlength=
"12"
placeholder=
"请输入座机号码"
></Input>
prop=
"tel"
</FormItem>
>
<Input
v-model=
"addCustForm.tel"
:maxlength=
"12"
placeholder=
"请输入座机号码"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
<FormItem
label=
"内线号码"
prop=
"undef"
>
label=
"内线号码"
<Input
v-model=
"addCustForm.undef"
:maxlength=
"12"
placeholder=
"请输入内线号码"
></Input>
prop=
"undef"
</FormItem>
>
<Input
v-model=
"addCustForm.undef"
:maxlength=
"12"
placeholder=
"请输入内线号码"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
label=
"位置"
>
<FormItem
label=
"位置"
>
<Input
<Input
v-model=
"addCustForm.officeLocation"
:maxlength=
"30"
placeholder=
"请输入位置"
></Input>
v-model=
"addCustForm.officeLocation"
</FormItem>
:maxlength=
"30"
placeholder=
"请输入位置"
></Input>
</FormItem>
</Col>
</Col>
<Col
span=
"16"
>
<Col
span=
"16"
>
<FormItem
label=
"性别"
>
<FormItem
label=
"性别"
>
<RadioGroup
<RadioGroup
v-model=
"addCustForm.sex"
>
v-model=
"addCustForm.sex"
<Radio
label=
"男"
>
>
<span>
男
</span>
<Radio
label=
"男"
>
</Radio>
<span>
男
</span>
<Radio
label=
"女"
>
</Radio>
<span>
女
</span>
<Radio
label=
"女"
>
</Radio>
<span>
女
</span>
</RadioGroup>
</Radio>
</FormItem>
</RadioGroup>
</FormItem>
</Col>
</Col>
</Row>
</Row>
</Form>
</Form>
...
@@ -596,7 +439,7 @@ import { validateMobile, validateNumber } from "@/assets/js/validate";
...
@@ -596,7 +439,7 @@ import { validateMobile, validateNumber } from "@/assets/js/validate";
import
{
initCustSearchOption
,
getCustOrgInfo
,
getCustSex
,
getCustContactNumber
}
from
"@/utils/workOrder"
import
{
initCustSearchOption
,
getCustOrgInfo
,
getCustSex
,
getCustContactNumber
}
from
"@/utils/workOrder"
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isOtherProblem
:
false
,
isOtherProblem
:
false
,
companyList
:
[],
companyList
:
[],
...
@@ -618,8 +461,8 @@ export default {
...
@@ -618,8 +461,8 @@ export default {
{
{
message
:
"请输入正确的手机号"
,
message
:
"请输入正确的手机号"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
var
reg
=
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
;
var
reg
=
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
;
if
(
!
value
)
{
if
(
!
value
)
{
return
value
;
return
value
;
}
else
if
(
!
reg
.
test
(
value
))
{
}
else
if
(
!
reg
.
test
(
value
))
{
...
@@ -634,7 +477,7 @@ export default {
...
@@ -634,7 +477,7 @@ export default {
{
{
message
:
"请输入正确的座机号码"
,
message
:
"请输入正确的座机号码"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
if
(
!
value
)
return
''
;
if
(
!
value
)
return
''
;
var
reg
=
/
[
0-9
\-]
/
;
var
reg
=
/
[
0-9
\-]
/
;
// var reg=/0\d{2,3}\-\d{7,8}/
// var reg=/0\d{2,3}\-\d{7,8}/
...
@@ -650,7 +493,7 @@ export default {
...
@@ -650,7 +493,7 @@ export default {
{
{
message
:
"请输入正确的内线号码"
,
message
:
"请输入正确的内线号码"
,
trigger
:
"blur"
,
trigger
:
"blur"
,
transform
(
value
)
{
transform
(
value
)
{
if
(
!
value
)
return
''
;
if
(
!
value
)
return
''
;
var
reg
=
/^
\d
+$/
;
var
reg
=
/^
\d
+$/
;
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
...
@@ -663,9 +506,9 @@ export default {
...
@@ -663,9 +506,9 @@ export default {
],
],
priority
:
[
priority
:
[
{
required
:
true
,
message
:
"请选择优先级"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"请选择优先级"
,
trigger
:
"change"
}
]
]
,
},
},
openPanel
:
[
'0'
,
'1'
],
openPanel
:
[
'0'
,
'1'
],
officeLocationsBackup
:
[],
officeLocationsBackup
:
[],
isok
:
false
,
isok
:
false
,
callIDblur
:
false
,
callIDblur
:
false
,
...
@@ -713,7 +556,7 @@ export default {
...
@@ -713,7 +556,7 @@ export default {
replacementRepair
:
"0"
,
replacementRepair
:
"0"
,
appointmentTime
:
""
,
//预约时间(接口)
appointmentTime
:
""
,
//预约时间(接口)
reservations
:
'0'
,
//预约单
reservations
:
'0'
,
//预约单
dataSource
:
''
,
contactClientId
:
""
,
contactClientId
:
""
,
contactName
:
''
,
contactName
:
''
,
contactPhone
:
''
,
contactPhone
:
''
,
...
@@ -730,21 +573,22 @@ export default {
...
@@ -730,21 +573,22 @@ export default {
treeList
:
[],
treeList
:
[],
// 设置表单验证
// 设置表单验证
ruleValidate
:
{
ruleValidate
:
{
callID
:
[
// callID: [
{
// {
required
:
true
,
// required: true,
message
:
"请输入正确的来电号码"
,
// message: "请输入正确的来电号码",
trigger
:
"blur"
,
// trigger: "blur",
transform
(
value
)
{
// transform (value) {
var
reg
=
/
[
0-9
\-]
/
;
// var reg = /[0-9\-]/;
if
(
!
reg
.
test
(
value
))
{
// if (!reg.test(value)) {
return
false
;
// return false;
}
else
{
// } else {
return
value
;
// return value;
}
// }
}
// }
}
// }
],
// ],
callID
:
[{
required
:
true
,
message
:
"请填写报修人姓名"
,
trigger
:
"blur"
}],
contactNumber
:
[
contactNumber
:
[
{
{
required
:
true
,
required
:
true
,
...
@@ -752,10 +596,13 @@ export default {
...
@@ -752,10 +596,13 @@ export default {
trigger
:
"blur"
trigger
:
"blur"
}
}
],
],
dataSource
:
[
{
required
:
true
,
message
:
"请选择工单来源"
,
trigger
:
"change"
}
],
contactName
:
[
contactName
:
[
{
required
:
true
,
message
:
"请填写联系人姓名"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请填写联系人姓名"
,
trigger
:
"blur"
}
],
],
reservation
_type
:
[
reservation
s
:
[
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"blur"
}
],
],
reservationTime
:
[
reservationTime
:
[
...
@@ -766,8 +613,8 @@ export default {
...
@@ -766,8 +613,8 @@ export default {
type
:
"string"
type
:
"string"
}
}
],
],
one_type
:
[
problemClass
:
[
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"
blur
"
}
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"
change
"
}
],
],
officeLocation
:
[
officeLocation
:
[
{
required
:
true
,
message
:
"位置不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"位置不能为空"
,
trigger
:
"blur"
}
...
@@ -777,11 +624,11 @@ export default {
...
@@ -777,11 +624,11 @@ export default {
],
],
participatorids
:
[
participatorids
:
[
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"该选项不能为空"
,
trigger
:
"blur"
}
]
]
,
},
},
// 设置结束时间大于开始时间
// 设置结束时间大于开始时间
end
:
{
end
:
{
disabledDate
:
function
(
date
)
{
disabledDate
:
function
(
date
)
{
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
startUpdateTime
);
return
date
.
valueOf
()
<
new
Date
(
this
.
formItem
.
startUpdateTime
);
}.
bind
(
this
)
}.
bind
(
this
)
},
},
...
@@ -845,10 +692,10 @@ export default {
...
@@ -845,10 +692,10 @@ export default {
params
.
row
.
priority
===
"一级"
params
.
row
.
priority
===
"一级"
?
"error"
?
"error"
:
params
.
row
.
priority
===
"二级"
:
params
.
row
.
priority
===
"二级"
?
"warning"
?
"warning"
:
params
.
row
.
priority
===
"三级"
:
params
.
row
.
priority
===
"三级"
?
"success"
?
"success"
:
"info"
,
:
"info"
,
size
:
"small"
size
:
"small"
}
}
},
},
...
@@ -925,10 +772,13 @@ export default {
...
@@ -925,10 +772,13 @@ export default {
},
},
repairHistoryForm
:
{
repairHistoryForm
:
{
clientId
:
""
clientId
:
""
}
},
organization
:
[],
parentList
:
[],
sublevelList
:
[]
};
};
},
},
mounted
()
{
mounted
()
{
//方法
//方法
if
(
this
.
$route
.
query
.
callID
)
{
if
(
this
.
$route
.
query
.
callID
)
{
...
@@ -942,7 +792,9 @@ export default {
...
@@ -942,7 +792,9 @@ export default {
this
.
custSearch
(
this
.
$route
.
query
.
callID
,
true
);
this
.
custSearch
(
this
.
$route
.
query
.
callID
,
true
);
}
}
},
},
created
()
{
created
()
{
this
.
getOrganization
()
// 优先级下拉列表
// 优先级下拉列表
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/dictionary/optionsByGroupCode"
,
"/api/dictionary/optionsByGroupCode"
,
...
@@ -961,14 +813,14 @@ export default {
...
@@ -961,14 +813,14 @@ export default {
this
.
custSearch
(
value
,
true
);
this
.
custSearch
(
value
,
true
);
});
});
},
},
beforeCreate
()
{
beforeCreate
()
{
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/problem-base/treeList"
,
"/api/emaint/problem-base/treeList"
,
{},
{},
res
=>
{
res
=>
{
this
.
treeList
=
res
.
responseResult
;
this
.
treeList
=
res
.
responseResult
;
},
},
res
=>
{}
res
=>
{
}
);
);
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/user/searchUserProblemNum"
,
"/api/user/searchUserProblemNum"
,
...
@@ -977,11 +829,11 @@ export default {
...
@@ -977,11 +829,11 @@ export default {
this
.
userList
=
res
.
responseResult
.
list
;
this
.
userList
=
res
.
responseResult
.
list
;
this
.
userList
.
sort
(
util
.
compare1
(
"problemNum"
));
this
.
userList
.
sort
(
util
.
compare1
(
"problemNum"
));
},
},
res
=>
{}
res
=>
{
}
);
);
},
},
methods
:
{
methods
:
{
custSearch
(
query
,
type
)
{
custSearch
(
query
,
type
)
{
var
self
=
this
;
var
self
=
this
;
if
(
query
!==
""
)
{
if
(
query
!==
""
)
{
self
.
callIDOptions
=
[];
self
.
callIDOptions
=
[];
...
@@ -1021,7 +873,7 @@ export default {
...
@@ -1021,7 +873,7 @@ export default {
}
}
},
},
contactCustSearch
(
query
,
type
)
{
contactCustSearch
(
query
,
type
)
{
if
(
query
!==
""
)
{
if
(
query
!==
""
)
{
this
.
contactOptions
=
[];
this
.
contactOptions
=
[];
this
.
$request
.
post
(
this
.
$request
.
post
(
...
@@ -1053,12 +905,12 @@ export default {
...
@@ -1053,12 +905,12 @@ export default {
}
}
},
},
// 位置自动检索
// 位置自动检索
locationChange
(
value
)
{
locationChange
(
value
)
{
console
.
log
(
value
,
"cv"
);
console
.
log
(
value
,
"cv"
);
this
.
formItem
.
officeLocation
=
value
;
this
.
formItem
.
officeLocation
=
value
;
},
},
handleSearch1
(
value
,
option
)
{
handleSearch1
(
value
,
option
)
{
// this.officeLocations = [];
// this.officeLocations = [];
console
.
log
(
value
,
"value"
);
console
.
log
(
value
,
"value"
);
console
.
log
(
value
,
"value"
);
console
.
log
(
value
,
"value"
);
...
@@ -1074,7 +926,7 @@ export default {
...
@@ -1074,7 +926,7 @@ export default {
});
});
},
},
changefile
(
e
)
{
changefile
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
var
file
=
e
.
target
.
files
[
0
];
var
file
=
e
.
target
.
files
[
0
];
...
@@ -1089,43 +941,80 @@ export default {
...
@@ -1089,43 +941,80 @@ export default {
var
reader
=
new
FileReader
();
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
readAsDataURL
(
file
);
var
that
=
this
;
var
that
=
this
;
reader
.
onload
=
function
()
{
reader
.
onload
=
function
()
{
that
.
imgList
.
push
(
this
.
result
);
that
.
imgList
.
push
(
this
.
result
);
that
.
imgFiles
.
push
(
file
);
that
.
imgFiles
.
push
(
file
);
};
};
},
},
// 二级菜单
// 二级菜单
findchildren2
()
{
findchildren2
(
val
)
{
console
.
log
(
val
);
if
(
this
.
formItem
.
problemClass
==
''
||
this
.
formItem
.
problemClass
==
null
)
{
this
.
$Message
.
error
(
"请先选择一级菜单!"
);
return
}
let
arr
=
this
.
sublevelList
.
filter
(
item
=>
item
.
problem
===
val
)
console
.
log
(
arr
);
this
.
formItem
.
problemBaseId
=
arr
[
0
].
id
// console.log(this.formItem.problemType);
// console.log(this.formItem.problemType);
this
.
childList
.
forEach
(
v
=>
{
//
this.childList.forEach(v => {
if
(
v
.
problem
==
this
.
formItem
.
problemType
)
{
//
if (v.problem == this.formItem.problemType) {
this
.
$request
.
post
(
//
this.$request.post(
"/api/emaint/problem-base/list"
,
//
"/api/emaint/problem-base/list",
qs
.
stringify
({
parentId
:
v
.
id
}),
//
qs.stringify({ parentId: v.id }),
res
=>
{
//
res => {
this
.
questionList
=
res
.
responseResult
;
//
this.questionList = res.responseResult;
},
//
},
res
=>
{
}
// res => {
}
);
//
);
}
//
}
});
//
});
},
},
// 一级菜单
// 一级菜单
findchildren
()
{
findchildren
(
value
)
{
this
.
treeList
.
forEach
(
v
=>
{
this
.
formItem
.
problemType
=
''
if
(
v
.
parentProblem
==
this
.
formItem
.
problemClass
)
{
this
.
sublevelList
=
[]
this
.
childList
=
v
.
childList
;
let
arr
=
this
.
parentList
.
filter
(
item
=>
item
.
parentProblem
==
value
)
this
.
formItem
.
problemType
=
""
;
this
.
sublevelList
=
arr
[
0
].
childList
this
.
questionList
=
[];
// this.treeList.forEach(v => {
// if(this.formItem.problemType=='')
// if (v.parentProblem == this.formItem.problemClass) {
// this.formItem.problemType=v.childList[0].problem
// this.childList = v.childList;
}
// this.formItem.problemType = "";
this
.
findchildren2
();
// this.questionList = [];
});
// // if(this.formItem.problemType=='')
// // this.formItem.problemType=v.childList[0].problem
// }
// this.findchildren2();
// });
},
// 点击工单来源
changDataSource
(
value
)
{
this
.
formItem
.
problemClass
=
''
this
.
$request
.
post
(
"/api/emaint/problem-base/getTreeList"
,
qs
.
stringify
({
dataSource
:
value
}),
res
=>
{
this
.
parentList
=
res
.
responseResult
.
map
(
item
=>
{
item
.
parentId
=
`
${
item
.
parentId
}
`
return
item
})
// that.parentList = res.responseResult.map(item => {
// item.label = item.parentProblem
// item.value = itme.parentId
// return item
// })
// console.log(this.parentList);
// this.$set(that.$data, 'parentList', res.responseResult)
// this.parentList = res.responseResult
},
res
=>
{
}
);
},
},
// 数组去重
// 数组去重
uniq
(
array
)
{
uniq
(
array
)
{
var
temp
=
[];
//一个新的临时数组
var
temp
=
[];
//一个新的临时数组
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
temp
.
indexOf
(
array
[
i
])
==
-
1
)
{
if
(
temp
.
indexOf
(
array
[
i
])
==
-
1
)
{
...
@@ -1135,11 +1024,11 @@ export default {
...
@@ -1135,11 +1024,11 @@ export default {
return
temp
;
return
temp
;
},
},
search1
(
e
)
{
},
search1
(
e
)
{
},
// 输入手机号进行检索
// 输入手机号进行检索
custChange
(
e
)
{
custChange
(
e
)
{
console
.
log
(
this
.
formItem
.
callID
);
console
.
log
(
this
.
formItem
.
callID
);
if
(
!
this
.
formItem
.
callID
||
this
.
formItem
.
callID
==
"undefined"
)
{
if
(
!
this
.
formItem
.
callID
||
this
.
formItem
.
callID
==
"undefined"
)
{
return
;
return
;
}
}
var
flag
=
false
;
var
flag
=
false
;
...
@@ -1192,7 +1081,7 @@ export default {
...
@@ -1192,7 +1081,7 @@ export default {
this
.
formItem
.
officeLocation
=
this
.
officeLocations
[
0
];
this
.
formItem
.
officeLocation
=
this
.
officeLocations
[
0
];
}
}
},
},
res
=>
{}
res
=>
{
}
);
);
}
}
this
.
formItem
.
sex
=
getCustSex
(
v
)
this
.
formItem
.
sex
=
getCustSex
(
v
)
...
@@ -1247,9 +1136,9 @@ export default {
...
@@ -1247,9 +1136,9 @@ export default {
},
},
contactCustChange
()
{
contactCustChange
()
{
console
.
log
(
this
.
formItem
.
contactClient
);
console
.
log
(
this
.
formItem
.
contactClient
);
if
(
!
this
.
formItem
.
contactClient
||
this
.
formItem
.
contactClient
==
"undefined"
)
{
if
(
!
this
.
formItem
.
contactClient
||
this
.
formItem
.
contactClient
==
"undefined"
)
{
return
;
return
;
}
}
var
flag
=
false
;
var
flag
=
false
;
...
@@ -1293,7 +1182,7 @@ export default {
...
@@ -1293,7 +1182,7 @@ export default {
this
.
formItem
.
officeLocation
=
this
.
officeLocations
[
0
];
this
.
formItem
.
officeLocation
=
this
.
officeLocations
[
0
];
}
}
},
},
res
=>
{}
res
=>
{
}
);
);
}
}
});
});
...
@@ -1340,8 +1229,20 @@ export default {
...
@@ -1340,8 +1229,20 @@ export default {
)[
1
];
)[
1
];
transfer
.
style
.
display
=
"none"
;
transfer
.
style
.
display
=
"none"
;
},
},
// 表单验证
submit
()
{
const
that
=
this
;
this
.
$refs
[
'kfxx'
].
validate
(
valid
=>
{
if
(
valid
)
{
that
.
repairSubmit
()
}
else
{
this
.
$Message
.
error
(
'Fail!'
);
return
}
})
},
// 报修提交
// 报修提交
repairSubmit
()
{
repairSubmit
()
{
this
.
modal_loading
=
true
;
this
.
modal_loading
=
true
;
if
(
this
.
isok
)
{
if
(
this
.
isok
)
{
...
@@ -1379,7 +1280,7 @@ export default {
...
@@ -1379,7 +1280,7 @@ export default {
// this.formItem.phone != "" &&
// this.formItem.phone != "" &&
this
.
formItem
.
problemClass
!=
""
&&
this
.
formItem
.
problemClass
!=
""
&&
this
.
formItem
.
problemType
!=
""
&&
this
.
formItem
.
problemType
!=
""
&&
// this.formItem.phone != undefined
&&
this
.
formItem
.
dataSource
!=
""
&&
this
.
formItem
.
problemClass
!=
undefined
&&
this
.
formItem
.
problemClass
!=
undefined
&&
this
.
formItem
.
problemType
!=
undefined
&&
this
.
formItem
.
problemType
!=
undefined
&&
reservationIs
===
true
reservationIs
===
true
...
@@ -1469,25 +1370,25 @@ export default {
...
@@ -1469,25 +1370,25 @@ export default {
}
}
},
},
// 上一步
// 上一步
goBack
()
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
},
},
// 选择文件
// 选择文件
uploadfile
()
{
uploadfile
()
{
document
.
querySelector
(
"#upfile"
).
click
();
document
.
querySelector
(
"#upfile"
).
click
();
},
},
// 图片幻灯
// 图片幻灯
handleView
(
index
)
{
handleView
(
index
)
{
this
.
showimg
=
index
;
this
.
showimg
=
index
;
this
.
visible
=
true
;
this
.
visible
=
true
;
},
},
handleRemove
(
index
)
{
handleRemove
(
index
)
{
this
.
imgFiles
.
splice
(
index
,
1
);
this
.
imgFiles
.
splice
(
index
,
1
);
this
.
imgList
.
splice
(
index
,
1
);
this
.
imgList
.
splice
(
index
,
1
);
},
},
// 历史报修数据
// 历史报修数据
clientRepairList
(
e
)
{
clientRepairList
(
e
)
{
if
(
e
==
0
)
return
;
if
(
e
==
0
)
return
;
// console.log(this.repairHistoryForm.clientId);
// console.log(this.repairHistoryForm.clientId);
if
(
this
.
repairHistoryForm
.
clientId
==
""
||
this
.
repairHistoryForm
.
clientId
==
null
)
{
if
(
this
.
repairHistoryForm
.
clientId
==
""
||
this
.
repairHistoryForm
.
clientId
==
null
)
{
...
@@ -1501,7 +1402,7 @@ export default {
...
@@ -1501,7 +1402,7 @@ export default {
},
},
//是否预约单
//是否预约单
reservationChange
(
e
)
{
reservationChange
(
e
)
{
if
(
e
==
"1"
)
{
if
(
e
==
"1"
)
{
this
.
isReservation
=
true
;
this
.
isReservation
=
true
;
console
.
log
(
this
.
isReservation
);
console
.
log
(
this
.
isReservation
);
...
@@ -1512,28 +1413,28 @@ export default {
...
@@ -1512,28 +1413,28 @@ export default {
}
}
},
},
//预约时间
//预约时间
changeDate
(
e
)
{
changeDate
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
this
.
formItem
.
appointmentTime
=
e
;
this
.
formItem
.
appointmentTime
=
e
;
},
},
changeUser
(
val
)
{
changeUser
(
val
)
{
this
.
formItem
.
userId
=
val
;
this
.
formItem
.
userId
=
val
;
},
},
handleAddCust
()
{
handleAddCust
()
{
this
.
$refs
.
addCustRef
.
resetFields
();
this
.
$refs
.
addCustRef
.
resetFields
();
this
.
addCustModal
=
true
;
this
.
addCustModal
=
true
;
let
query
=
this
.
$refs
[
"callidselect"
].
query
let
query
=
this
.
$refs
[
"callidselect"
].
query
if
(
validateMobile
(
query
))
{
if
(
validateMobile
(
query
))
{
this
.
addCustForm
.
phone
=
query
;
this
.
addCustForm
.
phone
=
query
;
}
else
if
(
validateNumber
(
query
)
&&
query
&&
query
.
length
===
4
)
{
}
else
if
(
validateNumber
(
query
)
&&
query
&&
query
.
length
===
4
)
{
this
.
addCustForm
.
undef
=
query
;
this
.
addCustForm
.
undef
=
query
;
}
else
if
(
validateNumber
(
query
)
&&
query
)
{
}
else
if
(
validateNumber
(
query
)
&&
query
)
{
this
.
addCustForm
.
tel
=
query
;
this
.
addCustForm
.
tel
=
query
;
}
}
this
.
getCompany
()
this
.
getCompany
()
},
},
getCompany
()
{
getCompany
()
{
let
self
=
this
let
self
=
this
self
.
$refs
.
companySelect
.
clearSingleSelect
()
self
.
$refs
.
companySelect
.
clearSingleSelect
()
this
.
$request
.
post
(
this
.
$request
.
post
(
...
@@ -1546,14 +1447,14 @@ export default {
...
@@ -1546,14 +1447,14 @@ export default {
}
}
)
)
},
},
getDept
(
val
)
{
getDept
(
val
)
{
if
(
!
val
)
return
;
if
(
!
val
)
return
;
this
.
deptList
=
[]
this
.
deptList
=
[]
let
self
=
this
let
self
=
this
self
.
$refs
.
deptSelect
.
clearSingleSelect
()
self
.
$refs
.
deptSelect
.
clearSingleSelect
()
this
.
$request
.
post
(
this
.
$request
.
post
(
"/api/emaint/group/dept"
,
"/api/emaint/group/dept"
,
qs
.
stringify
({
parentCode
:
val
}),
qs
.
stringify
({
parentCode
:
val
}),
res
=>
{
res
=>
{
self
.
addCustForm
.
deptName
=
''
self
.
addCustForm
.
deptName
=
''
self
.
deptList
=
res
.
responseResult
;
self
.
deptList
=
res
.
responseResult
;
...
@@ -1562,7 +1463,7 @@ export default {
...
@@ -1562,7 +1463,7 @@ export default {
}
}
)
)
},
},
addCustSumbit
()
{
addCustSumbit
()
{
let
self
=
this
let
self
=
this
this
.
$refs
.
addCustRef
.
validate
((
valid
)
=>
{
this
.
$refs
.
addCustRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -1592,13 +1493,29 @@ export default {
...
@@ -1592,13 +1493,29 @@ export default {
this
.
isOtherProblem
=
false
this
.
isOtherProblem
=
false
this
.
formItem
.
otherProblem
=
''
this
.
formItem
.
otherProblem
=
''
}
}
},
getOrganization
()
{
this
.
$request
.
post
(
"/api/emaint/group/getGroup"
,
{},
res
=>
{
this
.
organization
=
res
.
responseResult
.
map
(
item
=>
{
if
(
item
.
dataSource
==
1
)
{
item
.
label
=
'塔楼客户'
}
else
{
item
.
label
=
item
.
parentName
}
item
.
dataSource
=
`
${
item
.
dataSource
}
`
return
item
})
})
}
}
},
},
watch
:{
watch
:
{
openPanel
()
{
openPanel
()
{
console
.
log
(
this
.
openPanel
)
console
.
log
(
this
.
openPanel
)
},
},
formItem
()
{
formItem
()
{
console
.
log
(
this
.
formItem
.
callID
)
console
.
log
(
this
.
formItem
.
callID
)
}
}
/*,
/*,
...
@@ -1616,6 +1533,7 @@ export default {
...
@@ -1616,6 +1533,7 @@ export default {
#username_form
.ivu-form-item-content
{
#username_form
.ivu-form-item-content
{
text-align
:
left
!important
;
text-align
:
left
!important
;
}
}
.demo-upload-list
{
.demo-upload-list
{
display
:
inline-block
;
display
:
inline-block
;
width
:
60px
;
width
:
60px
;
...
@@ -1697,7 +1615,7 @@ p.addbutton {
...
@@ -1697,7 +1615,7 @@ p.addbutton {
padding-left
:
1px
;
padding-left
:
1px
;
}
}
p
.addbutton
>
button
{
p
.addbutton
>
button
{
padding
:
10px
20px
;
padding
:
10px
20px
;
border
:
none
;
border
:
none
;
}
}
...
@@ -1715,12 +1633,11 @@ div.ivu-form-item {
...
@@ -1715,12 +1633,11 @@ div.ivu-form-item {
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-content
{
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-content
{
margin-left
:
10px
!important
;
margin-left
:
10px
!important
;
}
}
.workOrderManage
.search-card
.workOrderManage
.search-card
.ivu-col.ivu-col-span-10
.ivu-form-item-error-tip
{
.ivu-col.ivu-col-span-10
.ivu-form-item-error-tip
{
left
:
25px
;
left
:
25px
;
}
}
.workOrderManage
.search-card
.search-body
.ivu-select-dropdown-list
{
.workOrderManage
.search-card
.search-body
.ivu-select-dropdown-list
{
text-align
:
left
;
text-align
:
left
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment