Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sgaqgl-vue
Project
Project
Details
Activity
Releases
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
李苏
sgaqgl-vue
Commits
ca91c78d
Commit
ca91c78d
authored
Dec 12, 2022
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改字段
parent
78106698
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
217 additions
and
142 deletions
+217
-142
organizationalManagement.js
src/api/basicData/organizationalManagement.js
+36
-0
edit.vue
src/views/basicData/organizationalManagement/edit.vue
+17
-5
index.vue
src/views/basicData/organizationalManagement/index.vue
+12
-19
index.vue
src/views/train/testPaper/index.vue
+15
-9
subject.vue
src/views/train/testPaper/subject.vue
+137
-109
No files found.
src/api/basicData/organizationalManagement.js
0 → 100644
View file @
ca91c78d
import
request
from
'common/src/utils/request'
export
function
QueryBm
(
query
)
{
return
request
({
url
:
'jcsj/ubm/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
AddBm
(
query
)
{
return
request
({
url
:
'jcsj/ubm/add'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
DeleteBm
(
query
)
{
return
request
({
url
:
'jcsj/ubm/delete'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
UpdateBm
(
query
)
{
return
request
({
url
:
'jcsj/ubm/update'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
qtBm
(
query
)
{
return
request
({
url
:
'jcsj/ubm/record/qt'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/views/basicData/organizationalManagement/edit.vue
View file @
ca91c78d
...
...
@@ -16,11 +16,16 @@
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"
责任人"
ref=
"
fzrid"
prop=
"type"
>
<el-form-item
label=
"
负责人"
ref=
"yb
fzrid"
prop=
"type"
>
<personSelector
:label=
"form.username||'暂无'"
@
selected=
'selected'
></personSelector>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"预备负责人"
ref=
"fzrid"
prop=
"type"
>
<personSelector
:label=
"form.ybfzrName||'暂无'"
@
selected=
'ybselected'
></personSelector>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"上级部门"
ref=
"pid"
prop=
"type"
>
<el-select
style=
"width: 100%;"
v-model=
"form.pid"
placeholder=
""
>
<el-option
v-for=
"(item,index) in bmList"
:key=
"item.id"
:label=
"item.bmmc"
:value=
"item.id"
></el-option>
...
...
@@ -65,6 +70,8 @@
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form
:
{
ybfzrName
:
''
,
ybfzrid
:
''
,
pid
:
''
,
bz
:
''
,
bmmc
:
''
,
...
...
@@ -74,11 +81,13 @@
rules
:
{
bmid
:
[{
required
:
true
,
trigger
:
'blur'
trigger
:
'blur'
,
message
:
'请输入部门编码'
},
],
bmmc
:
[{
required
:
true
,
trigger
:
'blur'
trigger
:
'blur'
,
message
:
'请输入部门名称'
}]
}
}
...
...
@@ -86,7 +95,10 @@
methods
:
{
selected
(
row
){
this
.
form
.
fzrid
=
row
.
id
}
},
ybselected
(
row
){
this
.
form
.
ybfzrid
=
row
.
id
}
}
}
...
...
src/views/basicData/organizationalManagement/index.vue
View file @
ca91c78d
...
...
@@ -8,12 +8,12 @@
<CopyButton
ref=
"copy"
:app=
'app'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'app'
></EditButton>
<FieldButton
:app=
'app'
></FieldButton>
<ExcelButton
:app=
'app'
></ExcelButton>
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
type=
'treeTable'
<TablePager
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
type=
'treeTable'
@
getRow=
'getRow'
>
<template
slot=
"tabCustom"
>
<el-table-column
label=
"启用/停用"
width=
"90"
header-align=
"center"
>
...
...
@@ -33,12 +33,12 @@
/* 引入需要的接口*/
import
{
QueryBm
,
QueryApptype
,
//
QueryApptype,
AddBm
,
DeleteBm
,
UpdateBm
,
qtBm
}
from
"
common/src/api/system/dmgSystem
.js"
;
}
from
"
@/api/basicData/organizationalManagement
.js"
;
/* edit页面*/
import
Edit
from
'./edit'
import
{
tableMixin
}
from
'common'
...
...
@@ -47,19 +47,7 @@
name
:
'appVersion'
,
/* 初始额外赋值*/
async
mounted
()
{
await
this
.
$asRun
(
[
QueryApptype
(),
res
=>
{
var
data
=
res
[
'data'
][
'records'
];
let
typeMap
=
[]
for
(
var
i
in
data
)
{
typeMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
this
.
systemType
=
data
this
.
typeMap
=
typeMap
}
]
)
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
data
()
{
...
...
@@ -68,7 +56,7 @@
/*需要的额外参数 */
typeMap
:
[],
systemType
:
[],
baseUrl
:
'
kzzx/
bm'
,
baseUrl
:
'
jcsj/u
bm'
,
/* 查询参数*/
queryParams
:
{},
/* 表格标题对应参数*/
...
...
@@ -87,6 +75,11 @@
label
:
'负责人'
,
width
:
'120'
},
{
prop
:
'ybfzrName'
,
label
:
'预备负责人'
,
width
:
'120'
},
{
prop
:
'tyrq'
,
label
:
'停用日期'
,
...
...
@@ -136,7 +129,7 @@
}
})
})
},
/* 基础查询*/
query
:
QueryBm
,
...
...
src/views/train/testPaper/index.vue
View file @
ca91c78d
...
...
@@ -50,7 +50,8 @@
this
.
subjectList
=
oList
.
map
(
item
=>
{
let
newobj
=
Object
.
create
({
}
)
newobj
.
id
=
item
.
id
newobj
.
score
=
item
.
score
||
'暂无分值'
newobj
.
ans
=
item
.
ans
newobj
.
score
=
item
.
score
||
2
newobj
.
type
=
type
[
item
.
type
]
newobj
.
subject
=
item
.
cont
||
'未设置问题'
newobj
.
options
=
Object
.
create
({
}
)
...
...
@@ -100,16 +101,21 @@
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
// this.$message(
{
// type: 'success',
// message: '试卷提交成功!'
//
}
);
/* 计算*/
let
sjdf
=
0
console
.
log
(
this
.
subjectList
)
this
.
$message
({
type
:
'success'
,
message
:
'试卷提交成功!'
}
);
this
.
subjectList
.
forEach
(
item
=>
{
/* 单选题*/
sjdf
++
}
)
this
.
$warning
(
`您获得了${sjdf
}
分!`
)
}
).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消'
}
);
}
);
}
}
,
...
...
src/views/train/testPaper/subject.vue
View file @
ca91c78d
<
template
>
<div
class=
"examMain"
>
<!-- 试题题目-->
<template
v-if=
"type!='TKT'"
>
<span>
{{
`${index
}
.`
}}
<
/span
>
<
span
>
{{
type
|
typeName
}}
<
/span
>
<
span
>
{{
subject
}}
{{
score
|
typeScore
}}
<
/span
>
<
br
>
<
/template
>
<!--
填空题
-->
<
template
v
-
if
=
"type=='TKT'"
>
<
span
>
{{
`${index
}
.`
}}
<
/span
>
<
span
>
{{
'TKT'
|
typeName
}}
<
/span
>
<
span
v
-
html
=
"transTKT(subject)"
><
/span><span>{{score|typeScore
}}
</
span
>
<
/template
>
<!--
答案选项
-->
<!--
单选
-->
<
div
v
-
if
=
"type=='DXT'"
class
=
"options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in options"
>
<
el
-
radio
v
-
model
=
"value"
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-radio
>
<template
v-if=
"type!='TKT'"
>
<span>
{{
`${index
}
.`
}}
<
/span
>
<
span
>
{{
type
|
typeName
}}
<
/span
>
<
span
>
{{
subject
}}
{{
score
|
typeScore
}}
<
/span
>
<
br
>
<
/template
>
<!--
填空题
-->
<
template
v
-
if
=
"type=='TKT'"
>
<
span
>
{{
`${index
}
.`
}}
<
/span
>
<
span
>
{{
'TKT'
|
typeName
}}
<
/span
>
<
span
v
-
html
=
"transTKT(subject)"
><
/span><span>{{score|typeScore
}}
</
span
>
<
/template
>
<!--
答案选项
-->
<!--
单选
-->
<
div
v
-
if
=
"type=='DXT'"
class
=
"options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in options"
>
<
el
-
radio
v
-
model
=
"value"
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-radio
>
<
/div
>
<
/div
>
<
/div
>
<!--
多选
--
>
<
div
v
-
if
=
"type=='DXTS'"
class
=
"
options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in options
"
>
<
el
-
checkbox
-
group
v
-
model
=
"valueList"
>
<
el
-
checkbox
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-checkbox
>
<
/el-checkbox-group
>
<!--
多选
--
>
<
div
v
-
if
=
"type=='DXTS'"
class
=
"options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in
options"
>
<
el
-
checkbox
-
group
v
-
model
=
"valueList
"
>
<
el
-
checkbox
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-checkbox
>
<
/el-checkbox-group
>
<
/div
>
<
/div
>
<
/div
>
<!--
判断题
-->
<
div
v
-
if
=
"type=='PDT'"
class
=
"options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in options"
>
<
el
-
radio
v
-
model
=
"value"
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-radio
>
<
/div
>
<
/div
>
<!--
判断题
-->
<
div
v
-
if
=
"type=='PDT'"
class
=
"options"
>
<
div
class
=
"item"
:
key
=
"index"
v
-
for
=
"(item,index) in options"
>
<
el
-
radio
v
-
model
=
"value"
:
label
=
"index"
>
{{
`${index
}
.${item
}
`
}}
<
/el-radio
>
<
/div
>
<
/div
>
<!--
答案显示
-->
<!--
<
br
>
<
span
>
结果
:
错误
<
/span
>
<
br
>
<
span
>
本题答案是
:
A
,
B
,
C
<
/span
>
<
br
>
<
span
>
答案解析
:
钝角
<
/span> --
>
<
/div
>
<
/template
>
<
script
>
export
default
{
export
default
{
updated
()
{
if
(
this
.
type
==
'DXTS'
){
this
.
app
.
subjectList
[
this
.
index
-
1
].
value
=
this
.
valueList
}
else
{
this
.
app
.
subjectList
[
this
.
index
-
1
].
value
=
this
.
value
if
(
this
.
type
==
'DXTS'
)
{
let
valueList
=
_
.
cloneDeep
(
this
.
valueList
)
this
.
app
.
subjectList
[
this
.
index
-
1
].
value
=
valueList
.
sort
((
s1
,
s2
)
=>
{
let
a1
=
s1
.
toUpperCase
();
let
a2
=
s2
.
toUpperCase
();
if
(
a1
<
a2
)
{
return
-
1
;
}
if
(
a1
>
a2
)
{
return
1
;
}
return
0
;
}
).
join
(
','
)
/* 排序*/
}
else
{
this
.
app
.
subjectList
[
this
.
index
-
1
].
value
=
this
.
value
}
}
,
mounted
()
{
this
.
type
==
'TKT'
&&
$
(
this
.
$el
).
find
(
'[name=tktinput]'
).
change
(
e
=>
{
this
.
value
=
$
(
this
.
$el
).
find
(
'[name=tktinput]'
).
val
()
||
''
this
.
app
.
subjectList
[
this
.
index
-
1
].
value
=
this
.
value
}
)
this
.
type
==
'TKT'
&&
$
(
this
.
$el
).
find
(
'[name=tktinput]'
).
change
(
e
=>
{
this
.
value
=
$
(
this
.
$el
).
find
(
'[name=tktinput]'
).
val
()
||
''
this
.
app
.
subjectList
[
this
.
index
-
1
].
value
=
this
.
value
}
)
}
,
props
:{
app
:{
type
:
Object
,
default
:
()
=>
{
props
:
{
app
:
{
type
:
Object
,
default
:
()
=>
{
return
{
}
}
}
,
index
:{
default
:
1
index
:
{
default
:
1
}
,
subject
:{
type
:
String
,
default
:
'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
subject
:
{
type
:
String
,
default
:
'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
}
,
score
:{
type
:
String
,
default
:
'2'
score
:
{
//
type:String,
default
:
'2'
}
,
type
:{
type
:
String
,
default
:
'DXT'
type
:
{
type
:
String
,
default
:
'DXT'
}
,
options
:{
type
:
Object
,
default
:
()
=>
{
return
{
A
:
'1个'
,
B
:
'2个'
,
C
:
'3个'
,
D
:
'4个'
options
:
{
type
:
Object
,
default
:
()
=>
{
return
{
A
:
'1个'
,
B
:
'2个'
,
C
:
'3个'
,
D
:
'4个'
}
}
}
}
,
data
(){
return
{
value
:
''
,
valueList
:[],
data
()
{
return
{
value
:
''
,
valueList
:
[],
}
}
,
methods
:{
transTKT
(
val
,
fn
)
{
methods
:
{
transTKT
(
val
,
fn
)
{
let
nval
let
template
=
`<input type='text' name='tktinput' class='tktinput'>`
let
template
=
`<input type='text' name='tktinput' class='tktinput'>`
/* 判断有无()*/
val
.
indexOf
(
'()'
)
==-
1
?(
nval
=
val
+
template
):(
nval
=
val
.
replace
(
'()'
,
template
))
val
.
indexOf
(
'()'
)
==
-
1
?
(
nval
=
val
+
template
)
:
(
nval
=
val
.
replace
(
'()'
,
template
))
return
nval
}
}
,
filters
:{
typeName
(
val
){
let
typeArry
=
{
'DXT'
:
'(单选题)'
,
'DXTS'
:
'(多选题)'
,
'TKT'
:
'(填空题)'
,
'PDT'
:
'(判断题)'
filters
:
{
typeName
(
val
)
{
let
typeArry
=
{
'DXT'
:
'(单选题)'
,
'DXTS'
:
'(多选题)'
,
'TKT'
:
'(填空题)'
,
'PDT'
:
'(判断题)'
}
let
nval
=
typeArry
[
val
]
return
nval
||
'其他'
let
nval
=
typeArry
[
val
]
return
nval
||
'其他'
}
,
typeScore
(
val
){
let
nval
=
`(${val
}
分)`
typeScore
(
val
)
{
let
nval
=
`(${val
}
分)`
return
nval
}
}
...
...
@@ -123,42 +144,49 @@
<
/script
>
<
style
lang
=
"scss"
scope
>
.
el
-
radio__label
{
font
-
size
:
13
px
;
color
:
rgb
(
119
,
119
,
119
);
}
input
{
.
el
-
radio__label
{
font
-
size
:
13
px
;
color
:
rgb
(
119
,
119
,
119
);
}
input
{
border
:
none
;
outline
:
none
;
}
input
:
focus
{
border
:
none
;
input
:
focus
{
border
:
none
;
}
.
tktinput
:
focus
{
border
:
0
px
;
border
-
bottom
:
1
px
solid
#
eee
;
}
.
tktinput
:
focus
{
border
:
0
px
;
border
-
bottom
:
1
px
solid
#
eee
;
}
.
tktinput
{
.
tktinput
{
border
:
0
px
;
border
-
bottom
:
1
px
solid
#
eee
;
color
:
#
888
;
}
.
examMain
{
margin
-
top
:
30
px
;
height
:
100
%
;
width
:
100
%
;
font
-
size
:
14
px
;
overflow
:
auto
;
.
options
{
padding
:
10
px
;
.
examMain
{
margin
-
top
:
30
px
;
height
:
100
%
;
width
:
100
%
;
display
:
flex
;
flex
-
wrap
:
wrap
;
.
item
{
padding
-
left
:
20
%
;
width
:
50
%
;
line
-
height
:
20
px
;
font
-
size
:
14
px
;
overflow
:
auto
;
.
options
{
padding
:
10
px
;
width
:
100
%
;
display
:
flex
;
flex
-
wrap
:
wrap
;
.
item
{
padding
-
left
:
20
%
;
width
:
50
%
;
line
-
height
:
20
px
;
}
}
}
}
<
/style
>
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