Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_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
胡宝山
template_vue
Commits
0949ba1a
Commit
0949ba1a
authored
Jul 29, 2023
by
kzy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'project1' of
http://gitlab.91isoft.com:90/yangshuo/template_vue
into project1
parents
3ad81d82
852e93e0
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
577 additions
and
769 deletions
+577
-769
application.js
src/api/equipment/application.js
+20
-0
basicInfo.js
src/api/equipment/basicInfo.js
+8
-39
sampleType.js
src/api/sample/sampleType.js
+48
-0
application.vue
src/views/equipment/application.vue
+124
-456
basicInfo.vue
src/views/equipment/basicInfo.vue
+37
-80
draw.vue
src/views/equipment/draw.vue
+5
-3
login.vue
src/views/login/login.vue
+14
-14
draw.vue
src/views/processManagement/draw.vue
+5
-3
index.vue
src/views/processManagement/inventoryRecord/index.vue
+64
-46
index.vue
src/views/sample/sampleType/index.vue
+114
-30
index.vue
src/views/system/dept/index.vue
+134
-96
index.vue
src/views/system/role/index.vue
+3
-1
index.vue
src/views/system/user/index.vue
+1
-1
No files found.
src/api/equipment/application.js
0 → 100644
View file @
0949ba1a
import
request
from
'@/utils/request'
// 根据key值查询数据字典数据
export
function
getDictData
(
params
)
{
return
request
({
url
:
'/wbapply/queryDict'
,
method
:
'get'
,
params
})
}
// 新增设备新增
export
function
addApplication
(
data
)
{
return
request
({
url
:
'/wbapply/add'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
src/api/equipment/basicInfo.js
View file @
0949ba1a
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
import
Qs
from
'qs'
// 查询基础信息列表
// 查询基础信息列表
export
function
listBasicInfo
(
query
)
{
export
function
listBasicInfo
(
query
)
{
return
request
({
return
request
({
...
@@ -8,57 +7,27 @@ export function listBasicInfo(query) {
...
@@ -8,57 +7,27 @@ export function listBasicInfo(query) {
params
:
query
params
:
query
})
})
}
}
export
function
getlistRole
()
{
return
request
({
url
:
'system/role/listAll'
,
method
:
'get'
})
}
// 查询角色详细
export
function
getRole
(
businessId
)
{
return
request
({
url
:
'/system/role/detail/'
+
businessId
,
method
:
'get'
})
}
// 新增角色
// 新增设备基本信息
export
function
addRole
(
data
)
{
export
function
add
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
return
request
({
url
:
'/
system/role
/add'
,
url
:
'/
wbbaseinfo
/add'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
,
data
:
data
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 修改角色
export
function
updateRole
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/system/role/update/'
+
businessId
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
})
})
}
}
// 角色数据权限
// 修改基础信息接口
export
function
dataScope
(
data
)
{
export
function
updataInfo
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
return
request
({
url
:
'/
system/role/dataScop
e'
,
url
:
'/
wbbaseinfo/updat
e'
,
method
:
'put'
,
method
:
'put'
,
data
,
data
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/
x-www-form-urlencoded
'
'Content-Type'
:
'application/
json;charset=UTF-8
'
}
}
})
})
}
}
...
...
src/api/sample/sampleType.js
0 → 100644
View file @
0949ba1a
import
request
from
'@/utils/request'
// 查询列表
export
function
queryList
(
params
)
{
return
request
({
url
:
'/wbchemistrymapping/queryWbChemistryMappingByPagination'
,
method
:
'get'
,
params
})
}
// 添加基础信息接口
export
function
add
(
data
)
{
return
request
({
url
:
'/wbchemistrymapping/add'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 根据id查询基础信息接口
export
function
getDetailById
(
id
)
{
return
request
({
url
:
'/wbchemistrymapping/detail/'
+
id
,
method
:
'get'
})
}
// 编辑基础信息接口
export
function
updataInfo
(
data
)
{
return
request
({
url
:
'/wbchemistrymapping/update'
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 逻辑删除基础信息接口
export
function
deleteLogical
(
id
)
{
return
request
({
url
:
'/wbchemistrymapping/deleteLogical/'
+
id
,
method
:
'delete'
})
}
src/views/equipment/application.vue
View file @
0949ba1a
This diff is collapsed.
Click to expand it.
src/views/equipment/basicInfo.vue
View file @
0949ba1a
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
<div
style=
"float: right;padding:3px 15px;"
>
<div
style=
"float: right;padding:3px 15px;"
>
<el-button
<el-button
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<div
class=
"placeholder"
/>
<div
class=
"placeholder"
/>
<div
style=
"padding:5px 10px"
>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
设备基本信息列表
</div>
<div
class=
"mb12 font-small-bold"
>
设备基本信息列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"basicInfoList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
border
:data=
"basicInfoList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
>
<el-table-column
label=
"pn"
prop=
"pn"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -73,7 +73,8 @@
...
@@ -73,7 +73,8 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"psm"
prop=
"psm"
>
<el-table-column
label=
"psm"
prop=
"psm"
>
...
@@ -123,7 +124,7 @@
...
@@ -123,7 +124,7 @@
/>
/>
<!-- 添加或修改设备基本信息配置对话框 -->
<!-- 添加或修改设备基本信息配置对话框 -->
<el-dialog
title=
"设备基本信息"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
@
close=
"cancel"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
v-model
.
trim=
"form.pn"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入pn"
/>
<el-input
v-model
.
trim=
"form.pn"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入pn"
/>
...
@@ -132,10 +133,10 @@
...
@@ -132,10 +133,10 @@
<el-input
v-model
.
trim=
"form.ptype"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入ptype"
/>
<el-input
v-model
.
trim=
"form.ptype"
show-word-limit
:maxlength=
"30"
placeholder=
"请输入ptype"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"pgx"
prop=
"pgx"
>
<el-form-item
label=
"pgx"
prop=
"pgx"
>
<el-input
-number
v-model=
"form.pgx"
style=
"width: 100%"
controls-position=
"right"
:min=
"
0"
placeholder=
"请输入pgx"
/>
<el-input
v-model
.
trim=
"form.pgx"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入pgx"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"prank"
prop=
"prank"
>
<el-form-item
label=
"prank"
prop=
"prank"
>
<el-input
-number
v-model=
"form.prank"
style=
"width: 100%"
controls-position=
"right"
:min=
"
0"
placeholder=
"请输入prank"
/>
<el-input
v-model
.
trim=
"form.prank"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入prank"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"pissb"
prop=
"pissb"
>
<el-form-item
label=
"pissb"
prop=
"pissb"
>
<el-select
<el-select
...
@@ -154,10 +155,10 @@
...
@@ -154,10 +155,10 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"psm"
prop=
"psm"
>
<el-form-item
label=
"psm"
prop=
"psm"
>
<el-input
-number
v-model=
"form.psm"
style=
"width: 100%"
controls-position=
"right"
:min=
"
0"
placeholder=
"请输入psm"
/>
<el-input
v-model
.
trim=
"form.psm"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入psm"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"psy"
prop=
"psy"
>
<el-form-item
label=
"psy"
prop=
"psy"
>
<el-input
-number
v-model=
"form.psy"
style=
"width: 100%"
controls-position=
"right"
:min=
"
0"
placeholder=
"请输入psy"
/>
<el-input
v-model
.
trim=
"form.psy"
show-word-limit
:maxlength=
"3
0"
placeholder=
"请输入psy"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -169,20 +170,8 @@
...
@@ -169,20 +170,8 @@
</template>
</template>
<
script
>
<
script
>
// import {
import
{
add
,
listBasicInfo
,
updataInfo
}
from
'@/api/equipment/basicInfo'
// addRole,
import
{
parseTime
}
from
'@/utils'
// changeRoleStatus,
// dataScope,
// delRole,
// exportRole,
// getRole,
// listBasicInfo,
// updateRole
// } from '@/api/equipment/basicInfo'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
import
{
listBasicInfo
}
from
'@/api/equipment/basicInfo'
// import { getRolesByInsId } from '../../../api/businessManage/template'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
data
()
{
data
()
{
...
@@ -255,7 +244,8 @@ export default {
...
@@ -255,7 +244,8 @@ export default {
rows
:
10
,
rows
:
10
,
pn
:
undefined
,
pn
:
undefined
,
ptype
:
undefined
,
ptype
:
undefined
,
pgx
:
undefined
pgx
:
undefined
,
delFlag
:
0
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
...
@@ -315,33 +305,13 @@ export default {
...
@@ -315,33 +305,13 @@ export default {
/** 查询基础信息列表 */
/** 查询基础信息列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
listBasicInfo
(
this
.
queryParams
).
then
(
listBasicInfo
(
this
.
queryParams
).
then
(
res
=>
{
response
=>
{
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
basicInfoList
=
response
.
rows
this
.
total
=
res
.
total
this
.
total
=
response
.
total
this
.
basicInfoList
=
res
.
rows
this
.
loading
=
false
}
)
},
/** 查询菜单树结构 */
getMenuTreeselect
()
{
menuTreeselect
().
then
(
response
=>
{
this
.
menuOptions
=
response
.
data
})
},
/** 查询菜单列表 */
getMenuList
(
roleId
)
{
roleMenuTreeselectMC
(
roleId
).
then
(
response
=>
{
this
.
menuList
=
this
.
handleTree
(
response
.
data
.
menus
,
'businessId'
)
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
/** 查询部门树结构 */
getDeptTreeselect
()
{
deptTreeselect
().
then
(
response
=>
{
this
.
deptOptions
=
response
.
data
})
},
// 所有菜单节点数据
// 所有菜单节点数据
getMenuAllCheckedKeys
()
{
getMenuAllCheckedKeys
()
{
// 目前被选中的菜单节点
// 目前被选中的菜单节点
...
@@ -376,24 +346,6 @@ export default {
...
@@ -376,24 +346,6 @@ export default {
return
response
return
response
})
})
},
},
// 角色状态修改
handleStatusChange
(
row
)
{
const
text
=
row
.
flag
===
'1'
?
'启用'
:
'停用'
this
.
$confirm
(
'确认要"'
+
text
+
'""'
+
row
.
roleName
+
'"角色吗?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
changeRoleStatus
(
row
.
businessId
,
row
.
flag
)
}).
then
(()
=>
{
this
.
$message
({
message
:
text
+
'成功'
,
type
:
'success'
})
}).
catch
(
function
()
{
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
})
},
// 取消按钮
// 取消按钮
cancel
()
{
cancel
()
{
this
.
open
=
false
this
.
open
=
false
...
@@ -478,10 +430,8 @@ export default {
...
@@ -478,10 +430,8 @@ export default {
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
()
this
.
getMenuTreeselect
()
this
.
open
=
true
this
.
open
=
true
this
.
title
=
'添加
角色
'
this
.
title
=
'添加
设备基础信息表单
'
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
...
@@ -502,23 +452,30 @@ export default {
...
@@ -502,23 +452,30 @@ export default {
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
:
function
()
{
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
if
(
this
.
form
.
businessId
!==
undefined
)
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
()
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
updateBasicInfo
(
this
.
form
).
then
(
response
=>
{
updataInfo
(
this
.
form
).
then
(
res
=>
{
this
.
msgSuccess
(
'修改成功'
)
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
open
=
false
this
.
getList
()
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
})
}
else
{
}
else
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
()
add
(
this
.
form
).
then
(
res
=>
{
// eslint-disable-next-line no-undef
if
(
res
.
code
===
200
)
{
addBasicInfo
(
this
.
form
).
then
(
response
=>
{
this
.
open
=
false
this
.
msgSuccess
(
'新增成功'
)
this
.
$message
.
success
(
'操作成功'
)
this
.
open
=
false
this
.
getList
()
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
})
}
}
}
}
...
...
src/views/equipment/draw.vue
View file @
0949ba1a
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"placeholder"
/>
<div
class=
"placeholder"
/>
...
@@ -64,7 +64,8 @@
...
@@ -64,7 +64,8 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pissb
||
'-'
}}
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
...
@@ -244,7 +245,8 @@ export default {
...
@@ -244,7 +245,8 @@ export default {
pn
:
undefined
,
pn
:
undefined
,
lot
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
plocation
:
undefined
,
ptype
:
1
ptype
:
1
,
delFlag
:
0
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
...
...
src/views/login/login.vue
View file @
0949ba1a
...
@@ -20,20 +20,20 @@
...
@@ -20,20 +20,20 @@
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
>
<!--
<el-form-item
prop=
"code"
>
--
>
<el-input
<!--
<el-input-->
v-model=
"loginForm.code"
<!-- v-model="loginForm.code"-->
auto-complete=
"off"
<!-- auto-complete="off"-->
placeholder=
"验证码"
<!-- placeholder="验证码"-->
style=
"width: 63%"
<!-- style="width: 63%"-->
@
keyup
.
enter
.
native=
"handleLogin"
<!-- @keyup.enter.native="handleLogin"-->
>
<!-- >--
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/
>
<!--
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
--
>
</el-input
>
<!--
</el-input>
--
>
<!--
<div
class=
"login-code"
>
<!-- <!–
<div
class=
"login-code"
>
--
>
<img
:src=
"codeUrl"
@
click=
"getCode"
>
<!--
<img
:src=
"codeUrl"
@
click=
"getCode"
>
--
>
</div>
-->
<!--
</div>
–>
-->
</el-form-item
>
<!--
</el-form-item>
--
>
<el-form-item
style=
"width:80%;margin-bottom: 20px"
>
<el-form-item
style=
"width:80%;margin-bottom: 20px"
>
<el-button
<el-button
class=
"blue-btn"
class=
"blue-btn"
...
...
src/views/processManagement/draw.vue
View file @
0949ba1a
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"placeholder"
/>
<div
class=
"placeholder"
/>
...
@@ -64,7 +64,8 @@
...
@@ -64,7 +64,8 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<el-table-column
label=
"pissb"
prop=
"pissb"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pissb
||
'-'
}}
<span
v-if=
"scope.row.pissb === '0'"
>
否
</span>
<span
v-else
>
是
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
...
@@ -244,7 +245,8 @@ export default {
...
@@ -244,7 +245,8 @@ export default {
pn
:
undefined
,
pn
:
undefined
,
lot
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
plocation
:
undefined
,
ptype
:
2
ptype
:
2
,
delFlag
:
0
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
...
...
src/views/processManagement/inventoryRecord/index.vue
View file @
0949ba1a
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"库类型"
prop=
"ptype"
>
<el-form-item
label=
"库类型"
prop=
"ptype"
>
<el-select
<el-select
v-model=
"queryParams.ptype"
v-model=
"queryParams.ptype"
...
@@ -114,7 +113,7 @@
...
@@ -114,7 +113,7 @@
<component
<component
:is=
"BaseTable"
:is=
"BaseTable"
:key=
"queryParams.rows"
:key=
"queryParams.rows"
:n
I
ndex=
"nIndex"
:n
-i
ndex=
"nIndex"
:all-table-arguments=
"allTableArguments"
:all-table-arguments=
"allTableArguments"
@
handle-detail=
"handleDetail"
@
handle-detail=
"handleDetail"
/>
/>
...
@@ -133,7 +132,7 @@
...
@@ -133,7 +132,7 @@
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-row
:gutter=
"10"
justify=
"start"
align=
"middle"
>
<el-row
:gutter=
"10"
justify=
"start"
align=
"middle"
>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
12
"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-form-item>
...
@@ -143,23 +142,36 @@
...
@@ -143,23 +142,36 @@
<el-form-item
label=
"plocation:"
prop=
"plocation"
>
<el-form-item
label=
"plocation:"
prop=
"plocation"
>
<el-input
v-model
.
trim=
"singleDetails.plocation"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.plocation"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"操作员:"
prop=
"user"
>
<el-input
v-model
.
trim=
"singleDetails.user"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
12
"
>
<el-form-item
label=
"库类型:"
prop=
"ptype"
>
<el-form-item
label=
"库类型:"
prop=
"ptype"
>
<el-input
v-model
.
trim=
"singleDetails.ptype"
:readonly=
"isReadOnly"
/>
{{
selectedPtype
(
singleDetails
.
ptype
)
}}
</el-form-item>
</el-form-item>
<el-form-item
label=
"库状态:"
prop=
"poperate"
>
<el-form-item
label=
"库状态:"
prop=
"poperate"
>
<el-input
v-model
.
trim=
"singleDetails.poperate"
:readonly=
"isReadOnly"
/>
{{
selectedPoperate
(
singleDetails
.
poperate
)
}}
</el-form-item>
<el-form-item
label=
"fqYs:"
prop=
"fqYs"
>
{{
singleDetails
.
fqYs
}}
</el-form-item>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作时间:"
prop=
"createDate"
>
<el-form-item
label=
"操作时间:"
prop=
"createDate"
>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"操作员:"
prop=
"user"
>
</el-col>
<el-input
v-model
.
trim=
"singleDetails.user"
:readonly=
"isReadOnly"
/>
</el-row>
<el-row
v-if=
" singleDetails.poperate==='4' "
>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人:"
prop=
"createBy"
>
<el-input
v-model
.
trim=
"singleDetails.createBy"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间:"
prop=
"createDate"
>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -175,7 +187,7 @@ import { listLog } from '@/api/processLibrary/InventoryRecord'
...
@@ -175,7 +187,7 @@ import { listLog } from '@/api/processLibrary/InventoryRecord'
import
BaseTable
from
'@/components/Table/BaseTable/index.vue'
import
BaseTable
from
'@/components/Table/BaseTable/index.vue'
export
default
{
export
default
{
name
:
'
LoginInfo
'
,
name
:
'
InventoryRecord
'
,
components
:
[
components
:
[
BaseTable
BaseTable
],
],
...
@@ -279,14 +291,7 @@ export default {
...
@@ -279,14 +291,7 @@ export default {
prop
:
'ptype'
,
prop
:
'ptype'
,
label
:
'库类型'
,
label
:
'库类型'
,
ownDefinedReturn
:
(
row
,
$index
)
=>
{
ownDefinedReturn
:
(
row
,
$index
)
=>
{
switch
(
row
.
ptype
)
{
return
this
.
selectedPtype
(
row
.
ptype
)
case
'1'
:
return
'设备库'
case
'2'
:
return
'工序库'
default
:
return
''
}
}
}
},
},
{
{
...
@@ -295,18 +300,7 @@ export default {
...
@@ -295,18 +300,7 @@ export default {
label
:
'库状态'
,
label
:
'库状态'
,
width
:
'180px'
,
width
:
'180px'
,
ownDefinedReturn
:
(
row
,
$index
)
=>
{
ownDefinedReturn
:
(
row
,
$index
)
=>
{
switch
(
row
.
poperate
)
{
return
this
.
selectedPoperate
(
row
.
poperate
)
case
'1'
:
return
'入库'
case
'2'
:
return
'出库'
case
'3'
:
return
'修正'
case
'4'
:
return
'废弃'
default
:
return
''
}
}
}
},
},
{
{
...
@@ -348,7 +342,6 @@ export default {
...
@@ -348,7 +342,6 @@ export default {
]
]
},
},
title
:
''
,
title
:
''
,
openDetails
:
false
,
openDetails
:
false
,
isReadOnly
:
true
,
isReadOnly
:
true
,
...
@@ -373,7 +366,6 @@ export default {
...
@@ -373,7 +366,6 @@ export default {
BaseTable
()
{
BaseTable
()
{
return
BaseTable
return
BaseTable
},
},
/* TODO:自定义分页索引,实现索引继承 */
/* TODO:自定义分页索引,实现索引继承 */
nIndex
(
index
)
{
nIndex
(
index
)
{
// TODO: 当前页数 - 1 * 每页数据条数 + 1
// TODO: 当前页数 - 1 * 每页数据条数 + 1
...
@@ -381,7 +373,6 @@ export default {
...
@@ -381,7 +373,6 @@ export default {
const
rows
=
this
.
queryParams
.
rows
// TODO: 每页条数
const
rows
=
this
.
queryParams
.
rows
// TODO: 每页条数
return
index
+
1
+
(
page
-
1
)
*
rows
return
index
+
1
+
(
page
-
1
)
*
rows
},
},
// TODO: 用来汇总Table组件所需要的全部数据并一次性传输给子组件
// TODO: 用来汇总Table组件所需要的全部数据并一次性传输给子组件
allTableArguments
()
{
allTableArguments
()
{
return
{
return
{
...
@@ -419,6 +410,33 @@ export default {
...
@@ -419,6 +410,33 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
/* TODO: ptype 库类型判断的公用方法 */
selectedPtype
(
ptype
)
{
switch
(
ptype
)
{
case
'1'
:
return
'设备库'
case
'2'
:
return
'工序库'
default
:
return
''
}
},
/* TODO: poperate的库状态判断的公用方法 */
selectedPoperate
(
poperate
)
{
switch
(
poperate
)
{
case
'1'
:
return
'入库'
case
'2'
:
return
'出库'
case
'3'
:
return
'修正'
case
'4'
:
return
'废弃'
default
:
return
''
}
},
handleClose
()
{
handleClose
()
{
this
.
clearVisible
=
false
this
.
clearVisible
=
false
this
.
exportVisible
=
false
this
.
exportVisible
=
false
...
@@ -458,8 +476,6 @@ export default {
...
@@ -458,8 +476,6 @@ export default {
margin-bottom
:
10px
margin-bottom
:
10px
}
}
/*TODO: 这里是调整ToolBar的样式的噢!*/
/*TODO: 这里是调整ToolBar的样式的噢!*/
.ToolBar
{
.ToolBar
{
.el-form
{
.el-form
{
...
@@ -475,19 +491,21 @@ export default {
...
@@ -475,19 +491,21 @@ export default {
}
}
}
}
/* TODO: 专门用来解决el-input边框的问题 */
/* TODO: 专门用来解决el-input边框的问题 */
.aboutSingleDetails
{
.aboutSingleDetails
{
.el-form-item
{
.el-form
{
.el-input
>>>
.el-input__inner
{
.el-form-item
{
-webkit-appearance
:
none
;
.el-input
>>>
.el-input__inner
{
background-color
:
#FFF
;
-webkit-appearance
:
none
;
background-image
:
none
;
background-color
:
#FFF
;
border-radius
:
4px
;
background-image
:
none
;
border
:
0
;
border-radius
:
4px
;
width
:
100%
;
border
:
0
;
width
:
100%
;
}
}
}
}
}
}
}
</
style
>
</
style
>
...
...
src/views/sample/sampleType/index.vue
View file @
0949ba1a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"name"
prop=
"name"
>
<el-form-item
label=
"name"
prop=
"name"
>
<el-input
<el-input
v-model=
"queryParams.name"
v-model=
"queryParams.
d
name"
placeholder=
"请输入名称"
placeholder=
"请输入名称"
clearable
clearable
size=
"small"
size=
"small"
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
<div
style=
"float: right"
>
<div
style=
"float: right"
>
<el-form-item>
<el-form-item>
...
@@ -57,29 +57,19 @@
...
@@ -57,29 +57,19 @@
{{
scope
.
row
.
pn
||
'-'
}}
{{
scope
.
row
.
pn
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
qty"
prop=
"qty
"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"
dname"
prop=
"dname
"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
qty
||
'-'
}}
{{
scope
.
row
.
dname
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
name"
prop=
"name
"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"
dno"
prop=
"dno
"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
name
||
'-'
}}
{{
scope
.
row
.
dno
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"
max_qty"
prop=
"max_qty
"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"
remarks"
prop=
"remarks
"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
max_qty
||
'-'
}}
{{
scope
.
row
.
remarks
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"min_qty"
prop=
"min_qty"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
min_qty
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"unit"
prop=
"unit"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
unit
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作人"
prop=
"createName"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"操作人"
prop=
"createName"
:show-overflow-tooltip=
"true"
>
...
@@ -87,9 +77,9 @@
...
@@ -87,9 +77,9 @@
{{
scope
.
row
.
createName
||
'-'
}}
{{
scope
.
row
.
createName
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作时间"
prop=
"create
_d
ate"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"操作时间"
prop=
"create
D
ate"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
create
_d
ate
||
'-'
}}
{{
scope
.
row
.
create
D
ate
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
...
@@ -122,28 +112,56 @@
...
@@ -122,28 +112,56 @@
v-show=
"total>0"
v-show=
"total>0"
:total=
"total"
:total=
"total"
:page
.
sync=
"queryParams.page"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.
page
"
:limit
.
sync=
"queryParams.
rows
"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
<!-- 新增修改弹出 -->
<!-- 新增修改弹出 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
@
close=
"cancel"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"80px"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
v-model
.
trim=
"form.pn"
:maxlength=
"30"
placeholder=
"请输入pn"
/>
</el-form-item>
<el-form-item
label=
"dname"
prop=
"dname"
>
<el-input
v-model
.
trim=
"form.dname"
:maxlength=
"30"
placeholder=
"请输入dname"
/>
</el-form-item>
<el-form-item
label=
"dno"
prop=
"dno"
>
<el-input
v-model
.
trim=
"form.dno"
:maxlength=
"30"
placeholder=
"请输入dno"
/>
</el-form-item>
<el-form-item
label=
"remarks"
prop=
"remarks"
>
<el-input
v-model
.
trim=
"form.remarks"
:maxlength=
"30"
placeholder=
"请输入remarks"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
queryList
}
from
'@/api/sample/basicInformation'
import
{
add
,
deleteLogical
,
getDetailById
,
queryList
,
updataInfo
}
from
'@/api/sample/sampleType'
import
{
parseTime
}
from
'@/utils'
export
default
{
export
default
{
name
:
'Index'
,
name
:
'Index'
,
data
()
{
data
()
{
return
{
return
{
title
:
''
,
open
:
false
,
form
:
{},
rules
:
{
pn
:
[{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
}],
dname
:
[{
required
:
true
,
message
:
'请输入name'
,
trigger
:
'blur'
}]
},
total
:
0
,
total
:
0
,
loading
:
false
,
loading
:
false
,
queryParams
:
{
queryParams
:
{
page
:
1
,
page
:
1
,
rows
:
10
,
rows
:
10
,
pn
:
''
,
pn
:
''
,
name
:
''
d
name
:
''
},
},
statusOptions
:
{},
statusOptions
:
{},
basicinfoMationList
:
[]
basicinfoMationList
:
[]
...
@@ -153,17 +171,67 @@ export default {
...
@@ -153,17 +171,67 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
handleDelete
()
{
// 删除
handleDelete
(
row
)
{
const
id
=
row
.
businessId
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
res
=>
{
deleteLogical
(
id
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
})
})
},
},
handleUpdate
()
{
// 修改
handleUpdate
(
row
)
{
const
id
=
row
.
businessId
getDetailById
(
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
open
=
true
this
.
title
=
'修改样品种类表单'
})
},
// 提交
submitForm
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 校验通过,提交表单或进行其他操作
if
(
this
.
form
.
businessId
!==
undefined
)
{
updataInfo
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
}
else
{
add
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
}
}
})
},
},
// 初始化获取数据
// 初始化获取数据
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
queryList
(
this
.
queryParams
).
then
(
res
=>
{
queryList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
total
=
res
.
total
this
.
total
=
res
.
total
this
.
basicinfoMationList
=
res
.
rows
this
.
basicinfoMationList
=
res
.
rows
this
.
loading
=
false
this
.
loading
=
false
...
@@ -180,15 +248,31 @@ export default {
...
@@ -180,15 +248,31 @@ export default {
page
:
1
,
page
:
1
,
rows
:
10
,
rows
:
10
,
pn
:
''
,
pn
:
''
,
name
:
''
d
name
:
''
}
}
this
.
getList
()
this
.
getList
()
},
},
handleAdd
()
{
handleAdd
()
{
this
.
open
=
true
this
.
title
=
'添加样品种类表单'
},
},
handleExport
()
{
handleExport
()
{
},
cancel
()
{
this
.
open
=
false
this
.
reFrom
()
},
// 清空表单
reFrom
()
{
this
.
form
=
{
businessId
:
undefined
,
pn
:
''
,
dname
:
''
,
dno
:
''
,
remarks
:
''
}
this
.
$refs
.
form
.
clearValidate
()
}
}
}
}
}
}
...
...
src/views/system/dept/index.vue
View file @
0949ba1a
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"部门名称"
prop=
"deptName"
>
<el-form-item
label=
"部门名称"
prop=
"deptName"
>
<el-input
<el-input
v-model=
"queryParams.deptName"
v-model=
"queryParams.deptName"
...
@@ -22,109 +22,119 @@
...
@@ -22,109 +22,119 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
class=
"filter-item"
class=
"filter-item"
type=
"primary"
type=
"primary"
size=
"small"
size=
"small"
@
click=
"getList"
@
click=
"getList"
>
查询
</el-button>
>
查询
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
size=
"small"
@
click=
"handleAdd"
>
新增
</el-button>
<!--
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
-->
</el-form-item>
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-plus"
class=
"filter-item"
type=
"primary"
size=
"small"
@
click=
"handleAdd"
>
新增
</el-button>
<!--
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
-->
</el-form-item>
</div>
</el-form>
</el-form>
<el-table
<div
style=
"padding:5px 10px"
>
v-loading=
"Loading"
<el-table
:data=
"deptList"
v-loading=
"Loading"
row-key=
"businessId"
:data=
"deptList"
default-expand-all
row-key=
"businessId"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
default-expand-all
>
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
<!--
<el-table-column-->
>
<!-- label="序号"-->
<!--
<el-table-column-->
<!-- type="index"-->
<!-- label="序号"-->
<!-- width="50">-->
<!-- type="index"-->
<!--
</el-table-column>
-->
<!-- width="50">-->
<!--
<el-table-column-->
<!--
</el-table-column>
-->
<!-- label="部门编号">-->
<!--
<el-table-column-->
<!--
<template
v-slot:default=
"scope"
>
-->
<!-- label="部门编号">-->
<!--
{{
scope
.
row
.
businessId
}}
-->
<!--
<template
v-slot:default=
"scope"
>
-->
<!--
</
template
>
-->
<!--
{{
scope
.
row
.
businessId
}}
-->
<!-- </el-table-column>-->
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"deptName"
label=
"部门名称"
width=
"260"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"orderNum"
label=
"排序"
width=
"200"
/>
<el-table-column
label=
"状态"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.flag"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleStatusChange(scope.row)"
/>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"创建时间"
align=
"center"
prop=
"createDate"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- v-hasPermi="['system:dept:edit']"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- v-hasPermi="['system:dept:add']"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-plus"-->
<!-- @click="handleAdd(scope.row)"-->
<!-- >新增</el-button>-->
<!-- <el-button-->
<!-- v-if="scope.row.parentId != 0"-->
<!-- v-hasPermi="['system:dept:remove']"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除</el-button>-->
<!--
</
template
>
-->
<!--
</
template
>
-->
<
template
slot-scope=
"scope"
>
<!-- </el-table-column>-->
<el-button
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"deptName"
label=
"部门名称"
width=
"260"
/>
size=
"mini"
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"orderNum"
label=
"排序"
width=
"200"
/>
type=
"text"
<el-table-column
label=
"状态"
align=
"center"
width=
"100"
>
style=
"color: #49cec9"
<
template
slot-scope=
"scope"
>
@
click=
"handleUpdate(scope.row)"
<el-switch
>
修改
</el-button>
v-model=
"scope.row.flag"
<!--
<el-switch-->
active-value=
"1"
<!-- v-model="scope.row.flag"-->
inactive-value=
"0"
<!-- v-hasPermi="['system:dept:toggle']"-->
@
change=
"handleStatusChange(scope.row)"
<!-- active-value="0"-->
/>
<!-- inactive-value="1"-->
</
template
>
<!-- @change="handleStatusChange(scope.row)"-->
</el-table-column>
<!-- />-->
<el-table-column
:show-overflow-tooltip=
"true"
label=
"创建时间"
align=
"center"
prop=
"createDate"
width=
"200"
>
<el-button
<
template
slot-scope=
"scope"
>
size=
"mini"
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
type=
"text"
</
template
>
@
click=
"handleAdd(scope.row)"
</el-table-column>
>
新增
</el-button>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-button
<!-- <template slot-scope="scope">-->
v-if=
"scope.row.parentId !== 0"
<!-- <el-button-->
size=
"mini"
<!-- v-hasPermi="['system:dept:edit']"-->
type=
"text"
<!-- size="mini"-->
@
click=
"handleDelete(scope.row)"
<!-- type="text"-->
>
删除
</el-button>
<!-- icon="el-icon-edit"-->
</
template
>
<!-- @click="handleUpdate(scope.row)"-->
</el-table-column>
<!-- >修改</el-button>-->
</el-table>
<!-- <el-button-->
<!-- v-hasPermi="['system:dept:add']"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-plus"-->
<!-- @click="handleAdd(scope.row)"-->
<!-- >新增</el-button>-->
<!-- <el-button-->
<!-- v-if="scope.row.parentId != 0"-->
<!-- v-hasPermi="['system:dept:remove']"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
style=
"color: #49cec9"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
<!--
<el-switch-->
<!-- v-model="scope.row.flag"-->
<!-- v-hasPermi="['system:dept:toggle']"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- @change="handleStatusChange(scope.row)"-->
<!-- />-->
<el-button
size=
"mini"
type=
"text"
@
click=
"handleAdd(scope.row)"
>
新增
</el-button>
<el-button
v-if=
"scope.row.parentId !== 0"
size=
"mini"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<!-- 添加或修改部门对话框 -->
<!-- 添加或修改部门对话框 -->
<el-dialog
title=
"部门信息"
:visible
.
sync=
"open"
width=
"600px"
append-to-body
>
<el-dialog
title=
"部门信息"
:visible
.
sync=
"open"
width=
"600px"
append-to-body
>
...
@@ -190,7 +200,7 @@
...
@@ -190,7 +200,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
addDept
,
delDept
,
getDept
,
listDept
,
listDeptExcludeChild
,
updateDept
}
from
'@/api/system/dept'
import
{
addDept
,
delDept
,
getDept
,
listDept
,
listDeptExcludeChild
,
updateDept
}
from
'@/api/system/dept'
import
Treeselect
from
'@riophae/vue-treeselect'
import
Treeselect
from
'@riophae/vue-treeselect'
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
...
@@ -426,3 +436,31 @@ export default {
...
@@ -426,3 +436,31 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
font-size
:
18px
;
padding
:
0
;
.placeholder
{
height
:
1
.3vh
;
background-color
:
#F4F4F4
;
margin-bottom
:
10px
}
.table-drop
{
vertical-align
:
2px
;
line-height
:
20px
;
margin-left
:
15px
}
.el-switch
{
margin-left
:
15px
;
}
}
.el-divider--vertical
{
height
:
12em
;
width
:
4px
;
}
</
style
>
src/views/system/role/index.vue
View file @
0949ba1a
...
@@ -39,12 +39,14 @@
...
@@ -39,12 +39,14 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
</el-form-item>
</el-form-item>
<div
style=
"float: right"
>
<div
style=
"float: right"
>
<el-form-item>
<el-form-item>
<el-button
<el-button
style=
"padding: 8px 7px;"
type=
"primary"
type=
"primary"
icon=
"el-icon-plus"
size=
"small"
size=
"small"
@
click=
"handleAdd"
@
click=
"handleAdd"
>
新增
</el-button>
>
新增
</el-button>
...
...
src/views/system/user/index.vue
View file @
0949ba1a
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"float: right"
>
<el-form-item
style=
"float: right"
>
<!--
<el-button-->
<!--
<el-button-->
...
...
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