Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qr-consistency-vue3
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
刘怀志
qr-consistency-vue3
Commits
ccf72362
Commit
ccf72362
authored
Apr 16, 2025
by
ZhangRunSong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/liuhuaizhi/qr-consistency-vue3
into dev
parents
ad87f58c
4905a21a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
566 additions
and
105 deletions
+566
-105
list.js
src/api/marketRegulations/list.js
+10
-0
businessunit.js
src/api/system/basicdata/businessunit.js
+44
-0
manufacturer.js
src/api/system/basicdata/manufacturer.js
+0
-6
factory.js
src/api/system/factory.js
+8
-0
info.vue
src/views/baseData/marketRegulations/info.vue
+137
-32
index.vue
src/views/system/basicdata/businessunit/index.vue
+271
-0
index.vue
src/views/system/basicdata/manufacturer/index.vue
+62
-37
index.vue
src/views/system/role/index.vue
+29
-28
index.vue
src/views/system/user/index.vue
+5
-2
No files found.
src/api/marketRegulations/list.js
View file @
ccf72362
...
...
@@ -42,3 +42,13 @@ export function delList(id) {
method
:
'delete'
})
}
// 根据id查看详情里面的市场法规清单
export
function
detailList
(
data
)
{
return
request
({
url
:
'/control/marketRegulations/detailList'
,
method
:
'get'
,
params
:
data
})
}
src/api/system/basicdata/businessunit.js
0 → 100644
View file @
ccf72362
import
request
from
'@/utils/request'
// 查询事业部列表
export
function
listUnit
(
query
)
{
return
request
({
url
:
'/control/unit/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询事业部详细
export
function
getUnit
(
id
)
{
return
request
({
url
:
'/control/unit/'
+
id
,
method
:
'get'
})
}
// 新增事业部
export
function
addUnit
(
data
)
{
return
request
({
url
:
'/control/unit'
,
method
:
'post'
,
data
:
data
})
}
// 修改事业部
export
function
updateUnit
(
data
)
{
return
request
({
url
:
'/control/unit'
,
method
:
'put'
,
data
:
data
})
}
// 删除事业部
export
function
delUnit
(
id
)
{
return
request
({
url
:
'/control/unit/'
+
id
,
method
:
'delete'
})
}
src/api/system/basicdata/manufacturer.js
View file @
ccf72362
...
...
@@ -42,9 +42,3 @@ export function delManufacturer(id) {
method
:
'delete'
})
}
export
function
getfactory
(){
return
request
({
url
:
'/control/manufacturer/factory'
,
method
:
'get'
})
}
src/api/system/factory.js
View file @
ccf72362
...
...
@@ -24,3 +24,11 @@ export function updateFactory(query) {
data
:
query
,
})
}
export
function
getAllFactoryName
(
query
)
{
return
request
({
url
:
'/control/systemFactory/getAllFactoryName'
,
method
:
'get'
,
data
:
query
,
})
}
src/views/baseData/marketRegulations/info.vue
View file @
ccf72362
...
...
@@ -88,16 +88,16 @@
<div
>
<div
class=
"baseInfoTitle"
>
市场法规清单
</div>
<el-form
v-model=
"queryParams"
ref=
"queryRef"
:inline=
"true"
label-width=
"70px"
>
<el-form-item
label=
"标准编号"
prop=
"
number
"
>
<el-form-item
label=
"标准编号"
prop=
"
standardCode
"
>
<el-input
v-model=
"queryParams.
number
"
v-model=
"queryParams.
standardCode
"
placeholder=
"请输入适标准编号"
clearable
/>
</el-form-item>
<el-form-item
label=
"标准名称"
prop=
"
n
ame"
>
<el-form-item
label=
"标准名称"
prop=
"
standardN
ame"
>
<el-input
v-model=
"queryParams.
n
ame"
v-model=
"queryParams.
standardN
ame"
placeholder=
"请输入标准名称"
clearable
/>
...
...
@@ -113,64 +113,169 @@
<el-table
:data=
"tableList"
>
<el-table-column
type=
"index"
width=
"55"
align=
"center"
label=
"序号"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"applicableMarket"
/>
<el-table-column
label=
"标准编号"
align=
"center"
prop=
"listCode"
/>
<el-table-column
label=
"标准名称"
align=
"center"
prop=
"listName"
/>
<el-table-column
label=
"标准英文名称"
align=
"center"
prop=
"steeringType"
width=
"130"
/>
<el-table-column
label=
"等效法规"
align=
"center"
prop=
"listVersion"
/>
<el-table-column
label=
"被代替标准编号"
align=
"center"
prop=
"releaseDate"
width=
"130"
>
</el-table-column>
<el-table-column
label=
"主控部门"
align=
"center"
prop=
"author"
/>
<el-table-column
label=
"主控部门专业模块"
align=
"center"
prop=
"listStatus"
width=
"140"
/>
<el-table-column
label=
"关联部门"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"关联部门专业模块"
align=
"center"
prop=
"listStatus"
width=
"140"
/>
<el-table-column
label=
"新认证车实施日期"
align=
"center"
prop=
"listStatus"
width=
"140"
/>
<el-table-column
label=
"新生产车实施日期"
align=
"center"
prop=
"listStatus"
width=
"140"
/>
<el-table-column
label=
"注册日期"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"适用市场"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"适用车型"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"动力类型"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"认证对象"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"认证交付物"
align=
"center"
prop=
"listStatus"
width=
"130"
/>
<el-table-column
label=
"批量限制"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"自动驾驶等级"
align=
"center"
prop=
"listStatus"
width=
"130"
/>
<el-table-column
label=
"要求类型"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"listStatus"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"standardType"
/>
<el-table-column
label=
"标准编号"
align=
"center"
prop=
"standardCode"
/>
<el-table-column
label=
"标准名称"
align=
"center"
prop=
"standardName"
/>
<el-table-column
label=
"标准英文名称"
align=
"center"
prop=
"standardEnglishName"
width=
"130"
/>
<el-table-column
label=
"等效法规"
align=
"center"
prop=
"equivalentRegulation"
>
<template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
equivalentRegulation
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"被代替标准编号"
align=
"center"
prop=
"replacedStandardCode"
width=
"130"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
replacedStandardCode
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"主控部门"
align=
"center"
prop=
"author"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
author
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"主控部门专业模块"
align=
"center"
prop=
"listStatus"
width=
"140"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"关联部门"
align=
"center"
prop=
"listStatus"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"关联部门专业模块"
align=
"center"
prop=
"listStatus"
width=
"140"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"新认证车实施日期"
align=
"center"
prop=
"newCertificationCarDate"
width=
"140"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
newCertificationCarDate
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"新生产车实施日期"
align=
"center"
prop=
"newProductionCarDate"
width=
"140"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
newProductionCarDate
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"注册日期"
align=
"center"
prop=
"registrationDate"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
registrationDate
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"适用市场"
align=
"center"
prop=
"listStatus"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"适用车型"
align=
"center"
prop=
"applicableModel"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
applicableModel
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"动力类型"
align=
"center"
prop=
"powerType"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
powerType
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"认证对象"
align=
"center"
prop=
"certificationTarget"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
certificationTarget
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"认证交付物"
align=
"center"
prop=
"listStatus"
width=
"130"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"批量限制"
align=
"center"
prop=
"listStatus"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"自动驾驶等级"
align=
"center"
prop=
"listStatus"
width=
"130"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"要求类型"
align=
"center"
prop=
"listStatus"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
listStatus
||
'——'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
>
<
template
#
default=
"scope"
>
<span>
{{
scope
.
row
.
remark
||
'——'
}}
</span>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
v-model:page=
"queryParams.pageNum"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getMarketList"
/>
</div>
</div>
</template>
<
script
setup
>
import
{
getDataList
}
from
"@/api/marketRegulations/list"
;
import
{
getDataList
,
detailList
}
from
"@/api/marketRegulations/list"
;
import
{
useRoute
}
from
'vue-router'
;
const
route
=
useRoute
();
const
router
=
useRouter
();
const
id
=
route
.
query
.
id
;
const
total
=
ref
(
0
)
//市场清单列表
const
tableList
=
ref
([])
//基本数据
const
dataOBj
=
ref
({})
const
queryParams
=
ref
({
id
:
id
,
pageNum
:
1
,
pageSize
:
10
,
})
/** 搜索按钮操作 */
function
handleQuery
()
{
queryParams
.
value
.
pageNum
=
1
;
getMarketList
();
}
/** 重置按钮操作 */
function
resetQuery
()
{
queryParams
.
value
.
standardCode
=
null
queryParams
.
value
.
standardName
=
null
handleQuery
();
}
function
boBack
(){
router
.
go
(
-
1
)
}
//获取基本信息
function
getDetail
(
id
){
getDataList
(
id
).
then
(
res
=>
{
dataOBj
.
value
=
res
.
data
})
}
//获取市场法规列表
function
getMarketList
(){
detailList
(
queryParams
.
value
).
then
(
res
=>
{
console
.
log
(
res
)
tableList
.
value
=
res
.
rows
total
.
value
=
res
.
total
})
}
getDetail
(
id
)
getMarketList
()
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
src/views/system/basicdata/businessunit/index.vue
0 → 100644
View file @
ccf72362
<
template
>
<div
class=
"app-container"
>
<div>
<el-button
type=
"primary"
plain
style=
"float: right;margin: 12px 0;border: 1px solid #0154fb;color: #0154fb;"
@
click=
"handleAdd"
>
新建
</el-button>
</div>
<el-table
v-loading=
"loading"
:data=
"unitList"
@
selection-change=
"handleSelectionChange"
border
>
<el-table-column
label=
"序号"
align=
"center"
width=
"80"
>
<template
#
default=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"事业部"
align=
"center"
prop=
"businessUnitName"
width=
"100"
/>
<el-table-column
prop=
"manufacturingFactory"
label=
"制造工厂"
width=
"800"
>
<
template
#
default=
"{ row }"
>
{{
formatFactoryDisplay
(
row
.
manufacturingFactory
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
width=
"200"
/>
<el-table-column
label=
"更新时间"
align=
"center"
prop=
"updateTime"
width=
"200"
/>
<el-table-column
label=
"更新人"
align=
"center"
prop=
"updateName"
width=
"150"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['control:unit:edit']"
style=
'color: #0154FB'
>
编辑
</el-button>
<!--
<el-button
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['control:unit:remove']"
>
删除
</el-button>
-->
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
v-model:page=
"queryParams.pageNum"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改事业部对话框 -->
<el-dialog
:title=
"title"
v-model=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"unitRef"
:model=
"form"
:rules=
"rules"
label-width=
"130px"
>
<el-form-item
label=
"事业部名称"
prop=
"businessUnitName"
>
<el-input
v-model=
"form.businessUnitName"
placeholder=
"请输入事业部名称"
/>
</el-form-item>
<el-form-item
label=
"制造工厂"
prop=
"manufacturingFactory"
>
<el-checkbox-group
v-model=
"selectedFactories"
>
<div
style=
"display: flex; flex-wrap: wrap;"
>
<div
v-for=
"(factory, index) in allFactories"
:key=
"index"
style=
"width: 33%; margin-bottom: 10px;"
>
<el-checkbox
:label=
"factory"
>
{{ factory }}
</el-checkbox>
</div>
</div>
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</template>
<
script
setup
name=
"Unit"
>
import
{
listUnit
,
getUnit
,
delUnit
,
addUnit
,
updateUnit
}
from
"@/api/system/basicdata/businessunit"
;
import
{
getAllFactoryName
}
from
"@/api/system/factory"
;
import
{
formatFactories
}
from
'@/utils/factoryFormatter'
;
import
{
ref
,
toRefs
,
watch
}
from
'vue'
const
{
proxy
}
=
getCurrentInstance
();
const
unitList
=
ref
([]);
const
open
=
ref
(
false
);
const
loading
=
ref
(
true
);
const
showSearch
=
ref
(
true
);
const
ids
=
ref
([]);
const
single
=
ref
(
true
);
const
multiple
=
ref
(
true
);
const
total
=
ref
(
0
);
const
title
=
ref
(
""
);
const
formatFactoryDisplay
=
(
factoryJson
)
=>
{
return
formatFactories
(
factoryJson
);
};
// 选中的工厂列表
const
selectedFactories
=
ref
([]);
// 监听表单数据变化,初始化选中的工厂
const
data
=
reactive
({
form
:
{
businessUnitName
:
""
,
manufacturingFactory
:
{},
// 或 '{}'(根据后端需求)
remark
:
""
,
},
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
businessUnitName
:
null
,
manufacturingFactory
:
null
},
rules
:
{
createBy
:
[
{
required
:
true
,
message
:
"创建人ID不能为空"
,
trigger
:
"blur"
}
],
createTime
:
[
{
required
:
true
,
message
:
"创建时间不能为空"
,
trigger
:
"blur"
}
],
updateBy
:
[
{
required
:
true
,
message
:
"更新人ID不能为空"
,
trigger
:
"blur"
}
],
updateTime
:
[
{
required
:
true
,
message
:
"更新时间不能为空"
,
trigger
:
"blur"
}
],
delFlag
:
[
{
required
:
true
,
message
:
"删除状态,0表示未删除,1表示已删除不能为空"
,
trigger
:
"blur"
}
],
businessUnitName
:
[
{
required
:
true
,
message
:
"事业部名称不能为空"
,
trigger
:
"blur"
}
],
manufacturingFactory
:
[
{
required
:
true
,
message
:
"所属制造工厂,以JSON数组形式存储不能为空"
,
trigger
:
"blur"
}
]
}
});
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
// 所有可选的工厂列表
const
allFactories
=
ref
([])
// 获取工厂数据的方法
const
fetchFactories
=
async
()
=>
{
try
{
const
response
=
await
getAllFactoryName
()
// 提取factoryName字段
allFactories
.
value
=
response
.
data
.
map
(
item
=>
item
.
factoryName
)
}
catch
(
error
)
{
console
.
error
(
'获取工厂列表失败:'
,
error
)
}
}
watch
(()
=>
form
.
value
.
manufacturingFactory
,
(
newVal
)
=>
{
try
{
const
factoryObj
=
JSON
.
parse
(
newVal
||
'{}'
);
selectedFactories
.
value
=
Object
.
values
(
factoryObj
);
}
catch
(
e
)
{
selectedFactories
.
value
=
[];
}
},
{
immediate
:
true
});
// 监听选中的工厂变化,更新表单数据
watch
(
selectedFactories
,
(
newVal
)
=>
{
const
factoryObj
=
{};
newVal
.
forEach
((
item
,
index
)
=>
{
factoryObj
[
index
]
=
item
;
});
form
.
value
.
manufacturingFactory
=
JSON
.
stringify
(
factoryObj
);
},
{
deep
:
true
});
/** 查询事业部列表 */
function
getList
()
{
loading
.
value
=
true
;
listUnit
(
queryParams
.
value
).
then
(
response
=>
{
unitList
.
value
=
response
.
rows
;
total
.
value
=
response
.
total
;
loading
.
value
=
false
;
});
}
// 取消按钮
function
cancel
()
{
open
.
value
=
false
;
reset
();
}
// 表单重置
function
reset
()
{
form
.
value
=
{
id
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
remark
:
null
,
delFlag
:
null
,
businessUnitName
:
null
,
manufacturingFactory
:
null
};
proxy
.
resetForm
(
"unitRef"
);
}
/** 搜索按钮操作 */
function
handleQuery
()
{
queryParams
.
value
.
pageNum
=
1
;
getList
();
}
/** 重置按钮操作 */
function
resetQuery
()
{
proxy
.
resetForm
(
"queryRef"
);
handleQuery
();
}
// 多选框选中数据
function
handleSelectionChange
(
selection
)
{
ids
.
value
=
selection
.
map
(
item
=>
item
.
id
);
single
.
value
=
selection
.
length
!=
1
;
multiple
.
value
=
!
selection
.
length
;
}
/** 新增按钮操作 */
function
handleAdd
()
{
reset
();
open
.
value
=
true
;
title
.
value
=
"新增"
;
}
/** 修改按钮操作 */
function
handleUpdate
(
row
)
{
reset
();
const
_id
=
row
.
id
||
ids
.
value
getUnit
(
_id
).
then
(
response
=>
{
form
.
value
=
response
.
data
;
open
.
value
=
true
;
title
.
value
=
"修改事业部"
;
});
}
/** 提交按钮 */
function
submitForm
()
{
proxy
.
$refs
[
"unitRef"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
form
.
value
.
id
!=
null
)
{
updateUnit
(
form
.
value
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"修改成功"
);
open
.
value
=
false
;
getList
();
});
}
else
{
addUnit
(
form
.
value
).
then
(
response
=>
{
proxy
.
$modal
.
msgSuccess
(
"新增成功"
);
open
.
value
=
false
;
getList
();
});
}
}
});
}
/** 删除按钮操作 */
function
handleDelete
(
row
)
{
const
_ids
=
row
.
id
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
'是否确认删除事业部编号为"'
+
_ids
+
'"的数据项?'
).
then
(
function
()
{
return
delUnit
(
_ids
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}
/** 导出按钮操作 */
function
handleExport
()
{
proxy
.
download
(
'control/unit/export'
,
{
...
queryParams
.
value
},
`unit_
${
new
Date
().
getTime
()}
.xlsx`
)
}
onMounted
(()
=>
{
fetchFactories
();
});
getList
();
</
script
>
src/views/system/basicdata/index.vue
→
src/views/system/basicdata/
manufacturer/
index.vue
View file @
ccf72362
...
...
@@ -11,20 +11,34 @@
/>
</el-form-item>
<el-form-item
label=
"制造商"
prop=
"manufacturer"
>
<el-
inpu
t
<el-
selec
t
v-model=
"queryParams.manufacturer"
placeholder=
"请选择"
clearable
@
keyup
.
enter=
"handleQuery"
style=
"width: 240px"
>
<el-option
v-for=
"dict in sys_manufacture"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"生产厂"
prop=
"productionFactory"
>
<el-
inpu
t
<el-
selec
t
v-model=
"queryParams.productionFactory"
placeholder=
"请选择"
clearable
@
keyup
.
enter=
"handleQuery"
style=
"width: 320px"
>
<el-option
v-for=
"dict in production_factory"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"生产地址"
prop=
"productionAddress"
>
<el-input
...
...
@@ -45,27 +59,31 @@
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
'background: #0154fb;color: white'
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
style=
"border: 1px solid #0154fb;color: #0154fb;"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-form-item>
<!--
<el-form-item>
<el-button
type=
"primary"
plain
icon=
"Plus"
@
click=
"handleAdd"
v-hasPermi=
"['control:manufacturer:add']"
>
新增
</el-button>
</el-form-item>
</el-form-item>
-->
<el-table
v-loading=
"loading"
:data=
"manufacturerList"
@
selection-change=
"handleSelectionChange"
style=
"width: 100%"
>
style=
"width: 100%"
border
>
<!-- 固定左侧列 -->
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
width=
"80"
fixed=
"left"
/>
<el-table-column
label=
"序号"
align=
"center"
width=
"80"
fixed=
"left"
>
<template
#
default=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"工厂编号"
align=
"center"
prop=
"factoryCode"
width=
"180"
fixed=
"left"
/>
<el-table-column
label=
"制造商"
align=
"center"
prop=
"manufacturer"
width=
"210"
fixed=
"left"
/>
<el-table-column
label=
"生产厂"
align=
"center"
prop=
"productionFactory"
width=
"300"
fixed=
"left"
/>
...
...
@@ -81,13 +99,13 @@
<el-table-column
label=
"生产厂名称(英文)"
align=
"center"
prop=
"productionFactoryEn"
width=
"200"
/>
<el-table-column
label=
"生产地址(英文)"
align=
"center"
prop=
"productionAddressEn"
width=
"250"
/>
<el-table-column
label=
"更新时间"
align=
"center"
prop=
"updateTime"
width=
"180"
/>
<el-table-column
label=
"更新人"
align=
"center"
prop=
"update
By
"
width=
"120"
/>
<el-table-column
label=
"更新人"
align=
"center"
prop=
"update
Name
"
width=
"120"
/>
<!-- 固定右侧操作列 -->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"150"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['control:manufacturer:edit']"
>
编辑
</el-button>
<el-button
link
type=
"primary"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['control:manufacturer:remove']"
style=
'color:
red
'
>
删除
</el-button>
<el-button
link
type=
"primary"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['control:manufacturer:edit']"
style=
'color: #0154FB'
>
编辑
</el-button>
<el-button
link
type=
"primary"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['control:manufacturer:remove']"
style=
'color:
#DF5454
'
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -146,10 +164,13 @@
<
script
setup
name=
"Manufacturer"
>
import
{
reactive
,
ref
,
computed
,
watch
,
toRefs
}
from
'vue'
import
{
listManufacturer
,
getManufacturer
,
delManufacturer
,
addManufacturer
,
updateManufacturer
,
getfactory
}
from
"@/api/system/basicdata/manufacturer"
;
import
{
listManufacturer
,
getManufacturer
,
delManufacturer
,
addManufacturer
,
updateManufacturer
}
from
"@/api/system/basicdata/manufacturer"
;
import
{
getAllFactoryName
}
from
"@/api/system/factory"
;
import
{
formatFactories
}
from
'@/utils/factoryFormatter'
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
sys_manufacture
,
production_factory
}
=
proxy
.
useDict
(
'sys_manufacture'
,
'production_factory'
)
const
manufacturerList
=
ref
([]);
const
open
=
ref
(
false
);
const
loading
=
ref
(
true
);
const
showSearch
=
ref
(
true
);
...
...
@@ -158,11 +179,8 @@ const single = ref(true);
const
multiple
=
ref
(
true
);
const
total
=
ref
(
0
);
const
title
=
ref
(
""
);
const
initialFactoryData
=
ref
({})
// 从API获取的初始数据
const
manufacturerList
=
ref
([
]);
const
currentManufacturer
=
ref
(
null
);
const
formatFactoryDisplay
=
(
factoryJson
)
=>
{
return
formatFactories
(
factoryJson
);
...
...
@@ -190,14 +208,14 @@ const data = reactive({
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
factoryCode
:
undefined
,
// 或 ''
manufacturer
:
undefined
,
productionFactory
:
undefined
,
productionAddress
:
undefined
,
manufacturerEn
:
undefined
,
productionFactoryEn
:
undefined
,
productionAddressEn
:
undefined
,
manufacturingFactory
:
undefined
,
factoryCode
:
null
,
// 或 ''
manufacturer
:
null
,
productionFactory
:
null
,
productionAddress
:
null
,
manufacturerEn
:
null
,
productionFactoryEn
:
null
,
productionAddressEn
:
null
,
manufacturingFactory
:
null
,
},
// 验证规则(仅保留用户需输入的字段)
...
...
@@ -223,13 +241,18 @@ const data = reactive({
const
{
queryParams
,
form
,
rules
}
=
toRefs
(
data
);
// 所有可选的工厂列表
const
allFactories
=
ref
([
'整车二工厂'
,
'整车三工厂'
,
'整车四工厂'
,
'智造一工厂'
,
'智造二工厂'
,
'大连工厂'
,
'青岛工厂'
,
'鄂尔多斯工厂'
,
'开封工厂'
,
'城南工厂'
,
'城北工厂'
,
'齐河工厂'
,
'石家庄工厂'
]);
const
allFactories
=
ref
([])
// 获取工厂数据的方法
const
fetchFactories
=
async
()
=>
{
try
{
const
response
=
await
getAllFactoryName
()
// 提取factoryName字段
allFactories
.
value
=
response
.
data
.
map
(
item
=>
item
.
factoryName
)
}
catch
(
error
)
{
console
.
error
(
'获取工厂列表失败:'
,
error
)
}
}
watch
(()
=>
form
.
value
.
manufacturingFactory
,
(
newVal
)
=>
{
try
{
const
factoryObj
=
JSON
.
parse
(
newVal
||
'{}'
);
...
...
@@ -362,6 +385,8 @@ function handleExport() {
...
queryParams
.
value
},
`manufacturer_
${
new
Date
().
getTime
()}
.xlsx`
)
}
onMounted
(()
=>
{
fetchFactories
();
});
getList
();
</
script
>
src/views/system/role/index.vue
View file @
ccf72362
...
...
@@ -32,25 +32,26 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"handleQuery"
style=
'background: #0154fb;'
>
查询
</el-button>
<el-button
icon=
"Refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
<el-form-item
class=
"addRoleBtn"
>
<el-button
v-hasPermi=
"['system:role:add']"
type=
"primary"
icon=
"Plus"
@
click=
"handleAdd"
style=
"float: right;background: #0154fb;"
>
新建角色
</el-button>
</el-form-item
>
<!--
<el-button
type=
"primary"
plain
@
click=
"handleAdd"
>
新建
</el-button>
--
>
</el-form>
<!-- 表格数据 -->
<el-table
v-loading=
"loading"
:data=
"roleList"
@
selection-change=
"handleSelectionChange"
>
border
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"序号"
prop=
"roleId"
width=
"120"
align=
"center"
/>
<el-table-column
...
...
@@ -68,7 +69,7 @@
align=
"center"
/>
<el-table-column
label=
"显示顺序"
prop=
"roleSort"
width=
"100"
align=
"center"
/>
<el-table-column
label=
"角色状态"
align=
"center"
width=
"1
00"
>
<el-table-column
label=
"角色状态"
align=
"center"
width=
"1
50"
sortable
>
<template
#
default=
"scope"
>
<el-switch
v-model=
"scope.row.status"
...
...
@@ -78,12 +79,12 @@
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"200"
sortable
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"修改时间"
align=
"center"
prop=
"updateTime"
>
<el-table-column
label=
"修改时间"
align=
"center"
prop=
"updateTime"
width=
"200"
sortable
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
...
...
@@ -96,42 +97,29 @@
<
template
#
default=
"scope"
>
<el-tooltip
v-if=
"scope.row.roleId !== 1"
content=
"
修改
"
content=
"
编辑
"
placement=
"top"
>
<el-button
v-hasPermi=
"['system:role:edit']"
link
plain
type=
"primary"
icon=
"Edit"
@
click=
"handleUpdate(scope.row)"
></el-button>
</el-tooltip>
<el-tooltip
v-if=
"scope.row.roleId !== 1"
content=
"删除"
placement=
"top"
>
<el-button
v-hasPermi=
"['system:role:remove']"
link
type=
"primary"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
></el-button>
>
编辑
</el-button>
</el-tooltip>
<el-tooltip
v-if=
"scope.row.roleId !== 1"
content=
"
数据权限
"
content=
"
分配菜单
"
placement=
"top"
>
<el-button
v-hasPermi=
"['system:role:edit']"
link
plain
type=
"primary"
icon=
"CircleCheck"
@
click=
"handleDataScope(scope.row)"
></el-button>
>
分配菜单
</el-button>
</el-tooltip>
<el-tooltip
v-if=
"scope.row.roleId !== 1"
...
...
@@ -140,11 +128,24 @@
>
<el-button
v-hasPermi=
"['system:role:edit']"
link
plain
type=
"primary"
icon=
"User"
@
click=
"handleAuthUser(scope.row)"
></el-button>
>
分配用户
</el-button>
</el-tooltip>
<el-tooltip
v-if=
"scope.row.roleId !== 1"
content=
"删除"
placement=
"top"
>
<el-button
v-hasPermi=
"['system:role:remove']"
plain
type=
"danger"
icon=
"Delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</el-tooltip>
</
template
>
</el-table-column>
...
...
src/views/system/user/index.vue
View file @
ccf72362
...
...
@@ -127,7 +127,7 @@
align=
"center"
prop=
"userId"
/>
<el-table-column
label=
"用户类型"
align=
"center"
prop=
"userType"
>
<el-table-column
label=
"用户类型"
align=
"center"
prop=
"userType"
sortable
>
<template
#
default=
"scope"
>
<dict-tag
:options=
"sys_user_type"
:value=
"scope.row.userType"
/>
</
template
>
...
...
@@ -137,6 +137,7 @@
key=
"deptName"
label=
"所在机构"
align=
"center"
sortable
prop=
"dept.deptName"
:show-overflow-tooltip=
"true"
/>
...
...
@@ -165,6 +166,7 @@
v-if=
"columns[2].visible"
key=
"divsion"
label=
"事业部权限"
sortable
align=
"center"
prop=
"divsion"
:show-overflow-tooltip=
"true"
...
...
@@ -185,7 +187,7 @@
prop=
"phonenumber"
width=
"120"
/>
<el-table-column
label=
"用户状态"
align=
"center"
prop=
"status"
>
<el-table-column
label=
"用户状态"
align=
"center"
prop=
"status"
sortable
>
<
template
#
default=
"scope"
>
<dict-tag
:options=
"sys_user_status"
:value=
"scope.row.status"
/>
</
template
>
...
...
@@ -201,6 +203,7 @@
<el-table-column
v-if=
"columns[7].visible"
label=
"同步时间"
sortable
align=
"center"
prop=
"updateTime"
width=
"160"
...
...
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