Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
police-bigdata-vue-all
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
Tian
police-bigdata-vue-all
Commits
b5dc83cf
Commit
b5dc83cf
authored
Dec 28, 2022
by
T
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
借领申请bug修复
parent
3437c56d
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
298 行增加
和
12 行删除
+298
-12
App.vue
src/App.vue
+2
-3
form.vue
src/views/warehouse/borrow/apply/form.vue
+4
-4
addPoliceForm.vue
src/views/warehouse/receive/apply/addPoliceForm.vue
+287
-0
form.vue
src/views/warehouse/receive/apply/form.vue
+4
-4
index.vue
src/views/warehouse/usingReport/index.vue
+1
-1
没有找到文件。
src/App.vue
View file @
b5dc83cf
...
...
@@ -37,7 +37,7 @@ export default {
checkTimeout
()
{
// 登录页面不监听
if
(
this
.
timeOut
&&
this
.
$router
.
currentRoute
.
path
===
'/login'
)
{
console
.
log
(
this
.
$router
.
currentRoute
.
path
)
//
console.log(this.$router.currentRoute.path)
this
.
setLastTime
();
// console.log('不监听')
}
...
...
@@ -49,7 +49,6 @@ export default {
//判断是否超时
if
(
currentTime
-
lastTime
>
this
.
timeOut
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'登录状态已过期或超过30分钟未操作,需重新登录'
})
console
.
log
(
'登录状态已过期或超过30分钟未操作,需重新登录'
)
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
...
...
@@ -76,7 +75,7 @@ export default {
this
.
$nextTick
(
function
()
{
//setInterval(this.checkTimeout, 30000);
setInterval
(
this
.
checkTimeout
,
15
*
60
*
1000
);
console
.
log
(
'
调用
检查时间'
)
console
.
log
(
'检查时间'
)
})
// 页面监听 按下鼠标更新操作时间
window
.
onload
=
function
()
{
...
...
src/views/warehouse/borrow/apply/form.vue
View file @
b5dc83cf
...
...
@@ -318,7 +318,7 @@
>
</div>
<!-- 表单组件-引用新增警员页面 -->
<eForm
ref=
"f
orm"
:is-add=
"isAdd"
@
ok=
"handeleInit"
/>
<pForm
ref=
"addPoliceF
orm"
:is-add=
"isAdd"
@
ok=
"handeleInit"
/>
</el-dialog>
</template>
...
...
@@ -330,7 +330,7 @@ import { getProcess, getAllProcess } from "@/api/process";
import
{
getPagePoliceman
}
from
"@/api/policeman"
;
import
{
deleteTxt
,
addTxt
,
getListTxt
}
from
"@/api/policeman"
;
import
cnchar
from
"cnchar"
;
import
eForm
from
'@/views/base/person/f
orm'
import
pForm
from
'@/views/warehouse/receive/apply/addPoliceF
orm'
export
default
{
props
:
{
isAdd
:
{
...
...
@@ -338,7 +338,7 @@ export default {
required
:
true
,
},
},
components
:
{
e
Form
},
components
:
{
p
Form
},
data
()
{
return
{
loading
:
false
,
...
...
@@ -640,7 +640,7 @@ export default {
//添加警员
addPoliceForm
()
{
this
.
isAdd
=
true
const
_this
=
this
.
$refs
.
f
orm
const
_this
=
this
.
$refs
.
addPoliceF
orm
_this
.
initOrg
()
_this
.
initCabinets
(
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
)
_this
.
dialog
=
true
...
...
src/views/warehouse/receive/apply/addPoliceForm.vue
0 → 100644
View file @
b5dc83cf
<
template
>
<el-dialog
:append-to-body=
"true"
:close-on-click-modal=
"false"
:before-close=
"cancel"
:visible
.
sync=
"dialog"
:title=
"isAdd ? '新增警员信息' : '编辑警员信息'"
width=
"600px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-form-item
label=
"组织机构"
prop=
"orgizationCode"
>
<el-cascader
v-model=
"form.orgizationCode"
:options=
"orgs"
filterable
:props=
"
{ value: 'id', label: 'name', checkStrictly: true, emitPath: false }"
clearable :show-all-levels="false" class="filter-item" style="width: 370px;" placeholder="请选择组织机构" @change="orgChange"/>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model
.
trim=
"form.name"
style=
"width: 370px;"
placeholder=
"请输入姓名"
/>
</el-form-item>
<el-form-item
label=
"警员编号"
prop=
"policeCode"
>
<el-input
v-model=
"form.policeCode"
style=
"width: 370px;"
placeholder=
"请输入警员编号"
/>
</el-form-item>
<el-form-item
label=
"性别"
>
<el-radio
v-model=
"form.sex"
label=
"男"
border
>
男
</el-radio>
<el-radio
v-model=
"form.sex"
label=
"女"
border
>
女
</el-radio>
</el-form-item>
<el-form-item
label=
"同步生成账号"
>
<el-radio
v-model=
"form.isCreatedAccount"
:label=
"true"
border
>
是
</el-radio>
<el-radio
v-model=
"form.isCreatedAccount"
:label=
"false"
border
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"账号名"
prop=
"account"
v-show=
"accountShow"
>
<el-input
v-model
.
trim=
"form.account"
style=
"width: 370px;"
placeholder=
"请输入账号名"
/>
</el-form-item>
<el-form-item
label=
"联系电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
style=
"width: 370px;"
placeholder=
"请输入联系电话"
/>
</el-form-item>
<el-form-item
label=
"身份证号"
>
<el-input
v-model=
"form.idCardNo"
style=
"width: 370px;"
placeholder=
"请输入身份证号"
/>
</el-form-item>
<el-form-item
label=
"单警柜"
>
<el-select
v-model=
"form.cabinetId"
filterable
clearable
placeholder=
"请选择单警柜"
style=
"width: 370px;"
ref=
"select"
>
<el-option-group
v-for=
"group in cabinets"
:key=
"group.label"
:label=
"group.label"
>
<el-option
v-for=
"item in group.options"
:key=
"item.cabinetId"
:label=
"item.cabinetChildNum"
:value=
"item.cabinetId"
:disabled=
"item.name !== null"
>
<span
style=
"float: left;margin-left: 10px"
>
{{
item
.
cabinetChildNum
}}
</span>
<span
style=
"float: right; color: #8492a6; font-size: 13px"
>
{{
item
.
name
}}
</span>
</el-option>
</el-option-group>
</el-select>
</el-form-item>
<el-form-item
label=
"人脸图片"
>
<el-upload
class=
"avatar-uploader"
:action=
"baseApi2+'/api/Policeman/FileUp'"
:show-file-list=
"false"
:on-success=
"handleSuccess"
:before-upload=
"beforeUpload"
>
<img
v-if=
"form.photo"
:src=
"encodeURI(baseApi2 + form.photo)"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
type=
"info"
plain
>
关闭
</el-button>
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"doSubmit"
>
确认
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
addOrUpdatePoliceman
}
from
'@/api/policeman'
import
{
getCabinetListPeople
}
from
'@/api/cabinet'
import
{
getListOrg
}
from
'@/api/org'
export
default
{
props
:
{
isAdd
:
{
type
:
Boolean
,
required
:
true
}
},
computed
:
{
...
mapGetters
([
'baseApi2'
])
},
data
()
{
const
validPhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
callback
(
new
Error
(
'请输入电话号码'
))
}
else
if
(
!
this
.
isvalidPhone
(
value
))
{
callback
(
new
Error
(
'请输入正确的11位手机号码'
))
}
else
{
callback
()
}
}
const
validPoliceCode
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
callback
(
new
Error
(
'请输入警员编号'
))
}
else
if
(
value
==
'000000'
)
{
callback
(
new
Error
(
'该警员编号已被占用!'
))
}
else
{
callback
()
}
}
return
{
loading
:
false
,
dialog
:
false
,
cabinets
:[],
orgs
:
[],
accountShow
:
false
,
form
:
{
id
:
''
,
name
:
''
,
orgizationCode
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
policeCode
:
''
,
sex
:
'男'
,
isCreatedAccount
:
false
,
photo
:
''
,
phone
:
''
,
idCardNo
:
''
,
cabinetId
:
''
,
updateUser
:
this
.
$store
.
state
.
user
.
user
.
id
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'请输入警员名称'
,
trigger
:
'blur'
}
],
policeCode
:
[
{
required
:
true
,
trigger
:
'blur'
,
validator
:
validPoliceCode
}
],
phone
:
[
{
required
:
true
,
trigger
:
'blur'
,
validator
:
validPhone
}
],
orgizationCode
:
[
{
required
:
true
,
message
:
'请选择组织机构'
,
trigger
:
'请选择组织机构'
}
]
}
}
},
methods
:
{
cancel
()
{
this
.
resetForm
()
},
doSubmit
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
loading
=
true
if
(
this
.
isAdd
)
{
this
.
doAdd
()
}
else
this
.
doEdit
()
}
})
},
doAdd
()
{
addOrUpdatePoliceman
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
'10000'
)
{
this
.
resetForm
()
this
.
$notify
({
title
:
'添加成功'
,
type
:
'success'
,
duration
:
2500
})
this
.
$emit
(
'ok'
)
}
else
{
this
.
$message
.
error
(
res
.
msg
)
this
.
accountShow
=
true
}
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
// console.log(err.response.data.message)
})
},
doEdit
()
{
addOrUpdatePoliceman
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
'10000'
)
{
this
.
resetForm
()
this
.
$notify
({
title
:
'修改成功'
,
type
:
'success'
,
duration
:
2500
})
this
.
$emit
(
'ok'
)
}
else
{
this
.
$message
.
error
(
res
.
msg
)
this
.
accountShow
=
true
}
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
console
.
log
(
err
.
response
.
data
.
message
)
})
},
resetForm
()
{
this
.
dialog
=
false
this
.
$refs
[
'form'
].
resetFields
()
this
.
form
=
{
id
:
''
,
name
:
''
,
orgizationCode
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
policeCode
:
''
,
sex
:
'男'
,
isCreatedAccount
:
false
,
photo
:
''
,
phone
:
''
,
isCardNo
:
''
,
cabinetId
:
''
,
updateUser
:
this
.
$store
.
state
.
user
.
user
.
id
}
this
.
accountShow
=
false
},
initCabinets
(
organizationId
)
{
getCabinetListPeople
({
organizationId
:
organizationId
}).
then
(
res
=>
{
if
(
res
.
code
===
"10000"
)
{
this
.
cabinets
=
res
.
data
}
else
{
this
.
$message
.
error
(
res
.
msg
)
}
})
},
initOrg
()
{
const
params
=
{
id
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
}
getListOrg
(
params
).
then
(
res
=>
{
this
.
orgs
=
res
.
data
})
},
orgChange
()
{
this
.
form
.
cabinetId
=
''
this
.
cabinets
=
[]
this
.
initCabinets
(
this
.
form
.
orgizationCode
)
},
isvalidPhone
(
str
)
{
const
reg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-3,5-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-3,5-9
])\d{8}
$/
return
reg
.
test
(
str
)
},
isvalidNumber
(
str
)
{
const
reg
=
/^
(
0|
[
0-9
][
0-9
]
*
)
$/
return
reg
.
test
(
str
)
},
handleSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
code
===
"10000"
)
{
this
.
form
.
photo
=
res
.
data
.
filePath
}
else
{
this
.
$message
.
warning
(
res
.
msg
);
}
},
beforeUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
;
const
isLt2M
=
file
.
size
/
1024
<
200
;
if
(
!
isJPG
)
{
this
.
$message
.
warning
(
'上传头像图片只能是 JPG或者PNG 格式!'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 200KB!'
);
}
return
isJPG
&&
isLt2M
;
},
open
()
{
this
.
$refs
.
select
.
blur
()
},
}
}
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
/
deep
/
.el-input-number
.el-input__inner
{
text-align
:
left
;
}
/
deep
/
.el-select-group__title
{
padding-left
:
20px
;
font-size
:
15px
;
color
:
#909399
;
line-height
:
30px
;
}
/
deep
/
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
/
deep
/
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409EFF
;
}
/
deep
/
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
178px
;
height
:
178px
;
line-height
:
178px
;
text-align
:
center
;
}
/
deep
/
.avatar
{
width
:
160px
;
height
:
200px
;
display
:
block
;
}
</
style
>
src/views/warehouse/receive/apply/form.vue
View file @
b5dc83cf
...
...
@@ -179,7 +179,7 @@
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"doSubmit"
v-if=
"!form.flowState"
>
确认
</el-button>
</div>
<!-- 表单组件-引用新增警员页面 -->
<
eForm
ref=
"f
orm"
:is-add=
"isAdd"
@
ok=
"handeleInit"
/>
<
pForm
ref=
"addPoliceF
orm"
:is-add=
"isAdd"
@
ok=
"handeleInit"
/>
</el-dialog>
</template>
...
...
@@ -190,7 +190,7 @@ import { addAndApprovalBorrowOrder } from '@/api/borrow'
import
{
getAllInventoryList
}
from
'@/api/inventory'
import
{
deleteTxt
,
addTxt
,
getListTxt
,
getPagePoliceman
}
from
'@/api/policeman'
import
cnchar
from
"cnchar"
;
import
eForm
from
'@/views/base/person/f
orm'
import
pForm
from
'./addPoliceF
orm'
export
default
{
props
:
{
isAdd
:
{
...
...
@@ -198,7 +198,7 @@ export default {
required
:
true
}
},
components
:
{
e
Form
},
components
:
{
p
Form
},
computed
:
{
...
mapGetters
([
'baseApi2'
...
...
@@ -346,7 +346,7 @@ export default {
//添加警员
addPoliceForm
()
{
this
.
isAdd
=
true
const
_this
=
this
.
$refs
.
f
orm
const
_this
=
this
.
$refs
.
addPoliceF
orm
_this
.
initOrg
()
_this
.
initCabinets
(
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
)
_this
.
dialog
=
true
...
...
src/views/warehouse/usingReport/index.vue
View file @
b5dc83cf
...
...
@@ -91,7 +91,7 @@ export default {
return
{
orgId
:
this
.
$store
.
state
.
user
.
user
.
baseJpOrganization
.
id
,
equData
:
[],
// date: ['2020-
01-01', '2022-08-0
8'],
// date: ['2020-
12-21', '2022-12-2
8'],
date
:
[
new
Date
().
getFullYear
()
+
"-01-01"
,
parseTimes
(
new
Date
())],
orgList
:
[],
equipmentCode
:
''
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论