Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c7a9233d
authored
Dec 28, 2021
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1111
1 parent
0229e234
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
20 deletions
src/components/glsx-organization/index.vue
src/services/common.js
src/views/work/order.vue
src/components/glsx-organization/index.vue
0 → 100644
View file @
c7a9233
<
template
>
<div
class=
""
>
<el-input
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
size=
"small"
>
</el-input>
<div
v-loading=
"loading"
>
<el-tree
style=
"max-height:50vh;overflow:auto"
class=
"filter-tree"
:data=
"filterTextData"
:filter-node-method=
"filterNode"
highlight-current
ref=
"tree"
node-key=
"id"
check-on-click-node
>
</el-tree>
</div>
<p
style=
"text-align: right; margin-top: 10px"
>
<el-button
@
click=
"filterConfirm"
type=
"primary"
>
确定
</el-button>
<el-button
@
click=
"closeFilter"
>
取消
</el-button>
</p>
</div>
</
template
>
<
script
>
import
{
getOrgTree
}
from
"services/common"
;
import
{
showToast
}
from
"@/utils/util"
;
export
default
{
name
:
"GlsxOrganization"
,
data
()
{
return
{
filterText
:
""
,
filterTextData
:
[],
_timeout
:
""
,
loading
:
false
,
};
},
mounted
()
{
this
.
getTree
();
},
watch
:
{
filterText
(
n
)
{
let
_this
=
this
;
_this
.
loading
=
true
;
setTimeout
(
function
()
{
_this
.
$refs
.
tree
.
filter
(
n
);
},
100
);
},
},
methods
:
{
// 确认选择树
filterConfirm
()
{
let
o
=
this
.
$refs
.
tree
.
getCurrentNode
();
if
(
!
o
)
{
showToast
({
message
:
"请选择所属组织"
,
type
:
"error"
,
});
return
false
;
}
const
{
label
,
id
,
origin
}
=
o
;
// if (origin && origin.type != "u") {
// showToast({
// message: "请选择下级所属组织",
// type: "error",
// });
// return false;
// }
console
.
log
(
o
);
this
.
$emit
(
"change"
,
o
);
// this.searchForm.specialShopName = label.split("/")[1];
// this.searchForm.specialShopCode = label.split("/")[0];
//this.$set(this, "form.specialShopName", label);
//this.searchForm.specialShopId = id;
//this.closeFilter();
},
// 获取组织机构树数据
getTree
()
{
getOrgTree
({
hasUserLeaf
:
true
}).
then
((
res
)
=>
{
const
{
data
}
=
res
;
this
.
filterTextData
=
data
||
[];
});
},
// 搜索树
filterNode
(
value
,
data
)
{
let
_this
=
this
;
if
(
!
value
)
{
_this
.
loading
=
false
;
return
true
;
}
setTimeout
(
function
()
{
_this
.
loading
=
false
;
},
1500
);
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
// 关闭树
closeFilter
()
{
this
.
$emit
(
"change"
);
},
// 搜索树
onChange
(
val
)
{
this
.
loading
=
true
;
this
.
$refs
.
tree
.
filter
(
val
);
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/services/common.js
0 → 100644
View file @
c7a9233
import
{
COMMON_API
}
from
'@/config/config'
import
request
from
'@/services/request'
// 获取用户列表
function
getProvinceList
(
params
)
{
const
url
=
COMMON_API
.
PROVINCE_LIST
return
request
(
params
,
url
)
}
// 获取字典详情
function
dictInfo
(
params
)
{
const
url
=
`
${
COMMON_API
.
DICTDATA_TYPE
}
/
${
params
}
`
return
request
({},
url
)
}
// 获取第一级组织列表树
function
getSimpleRoot
(
params
)
{
const
url
=
COMMON_API
.
ORGINIZA_SIMPLEROOT
return
request
(
params
,
url
)
}
// 获取组织列表树
function
getSimpleList
(
params
)
{
const
url
=
COMMON_API
.
ORGINIZA_SIMPLELIST
return
request
(
params
,
url
)
}
function
getOrgTree
(
params
)
{
return
request
(
params
,
'/usercenter/organization/orgtree'
)
}
export
{
getProvinceList
,
dictInfo
,
getSimpleRoot
,
getSimpleList
,
getOrgTree
}
src/views/work/order.vue
View file @
c7a9233
...
@@ -5,22 +5,31 @@
...
@@ -5,22 +5,31 @@
<div
class=
"search_box"
>
<div
class=
"search_box"
>
<el-form
:inline=
"true"
size=
"small"
>
<el-form
:inline=
"true"
size=
"small"
>
<el-form-item>
<el-form-item>
<el-select
v-model=
"searchForm.
queryT
imeType"
class=
"sort_select"
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.
t
imeType"
class=
"sort_select"
placeholder=
"请选择"
>
<el-option
label=
"创建时间"
value=
"1"
></el-option>
<el-option
label=
"创建时间"
value=
"1"
></el-option>
<el-option
label=
"期望安装时间"
value=
"2"
></el-option>
<el-option
label=
"期望安装时间"
value=
"2"
></el-option>
</el-select>
</el-select>
<el-date-picker
v-model=
"searchForm.dateRange"
class=
"data_picker"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
<el-date-picker
v-model=
"searchForm.dateRange"
class=
"data_picker"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
工单类型
"
>
<el-form-item
label=
"
是否需要安装
"
>
<el-select
v-model=
"searchForm.test"
class=
"small_select"
>
<el-select
v-model=
"searchForm.test"
class=
"small_select"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"无需安装"
:value=
"0
"
></el-option>
<el-option
label=
"无需安装"
value=
"Y
"
></el-option>
<el-option
label=
"需要安装"
:value=
"1
"
></el-option>
<el-option
label=
"需要安装"
value=
"N
"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"车辆归属:"
>
<el-popover
v-model=
"filterVisible"
placement=
"bottom-start"
width=
"400"
trigger=
"click"
>
<div>
<glsx-organization
@
change=
"onChange"
></glsx-organization>
</div>
<el-input
v-model=
"searchForm.orgName"
:placeholder=
"searchForm.specialShopName || '所属组织'"
slot=
"reference"
readonly
clearable
>
</el-input>
</el-popover>
</el-form-item>
<el-form-item
label=
"系统工单状态"
>
<el-form-item
label=
"系统工单状态"
>
<el-select
v-model=
"searchForm.
business
Status"
class=
"small_select"
placeholder=
"请选择"
>
<el-select
v-model=
"searchForm.
order
Status"
class=
"small_select"
placeholder=
"请选择"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"草稿"
:value=
"1"
></el-option>
<el-option
label=
"草稿"
:value=
"1"
></el-option>
<el-option
label=
"已提交"
:value=
"2"
></el-option>
<el-option
label=
"已提交"
:value=
"2"
></el-option>
...
@@ -129,13 +138,15 @@ import GlsxDialog from "@/components/dialog";
...
@@ -129,13 +138,15 @@ import GlsxDialog from "@/components/dialog";
import
{
GET_WORKORDER_SEARCH
,
GET_WORKORDER_EXPORT
}
from
'@/services/order'
import
{
GET_WORKORDER_SEARCH
,
GET_WORKORDER_EXPORT
}
from
'@/services/order'
import
{
deepClone
,
showToast
}
from
"@/utils/util"
;
import
{
deepClone
,
showToast
}
from
"@/utils/util"
;
import
store
from
"@/store"
;
import
store
from
"@/store"
;
import
GlsxOrganization
from
"@/components/glsx-organization"
;
export
default
{
export
default
{
components
:
{
components
:
{
GlsxDialog
,
GlsxDialog
,
GlsxOrganization
},
},
data
()
{
data
()
{
return
{
return
{
searchForm
:
{},
searchForm
:
{
timeType
:
'1'
},
currentPage
:
1
,
currentPage
:
1
,
pageSizes
:
[
10
,
20
,
30
,
40
],
pageSizes
:
[
10
,
20
,
30
,
40
],
pageSize
:
10
,
pageSize
:
10
,
...
@@ -146,7 +157,8 @@ export default {
...
@@ -146,7 +157,8 @@ export default {
showResult
:
false
,
showResult
:
false
,
loading
:
false
,
loading
:
false
,
dloading
:
false
,
dloading
:
false
,
tabLoading
:
false
tabLoading
:
false
,
filterVisible
:
false
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -156,24 +168,17 @@ export default {
...
@@ -156,24 +168,17 @@ export default {
// 获取查询参数
// 获取查询参数
getParams
()
{
getParams
()
{
let
oParams
=
deepClone
(
this
.
searchForm
);
let
oParams
=
deepClone
(
this
.
searchForm
);
let
m
=
oParams
.
timeDate
;
let
m
=
oParams
.
dateRange
;
let
n
=
oParams
.
offDate
;
if
(
m
&&
m
.
length
>
0
)
{
if
(
m
&&
m
.
length
>
0
)
{
oParams
.
activeStartTime
=
m
[
0
];
oParams
.
sDate
=
m
[
0
];
oParams
.
activeEndTime
=
m
[
1
];
oParams
.
eDate
=
m
[
1
];
}
if
(
n
&&
n
.
length
>
0
)
{
oParams
.
offlineStartTime
=
m
[
0
];
oParams
.
offlineEndTime
=
m
[
1
];
}
}
oParams
.
pageNumber
=
this
.
pageNumber
;
oParams
.
pageNumber
=
this
.
currentPage
;
oParams
.
pageSize
=
this
.
currentPag
e
oParams
.
pageSize
=
this
.
pageSiz
e
delete
oParams
.
offDat
e
;
delete
oParams
.
dateRang
e
;
delete
oParams
.
orgName
;
delete
oParams
.
orgName
;
delete
oParams
.
timeDate
;
return
oParams
;
return
oParams
;
},
},
...
@@ -249,7 +254,18 @@ export default {
...
@@ -249,7 +254,18 @@ export default {
_this
.
dloading
=
false
;
_this
.
dloading
=
false
;
},
},
});
});
},
// 监听树
onChange
(
e
)
{
this
.
filterVisible
=
false
;
console
.
log
(
e
);
if
(
e
)
{
this
.
orgInfo
=
e
.
origin
;
this
.
searchForm
.
orgId
=
e
.
origin
.
orgId
;
this
.
searchForm
.
orgName
=
e
.
origin
.
orgName
;
}
}
},
},
},
};
};
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment