Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
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
中汽测评-信息安全测评系统
web
Commits
94cea086
Commit
94cea086
authored
Dec 19, 2023
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(全局): preitter格式化src
parent
5fe548dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
250 additions
and
19 deletions
+250
-19
index.js
mock/index.js
+9
-9
task.js
mock/task.js
+28
-0
main.js
src/main.js
+5
-4
index.vue
src/views/processing/unprocessed-review/index.vue
+208
-6
No files found.
mock/index.js
View file @
94cea086
const
Mock
=
require
(
'mockjs'
)
const
Mock
=
require
(
'mockjs'
)
const
{
param2Obj
}
=
require
(
'./utils'
)
const
{
param2Obj
}
=
require
(
'./utils'
)
const
task
=
require
(
'./task'
)
const
user
=
require
(
'./user'
)
const
user
=
require
(
'./user'
)
const
role
=
require
(
'./role'
)
const
role
=
require
(
'./role'
)
const
article
=
require
(
'./article'
)
const
article
=
require
(
'./article'
)
const
search
=
require
(
'./remote-search'
)
const
search
=
require
(
'./remote-search'
)
const
mocks
=
[
const
mocks
=
[...
task
]
...
user
,
...
role
,
...
article
,
...
search
]
// for front mock
// for front mock
// please use it cautiously, it will redefine XMLHttpRequest,
// please use it cautiously, it will redefine XMLHttpRequest,
...
@@ -20,7 +16,7 @@ function mockXHR() {
...
@@ -20,7 +16,7 @@ function mockXHR() {
// mock patch
// mock patch
// https://github.com/nuysoft/Mock/issues/300
// https://github.com/nuysoft/Mock/issues/300
Mock
.
XHR
.
prototype
.
proxy_send
=
Mock
.
XHR
.
prototype
.
send
Mock
.
XHR
.
prototype
.
proxy_send
=
Mock
.
XHR
.
prototype
.
send
Mock
.
XHR
.
prototype
.
send
=
function
()
{
Mock
.
XHR
.
prototype
.
send
=
function
()
{
if
(
this
.
custom
.
xhr
)
{
if
(
this
.
custom
.
xhr
)
{
this
.
custom
.
xhr
.
withCredentials
=
this
.
withCredentials
||
false
this
.
custom
.
xhr
.
withCredentials
=
this
.
withCredentials
||
false
...
@@ -32,7 +28,7 @@ function mockXHR() {
...
@@ -32,7 +28,7 @@ function mockXHR() {
}
}
function
XHR2ExpressReqWrap
(
respond
)
{
function
XHR2ExpressReqWrap
(
respond
)
{
return
function
(
options
)
{
return
function
(
options
)
{
let
result
=
null
let
result
=
null
if
(
respond
instanceof
Function
)
{
if
(
respond
instanceof
Function
)
{
const
{
body
,
type
,
url
}
=
options
const
{
body
,
type
,
url
}
=
options
...
@@ -50,7 +46,11 @@ function mockXHR() {
...
@@ -50,7 +46,11 @@ function mockXHR() {
}
}
for
(
const
i
of
mocks
)
{
for
(
const
i
of
mocks
)
{
Mock
.
mock
(
new
RegExp
(
i
.
url
),
i
.
type
||
'get'
,
XHR2ExpressReqWrap
(
i
.
response
))
Mock
.
mock
(
new
RegExp
(
i
.
url
),
i
.
type
||
'get'
,
XHR2ExpressReqWrap
(
i
.
response
)
)
}
}
}
}
...
...
mock/task.js
0 → 100644
View file @
94cea086
/**
* 参考https://github.com/nuysoft/Mock/wiki/Syntax-Specification
* */
module
.
exports
=
[
// get tasklist
{
url
:
'/tasklist'
,
type
:
'get'
,
response
:
config
=>
{
const
temp
=
[]
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
temp
.
push
({
startTime
:
'@date'
,
missionNo
:
'@word'
,
tit
:
'一汽丰田体系审查'
,
owener
:
'@cname'
,
'costTime|0-12'
:
1
,
'progress|0-100'
:
1
})
}
return
{
rows
:
temp
,
code
:
200
,
total
:
10
}
}
}
]
src/main.js
View file @
94cea086
...
@@ -48,10 +48,11 @@ import VueMeta from 'vue-meta'
...
@@ -48,10 +48,11 @@ import VueMeta from 'vue-meta'
import
DictData
from
'@/components/DictData'
import
DictData
from
'@/components/DictData'
import
TalkItem
from
'@/components/TalkItem'
import
TalkItem
from
'@/components/TalkItem'
// if (process.env.NODE_ENV === 'production') {
// 使用mock模拟接口调用
// const { mockXHR } = require('../mock')
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
// mockXHR()
const
{
mockXHR
}
=
require
(
'../mock'
)
// }
mockXHR
()
}
// 全局方法挂载
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getDicts
=
getDicts
...
...
src/views/processing/unprocessed-review/index.vue
View file @
94cea086
<
template
>
<
template
>
<!--待办审查平台页面-->
<page-standard>
<div>
待办审查平台页面
</div>
<div
slot=
"tab"
>
<el-radio-group
v-model=
"queryParams.type"
>
<el-radio-button
v-for=
"dict in dict.type.sys_detailed_classification"
:key=
"dict.value"
:label=
"dict.value"
>
{{
dict
.
label
}}
</el-radio-button>
</el-radio-group>
</div>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
>
<el-form-item
prop=
"status"
>
<el-input
v-model=
"queryParams.deptName"
placeholder=
"输入搜索关键词"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
prop=
"status"
>
<el-date-picker
v-model=
"queryParams.deptName"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择任务状态"
clearable
>
<el-option
v-for=
"dict in dict.type.sys_job_status"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
查询
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-card
v-for=
"(item, index) in tableData"
:key=
"index"
class=
"box-card"
>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
<i
class=
"el-icon-timer"
></i>
开始时间
</div>
<div
class=
"cell-value"
>
{{
item
.
startTime
?
item
.
startTime
:
'---'
}}
</div>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
任务编号
</div>
<div
class=
"cell-value"
>
{{
item
.
missionNo
?
item
.
missionNo
:
'---'
}}
</div>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
任务名称
</div>
<div
class=
"cell-value"
>
{{
item
.
tit
?
item
.
tit
:
'---'
}}
</div>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
任务组长
</div>
<div
class=
"cell-value"
>
<i
class=
"el-icon-user"
></i>
{{
item
.
owener
?
item
.
owener
:
'---'
}}
</div>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
任务状态
</div>
<div
v-if=
"item.costTime === 0"
class=
"cell-value"
>
未开始
</div>
<div
v-else
class=
"cell-value yellow"
>
已耗时(
{{
item
.
costTime
}}
小时)
</div>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
审查问卷
</div>
<div
class=
"cell-value"
>
<el-link
type=
"primary"
>
填写问卷
</el-link>
</div>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
>
完成进度
</div>
<el-progress
class=
"cell-progress"
:stroke-width=
"12"
:percentage=
"item.progress"
></el-progress>
</div>
<div
class=
"card-cell"
>
<div
class=
"cell-lable"
></div>
<div
class=
"cell-value"
>
<el-button
type=
"primary"
icon=
"el-icon-arrow-right"
circle
title=
"任务详情"
></el-button>
<el-button
type=
"warning"
icon=
"el-icon-s-promotion"
circle
title=
"移交任务"
></el-button>
<el-button
type=
"success"
icon=
"el-icon-s-management"
circle
title=
"预览报告"
></el-button>
<el-button
type=
"success"
icon=
"el-icon-document"
circle
title=
"预览企业留档文件"
></el-button>
<el-button
type=
"success"
icon=
"el-icon-folder"
circle
title=
"车企文件库"
></el-button>
<el-button
type=
"danger"
icon=
"el-icon-video-play"
circle
title=
"开始"
></el-button>
</div>
</div>
</el-card>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.size"
@
pagination=
"loadData"
>
</pagination>
</page-standard>
</
template
>
</
template
>
<!--js逻辑-->
<
script
>
<
script
>
import
page
from
'@/mixins/page'
export
default
{
export
default
{
dicts
:
[
'sys_job_status'
,
'sys_scene_type'
,
'sys_detailed_classification'
],
mixins
:
[
page
],
data
()
{
data
()
{
return
{}
return
{
listUrl
:
'/tasklist'
,
showSearch
:
true
,
tableData
:
[]
}
},
},
watch
:
{},
methods
:
{}
methods
:
{}
}
}
</
script
>
</
script
>
<!--ui样式-->
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
></
style
>
.card-cell
{
color
:
rgb
(
153
,
153
,
153
);
height
:
80px
;
display
:
flex
;
flex-direction
:
column
;
flex-wrap
:
nowrap
;
align-items
:
flex-start
;
justify-content
:
space-around
;
}
.box-card
{
margin-bottom
:
30px
;
::v-deep
.el-card__body
{
display
:
flex
;
justify-content
:
space-between
;
}
::v-deep
.el-link.is-underline
:after
{
content
:
''
;
position
:
absolute
;
left
:
0
;
right
:
0
;
height
:
0
;
bottom
:
0
;
border-bottom
:
1px
solid
#1890ff
;
}
.cell-progress
{
width
:
200px
;
}
.cell-value.yellow
{
color
:
#fea623
;
}
}
</
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