Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
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
常超
founder_vue
Commits
fff8ef89
Commit
fff8ef89
authored
Dec 18, 2021
by
li_hongchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组织结构解析
parent
b4969968
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
1 deletions
+107
-1
src/utils/ZzjgUtil.js
+88
-0
src/views/bzxxgl/bzxxsh.vue
+19
-1
No files found.
src/utils/ZzjgUtil.js
0 → 100644
View file @
fff8ef89
import
PrintLog
from
'./LogcatUtil'
const
_DEFAULT_KEYS
=
[
'公安厅'
,
'公安局'
,
'分局'
,
'派出所'
,
'支队'
,
'大队'
,
'中队'
,
]
const
_TAG
=
'
\\
src
\\
utils
\\
LogcatUtil.js'
export
default
{
last
(
content
,
defult
=
'...'
)
{
if
(
content
&&
content
.
length
<=
10
)
{
return
content
}
let
result
=
this
.
lastZzjg
(
content
,
defult
)
// PrintLog('last(content, defult)', result, _TAG)
return
result
},
lastZzjg
(
content
,
defult
=
'...'
)
{
let
arrs
=
parseStr
(
_DEFAULT_KEYS
,
content
)
let
result
if
(
arrs
&&
arrs
.
length
>
0
)
{
result
=
defult
+
arrs
[
arrs
.
length
-
1
]
}
// PrintLog('lastZzjg(content, defult)', result, _TAG)
return
result
},
parseAll
(
keyArr
,
content
)
{
let
result
=
parseStr
(
keyArr
,
content
)
// PrintLog('parseAll(keyArr, content)', result, _TAG)
return
result
},
parseZzjg
(
content
)
{
let
result
=
parseStr
(
_DEFAULT_KEYS
,
content
)
// PrintLog('parseZzjg(content)', result, _TAG)
return
result
},
}
let
parseStr
=
function
(
keyArrs
,
content
)
{
if
(
!
keyArrs
)
{
PrintLog
(
'解析关键字'
,
'解析关键字为空'
,
_TAG
)
return
[]
}
if
(
!
content
||
content
===
''
||
content
===
'null'
)
{
PrintLog
(
'解析内容'
,
'解析内容为空'
,
_TAG
)
return
[]
}
PrintLog
(
'解析关键字'
,
keyArrs
,
_TAG
)
PrintLog
(
'解析内容'
,
content
,
_TAG
)
let
arrs
=
[]
let
temp
=
content
let
tempArr
let
index
keyArrs
.
forEach
(
item
=>
{
if
(
!
temp
||
temp
===
''
)
{
if
(
arrs
.
length
===
0
)
{
arrs
.
push
(
content
)
}
PrintLog
(
'解析结果'
,
arrs
,
_TAG
)
return
arrs
}
index
=
temp
.
indexOf
(
item
)
if
(
index
>
0
)
{
tempArr
=
temp
.
split
(
item
)
if
(
tempArr
&&
tempArr
.
length
===
2
)
{
if
(
tempArr
[
0
])
{
arrs
.
push
(
tempArr
[
0
]
+
item
)
}
temp
=
tempArr
[
1
]
index
=
-
1
}
}
})
if
(
arrs
.
length
===
0
)
{
arrs
.
push
(
content
)
}
PrintLog
(
'解析结果'
,
arrs
,
_TAG
)
return
arrs
}
src/views/bzxxgl/bzxxsh.vue
View file @
fff8ef89
...
@@ -258,6 +258,19 @@
...
@@ -258,6 +258,19 @@
</el-table-column>
</el-table-column>
</div>
</div>
<div
v-else-if=
"item.prop === 'sbdwGajgjgdmStr'"
>
<el-table-column
v-if=
"item.isShow"
:prop=
"item.prop"
:label=
"item.label"
width=
"auto"
:min-width=
"item.width"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.row.sbdwGajgjgdmStr"
placement=
"top-start"
>
<div>
{{
getLable
(
scope
.
row
.
sbdwGajgjgdmStr
)
}}
</div>
</el-tooltip>
</
template
>
</el-table-column>
</div>
<div
v-else
>
<div
v-else
>
<el-table-column
v-if=
"item.isShow"
:prop=
"item.prop"
<el-table-column
v-if=
"item.isShow"
:prop=
"item.prop"
:label=
"item.label"
width=
"auto"
:min-width=
"item.width"
:label=
"item.label"
width=
"auto"
:min-width=
"item.width"
...
@@ -321,6 +334,7 @@ import bzxxsfOpt from '../bzxxgl/BzxxsfOpt.vue'
...
@@ -321,6 +334,7 @@ import bzxxsfOpt from '../bzxxgl/BzxxsfOpt.vue'
import
PrintLog
from
'../../utils/LogcatUtil'
import
PrintLog
from
'../../utils/LogcatUtil'
import
{
queryShList
,
bzxxPlSb
}
from
'../../netmgr/bzxxgl/bzxxsh'
import
{
queryShList
,
bzxxPlSb
}
from
'../../netmgr/bzxxgl/bzxxsh'
import
stRole
from
'../../utils/UserUtil'
import
stRole
from
'../../utils/UserUtil'
import
ZzjgUtil
from
'../../utils/ZzjgUtil.js'
export
default
{
export
default
{
name
:
'bzxxsh'
,
name
:
'bzxxsh'
,
...
@@ -333,7 +347,7 @@ export default {
...
@@ -333,7 +347,7 @@ export default {
MBTMH
:
{
width
:
'220'
,
prop
:
'mbtmh'
,
label
:
'目标条码号'
,
isShow
:
true
},
MBTMH
:
{
width
:
'220'
,
prop
:
'mbtmh'
,
label
:
'目标条码号'
,
isShow
:
true
},
YZW
:
{
width
:
'125'
,
prop
:
'yzw'
,
label
:
'源指位/序号'
,
isShow
:
true
},
YZW
:
{
width
:
'125'
,
prop
:
'yzw'
,
label
:
'源指位/序号'
,
isShow
:
true
},
MBZW
:
{
width
:
'125'
,
prop
:
'mbzw'
,
label
:
'目标指位/序号'
,
isShow
:
true
},
MBZW
:
{
width
:
'125'
,
prop
:
'mbzw'
,
label
:
'目标指位/序号'
,
isShow
:
true
},
SBDW
:
{
width
:
'
22
0'
,
prop
:
'sbdwGajgjgdmStr'
,
label
:
'上报单位'
,
isShow
:
true
},
SBDW
:
{
width
:
'
16
0'
,
prop
:
'sbdwGajgjgdmStr'
,
label
:
'上报单位'
,
isShow
:
true
},
SBSJ
:
{
width
:
'160'
,
prop
:
'sbsj'
,
label
:
'上报时间'
,
isShow
:
true
},
SBSJ
:
{
width
:
'160'
,
prop
:
'sbsj'
,
label
:
'上报时间'
,
isShow
:
true
},
SHR
:
{
width
:
'120'
,
prop
:
'shrXm'
,
label
:
'审核人'
,
isShow
:
true
},
SHR
:
{
width
:
'120'
,
prop
:
'shrXm'
,
label
:
'审核人'
,
isShow
:
true
},
SHSJ
:
{
width
:
'120'
,
prop
:
'shsj'
,
label
:
'审核时间'
,
isShow
:
true
},
SHSJ
:
{
width
:
'120'
,
prop
:
'shsj'
,
label
:
'审核时间'
,
isShow
:
true
},
...
@@ -418,6 +432,7 @@ export default {
...
@@ -418,6 +432,7 @@ export default {
_that
.
initTableColumns
()
_that
.
initTableColumns
()
// _that.initTestData()
// _that.initTestData()
_that
.
getData
()
_that
.
getData
()
_that
.
getLable
(
"你好。。。"
)
},
},
computed
:
{
computed
:
{
roleArr
()
{
roleArr
()
{
...
@@ -425,6 +440,9 @@ export default {
...
@@ -425,6 +440,9 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
getLable
(
label
)
{
return
ZzjgUtil
.
last
(
label
)
},
initTableColumns
()
{
initTableColumns
()
{
let
_that
=
this
let
_that
=
this
let
w1
=
1920
let
w1
=
1920
...
...
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