Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangweidong
patzn-cloud-web-back-soil
Commits
d621c697
Commit
d621c697
authored
Mar 17, 2021
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资质管理试验项目添加了主检人和审核人字段
parent
af8aa5ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
294 additions
and
2 deletions
+294
-2
assignPersonCheck.vue
components/user-info-single/assignPersonCheck.vue
+205
-0
orginZtreeCheck.vue
components/user-info/orginZtreeCheck.vue
+56
-0
ItemManageEdit.vue
pages/meter-aptitude/item-manage/ItemManageEdit.vue
+33
-2
No files found.
components/user-info-single/assignPersonCheck.vue
0 → 100644
View file @
d621c697
<
template
>
<div>
<Modal
v-model=
"showUserModal"
v-drag
:mask-closable=
"false"
width=
"800"
class=
"zIndex-1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Row
:gutter=
"16"
>
<!--组织列表-->
<Col
span=
"10"
>
<Card
class=
"user_card_tree"
>
<p
slot=
"title"
>
{{
titleChange
}}
</p>
<!--
<p
v-if=
"isChange === undefined"
slot=
"extra"
@
click=
"_changeLimit"
>
-->
<!--
<Tooltip
content=
"切换"
placement=
"top-end"
>
-->
<!--
<Badge
dot
>
-->
<!--
<Icon
type=
"ios-switch"
size=
"23"
></Icon>
-->
<!--
</Badge>
-->
<!--
</Tooltip>
-->
<!--
</p>
-->
<div>
<orginZtree
ref=
"orginZtree"
@
on-result-change=
"_orgData"
></orginZtree>
</div>
</Card>
</Col>
<!--待选列表-->
<Col
span=
"14"
>
<Card
class=
"user_card_tree"
>
<p
slot=
"title"
>
待选人员列表
</p>
<div>
<userCheck
ref=
"userCheck"
:is-sampling-person=
"isSamplingPerson"
@
on-result-change=
"_userCheckData"
></userCheck>
</div>
</Card>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 选择人员信息
*/
import
orginZtree
from
'../user-info/orginZtreeCheck.vue'
import
{
sysOrg
}
from
'../../api'
import
userCheck
from
'./userCheck'
export
default
{
components
:
{
orginZtree
,
userCheck
},
props
:
{
// 是否显示切’换操‘作
isChange
:
null
,
isSamplingPerson
:
null
// 是否显示人员变红(采样人员)
},
data
()
{
return
{
id
:
''
,
modalTitle
:
'选择人员'
,
showUserModal
:
false
,
titleChange
:
'组织列表'
,
changeBool
:
true
,
currentRowData
:
{},
// 用于区分tree
treeName
:
''
,
footerList
:
[
{
name
:
'取消'
,
type
:
''
},
{
name
:
'确定'
,
type
:
'primary'
}
]
}
},
methods
:
{
// modal-footer
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_open
(
treeName
,
modalTitle
)
{
if
(
treeName
===
undefined
)
{
this
.
treeName
=
'userMan'
}
else
{
this
.
treeName
=
treeName
}
// 标题
if
(
modalTitle
===
undefined
)
{
this
.
modalTitle
=
'选择人员'
}
else
{
this
.
modalTitle
=
modalTitle
}
this
.
showUserModal
=
true
this
.
changeBool
=
true
this
.
titleChange
=
'组织列表'
this
.
_getCurrentOrg
()
this
.
$refs
.
userCheck
.
_refresh
()
this
.
_hideLoading
()
},
_openGoupByUserId
(
modalTitle
,
uid
,
treeName
)
{
this
.
modalTitle
=
modalTitle
this
.
changeBool
=
false
this
.
showUserModal
=
true
this
.
titleChange
=
'用户编组'
if
(
treeName
===
undefined
)
{
this
.
treeName
=
'userMan'
}
else
{
this
.
treeName
=
treeName
}
this
.
$refs
.
userCheck
.
_refresh
()
this
.
$refs
.
marshalling
.
_uidOpen
(
uid
)
},
_openGoup
(
modalTitle
,
treeName
)
{
this
.
modalTitle
=
modalTitle
this
.
changeBool
=
false
this
.
showUserModal
=
true
this
.
titleChange
=
'用户编组'
if
(
treeName
===
undefined
)
{
this
.
treeName
=
'userMan'
}
else
{
this
.
treeName
=
treeName
}
this
.
$refs
.
userCheck
.
_refresh
()
this
.
$refs
.
marshalling
.
_open
()
},
_openOrg
(
modalTitle
,
treeName
)
{
this
.
modalTitle
=
modalTitle
this
.
changeBool
=
false
this
.
showUserModal
=
true
this
.
titleChange
=
'用户编组'
this
.
_changeLimit
()
if
(
treeName
===
undefined
)
{
this
.
treeName
=
'userMan'
}
else
{
this
.
treeName
=
treeName
}
this
.
$refs
.
userCheck
.
_refresh
()
},
// 当前登录用户所处的组织
_getCurrentOrg
:
async
function
()
{
const
result
=
await
sysOrg
.
getOrg
()
if
(
result
!==
undefined
)
{
this
.
$refs
.
orginZtree
.
_getZtree
(
this
.
treeName
,
result
.
id
)
this
.
_orgData
(
result
)
}
else
{
this
.
$refs
.
orginZtree
.
_getZtree
(
this
.
treeName
)
}
},
_orgData
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
userCheck
.
_open
(
data
.
id
,
this
.
treeName
)
this
.
currentRowData
=
{}
},
_marshallingData
(
data
)
{
this
.
$refs
.
userCheck
.
_marshallingOpen
(
data
.
id
,
this
.
treeName
+
'Ma'
)
},
_userCheckData
(
data
,
msg
)
{
this
.
currentRowData
=
data
if
(
msg
===
'dbClick'
)
{
// 双击
this
.
_ok
()
}
},
_changeLimit
()
{
this
.
changeBool
=
!
this
.
changeBool
this
.
currentRowData
=
{}
if
(
this
.
changeBool
)
{
// 组织
this
.
titleChange
=
'组织列表'
this
.
_getCurrentOrg
()
this
.
$refs
.
userCheck
.
_refresh
()
}
else
{
// 用户编组
this
.
titleChange
=
'用户编组'
this
.
$refs
.
marshalling
.
_open
()
this
.
$refs
.
userCheck
.
_refresh
()
}
},
_cancel
()
{
this
.
showUserModal
=
false
},
_ok
()
{
if
(
JSON
.
stringify
(
this
.
currentRowData
)
===
'{}'
)
{
this
.
$Message
.
warning
(
'请选择人员!'
)
this
.
_hideLoading
()
}
else
{
// 根据组织选择人员时
if
(
this
.
currentRowData
.
userId
===
undefined
)
{
this
.
currentRowData
.
userId
=
this
.
currentRowData
.
id
}
this
.
$emit
(
'on-result-change'
,
this
.
currentRowData
,
this
.
treeName
)
this
.
showUserModal
=
false
}
}
}
}
</
script
>
components/user-info/orginZtreeCheck.vue
0 → 100644
View file @
d621c697
<
template
>
<div
style=
"text-align: center;overflow-y: auto;height: 410px;"
>
<ul
:id=
"treeName"
class=
"ztree"
/>
</div>
</
template
>
<
script
>
/**
* 组织Ztree
*/
import
{
sysOrg
}
from
'../../api'
let
treeObj
export
default
{
data
()
{
return
{
treeName
:
''
// 区别tree id
}
},
methods
:
{
_getZtree
:
async
function
(
name
,
currentId
)
{
this
.
treeName
=
name
+
'OrginTree'
const
setting
=
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
'id'
,
pIdKey
:
'pid'
}
},
callback
:
{
onClick
:
this
.
zTreeOnClick
}
}
const
result
=
await
sysOrg
.
orgTreeList
()
console
.
log
(
'tree结果'
)
console
.
log
(
result
)
if
(
result
)
{
$
.
fn
.
zTree
.
init
(
$
(
'#'
+
this
.
treeName
),
setting
,
result
)
treeObj
=
$
.
fn
.
zTree
.
getZTreeObj
(
this
.
treeName
)
if
(
currentId
!==
undefined
)
{
const
nodeId
=
treeObj
.
getNodeByParam
(
'id'
,
currentId
,
null
)
treeObj
.
checkNode
(
nodeId
,
true
,
true
)
treeObj
.
expandNode
(
nodeId
,
true
,
true
,
true
)
treeObj
.
selectNode
(
nodeId
)
}
else
{
treeObj
.
expandAll
(
true
)
}
}
},
zTreeOnClick
(
event
,
treeId
,
treeNode
)
{
this
.
$emit
(
'on-result-change'
,
treeNode
)
console
.
log
(
'zTree'
)
console
.
log
(
treeNode
)
}
}
}
</
script
>
pages/meter-aptitude/item-manage/ItemManageEdit.vue
View file @
d621c697
...
...
@@ -53,6 +53,18 @@
<Input
v-model=
"formObj.testMethod"
name=
"testMethod"
placeholder=
"请输入试验方法"
/>
</Form-item>
<Form-item
@
click
.
native=
"_selectPerson"
label=
"主检人"
prop=
"mainTester"
class=
"width-48"
>
<Input
v-model=
"formObj.mainTester"
name=
"mainTester"
placeholder=
"请输入主检人"
/>
<Input
v-model=
"formObj.mainTesterId"
name=
"mainTesterId"
style=
"display: none"
/>
</Form-item>
<Form-item
@
click
.
native=
"_selectCheckPerson"
label=
"审核人"
prop=
"checker"
class=
"width-48"
>
<Input
v-model=
"formObj.checker"
name=
"checker"
placeholder=
"请输入审核人"
/>
<Input
v-model=
"formObj.checkerId"
name=
"checkerId"
style=
"display: none"
/>
</Form-item>
</div>
</Form>
</div>
...
...
@@ -60,6 +72,8 @@
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
<assignPerson
ref=
"userModal"
@
on-result-change=
"_userResult"
></assignPerson>
<assignPersonCheck
ref=
"userCheckModal"
@
on-result-change=
"_userCheckResult"
></assignPersonCheck>
</div>
</
template
>
<
script
>
...
...
@@ -68,9 +82,10 @@
*/
import
{
soilAptitude
}
from
'../../../api'
import
assignPerson
from
'../../../components/user-info-single/assignPerson'
import
assignPersonCheck
from
'../../../components/user-info-single/assignPersonCheck'
export
default
{
components
:
{},
components
:
{
assignPerson
,
assignPersonCheck
},
data
()
{
return
{
activeName
:
''
,
...
...
@@ -128,6 +143,22 @@ export default {
console
.
log
(
data
)
// this.formObj.groupId = da
},
_selectPerson
()
{
this
.
$refs
.
userModal
.
_openOrg
(
'选择主检人'
,
'itemTree'
)
},
_selectCheckPerson
()
{
this
.
$refs
.
userCheckModal
.
_openOrg
(
'选择审核人'
,
'itemTreeCheck'
)
},
_userResult
(
data
,
msg
)
{
this
.
$forceUpdate
()
this
.
formObj
.
mainTester
=
data
.
realname
this
.
formObj
.
mainTesterId
=
data
.
id
},
_userCheckResult
(
data
,
msg
)
{
this
.
$forceUpdate
()
this
.
formObj
.
checker
=
data
.
realname
this
.
formObj
.
checkerId
=
data
.
id
},
_selGroup
(
data
)
{
console
.
log
(
data
)
this
.
formObj
.
groupId
=
data
...
...
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