Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 14acbd3b
authored
Apr 02, 2024
by
peiqiQQQ
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devG'
2 parents
12f4810f
7f0116b1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1125 additions
and
32 deletions
src/api/architectureInspection.js
src/api/index.js
src/main.js
src/router/index.js
src/utils/architectureInspectionDis.js
src/views/Main/menu.js
src/views/collectDataConfiguration/Form.vue
src/views/collectDataConfiguration/SearchFormItem.vue
src/views/collectDataConfiguration/TableConfig.vue
src/views/dictionaryManagement/Add.vue
src/views/dictionaryManagement/AddMaintenance.vue
src/views/dictionaryManagement/Maintenance.vue
src/views/dictionaryManagement/index.vue
src/views/supervisionDataCollection/UploadDialog.vue
src/api/architectureInspection.js
View file @
14acbd3
/* guo
架构督查 api
*/
import
{
EADC_ARRCHITECTURE
,
EADC_KNOWLEDGE_POOL
}
from
'@/config/micromodule'
import
{
EADC_ARRCHITECTURE
,
EADC_KNOWLEDGE_POOL
,
EADC_SHARED_ABILITY
}
from
'@/config/micromodule'
// 收集资料配置 查询
export
const
collectDataSearch
=
EADC_ARRCHITECTURE
+
'/Collect/CollectInformation/'
...
...
@@ -22,4 +22,8 @@ export const artPolicyExamineAdd = EADC_KNOWLEDGE_POOL + '/kl-tech-policy/'
// 审查 查询
export
const
examineSearch
=
EADC_ARRCHITECTURE
+
'/prj-info/'
// 字典管理
export
const
dictionarySearch
=
EADC_SHARED_ABILITY
+
'/dict/'
// 维护 查询
export
const
dictionaryMaintenanceSearch
=
EADC_SHARED_ABILITY
+
'/dictDetail/'
src/api/index.js
View file @
14acbd3
...
...
@@ -795,3 +795,6 @@ export function delKlPerson(params) {
export
function
postRequest
(
url
,
params
)
{
return
post
(
EADC_ARRCHITECTURE
+
url
,
params
)
}
export
function
postRequestShared
(
url
,
params
){
return
post
(
EADC_SHARED_ABILITY
+
url
,
params
)
}
\ No newline at end of file
src/main.js
View file @
14acbd3
...
...
@@ -8,12 +8,13 @@ import 'element-ui/lib/theme-chalk/index.css'
import
'./styles/element-variables.scss'
import
initDirective
from
'./directive'
import
{
postRequest
}
from
'@/api/index'
import
{
postRequest
,
postRequestShared
}
from
'@/api/index'
initDirective
(
Vue
)
Vue
.
prototype
.
$echarts
=
echarts
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$postRequest
=
postRequest
Vue
.
prototype
.
$postRequestShared
=
postRequestShared
Vue
.
use
(
ElementUI
)
Date
.
prototype
.
format
=
function
(
fmt
)
{
...
...
src/router/index.js
View file @
14acbd3
...
...
@@ -360,9 +360,14 @@ const routes = [
import
(
'@/views/architectureInspectionAnalysis/index.vue'
),
},
{
path
:
'/main/examine'
,
// 架构督查 - 架构督查分析
name
:
'examine'
,
component
:
()
=>
import
(
'@/views/artPolicyExamine/Examine.vue'
),
path
:
'/main/examine'
,
// 架构督查 - 架构督查分析
name
:
'examine'
,
component
:()
=>
import
(
'@/views/artPolicyExamine/Examine.vue'
),
},
{
path
:
'/main/dictionaryManagement'
,
// 系统管理 - 字典管理
name
:
'dictionaryManagement'
,
component
:
()
=>
import
(
'@/views/dictionaryManagement/index.vue'
),
},
],
},
...
...
src/utils/architectureInspectionDis.js
View file @
14acbd3
...
...
@@ -30,4 +30,13 @@ export const materialTypeList = [
export
const
superStateCode
=
[
{
label
:
'未发布'
,
value
:
0
},
{
label
:
'已发布'
,
value
:
1
},
]
export
const
flag
=
[
{
label
:
'显示'
,
value
:
'0'
},
{
label
:
'隐藏'
,
value
:
'1'
},
]
export
const
delFlag
=
[
{
label
:
'显示'
,
value
:
'0'
},
{
label
:
'隐藏'
,
value
:
'1'
},
]
\ No newline at end of file
src/views/Main/menu.js
View file @
14acbd3
...
...
@@ -367,4 +367,19 @@ export const menuOptions = [
},
],
},
{
name
:
'系统管理'
,
width
:
'220'
,
children
:
[
{
name
:
'字典管理'
,
children
:
[
{
name
:
' 字典管理 '
,
path
:
'/main/dictionaryManagement'
,
},
],
},
],
},
]
src/views/collectDataConfiguration/Form.vue
View file @
14acbd3
...
...
@@ -36,7 +36,7 @@
</template>
<
script
>
import
SearchFormItem
from
'
@/components
/SearchFormItem.vue'
import
SearchFormItem
from
'
.
/SearchFormItem.vue'
export
default
{
...
...
@@ -104,7 +104,7 @@ export default {
onValidate
(
callback
)
{
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
this
.
formData
)
//
console.log(this.formData)
callback
()
}
})
...
...
src/views/collectDataConfiguration/SearchFormItem.vue
0 → 100644
View file @
14acbd3
<!--
* @Description: 表单匹配项
* @Version: 2.0
* @Autor: pan
* @Date: 2024-03-12 15:11:47
* @LastEditors: pan
* @LastEditTime: 2024-04-01 17:08:42
-->
<
template
>
<div
class=
"form-item"
>
<el-input
v-if=
"isInput"
v-no-backslash
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
:placeholder=
"itemOptions.placeholder"
></el-input>
<el-input-number
v-if=
"isInputNumber"
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
:controls-position=
"itemOptions['controls-position'] || 'right'"
></el-input-number>
<el-select
v-if=
"isSelect"
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
clearable
>
<el-option
v-for=
"item in itemOptions.options"
:key=
"item[handleSelectValue]"
:label=
"item[handleSelectLabel]"
:value=
"item[handleSelectValue]"
></el-option>
</el-select>
<el-radio-group
v-if=
"isRadio"
v-bind=
"bindProps"
v-on=
"bindEvents"
v-model=
"currentVal"
>
<el-radio
v-for=
"item in itemOptions.options"
:key=
"item.value"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio
>
</el-radio-group>
<el-rate
v-if=
"isRate"
v-bind=
"bindProps"
v-on=
"bindEvents"
v-model=
"currentVal"
></el-rate>
<!-- datetimerange/daterange -->
<!--
<el-date-picker
v-if=
"isDatePickerDateRange"
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
:type=
"itemOptions.type || 'datetimerange'"
clearable
:picker-options=
"pickerOptionsRange"
start-placeholder=
"开始日期"
range-separator=
"至"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
-->
<!-- monthrange -->
<!--
<el-date-picker
v-if=
"isDatePickerMonthRange"
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
:type=
"itemOptions.type"
clearable
:picker-options=
"pickerOptionsRangeMonth"
start-placeholder=
"开始日期"
range-separator=
"至"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM"
></el-date-picker>
-->
<!-- other -->
<el-date-picker
v-if=
"isDatePickerOthers"
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
:type=
"itemOptions.type"
clearable
placeholder=
"请选择日期"
></el-date-picker>
<el-cascader
v-if=
"isCascader"
v-model=
"currentVal"
v-bind=
"bindProps"
v-on=
"bindEvents"
size=
"mini"
clearable
></el-cascader>
</div>
</
template
>
<
script
>
import
{
getDianXingAnLiSelectData
}
from
'@/api/index.js'
export
default
{
inheritAttrs
:
false
,
props
:
{
value
:
{},
itemOptions
:
{
type
:
Object
,
default
()
{
return
{}
},
},
},
data
()
{
return
{
// pickerOptionsRange: tools.pickerOptionsRange,
// pickerOptionsRangeMonth: tools.pickerOptionsRangeMonth,
}
},
computed
:
{
handleSelectValue
()
{
if
(
this
.
itemOptions
.
keyOption
)
{
return
this
.
itemOptions
.
keyOption
[
'value'
]
}
return
'value'
},
handleSelectLabel
()
{
if
(
this
.
itemOptions
.
keyOption
)
{
return
this
.
itemOptions
.
keyOption
[
'label'
]
}
return
'label'
},
// 双向绑定数据值
currentVal
:
{
get
()
{
if
(
this
.
isSelect
)
{
if
(
this
.
value
==
0
){
return
this
.
value
+
''
}
else
{
return
this
.
value
&&
this
.
value
+
''
}
}
else
{
return
this
.
value
}
},
set
(
val
)
{
this
.
$emit
(
'input'
,
val
)
},
},
// 绑定属性
bindProps
()
{
let
obj
=
{
...
this
.
itemOptions
}
// 移除冗余属性
delete
obj
.
label
delete
obj
.
prop
delete
obj
.
element
delete
obj
.
initValue
delete
obj
.
rules
delete
obj
.
events
if
(
obj
.
element
===
'el-select'
)
{
delete
obj
.
options
}
return
obj
},
// 绑定方法
bindEvents
()
{
return
this
.
itemOptions
.
events
||
{}
},
// el-input
isInput
()
{
return
this
.
itemOptions
.
element
===
'el-input'
},
// el-input-number
isInputNumber
()
{
return
this
.
itemOptions
.
element
===
'el-input-number'
},
// el-select
isSelect
()
{
return
this
.
itemOptions
.
element
===
'el-select'
},
// el-radio
isRadio
()
{
return
this
.
itemOptions
.
element
===
'el-radio'
},
// el-rate
isRate
()
{
return
this
.
itemOptions
.
element
===
'el-rate'
},
// el-date-picker (type: datetimerange/daterange)
isDatePickerDateRange
()
{
const
isDatePicker
=
this
.
itemOptions
.
element
===
'el-date-picker'
const
isDateRange
=
!
this
.
itemOptions
.
type
||
this
.
itemOptions
.
type
===
'datetimerange'
||
this
.
itemOptions
.
type
===
'daterange'
return
isDatePicker
&&
isDateRange
},
// el-date-picker (type: monthrange)
isDatePickerMonthRange
()
{
const
isDatePicker
=
this
.
itemOptions
.
element
===
'el-date-picker'
const
isMonthRange
=
this
.
itemOptions
.
type
===
'monthrange'
return
isDatePicker
&&
isMonthRange
},
// el-date-picker (type: other)
isDatePickerOthers
()
{
const
isDatePicker
=
this
.
itemOptions
.
element
===
'el-date-picker'
return
(
isDatePicker
&&
!
this
.
isDatePickerDateRange
&&
!
this
.
isDatePickerMonthRange
)
},
// el-cascader
isCascader
()
{
return
this
.
itemOptions
.
element
===
'el-cascader'
},
},
created
()
{
// 字典下拉框处理
if
(
this
.
isSelect
&&
this
.
itemOptions
.
dictType
)
{
this
.
getDictTypeOptions
(
this
.
itemOptions
.
dictType
)
}
},
methods
:
{
/**
* @description: 获取下拉框字典,并缓存
* @param {String} key 对应字典接口的参数值
* @author: pan
*/
async
getDictTypeOptions
(
key
)
{
var
dictTypeOptions
=
[]
var
storedDic
=
localStorage
.
getItem
(
'dic_'
+
key
)
if
(
storedDic
)
{
dictTypeOptions
=
JSON
.
parse
(
storedDic
)
}
else
{
const
params
=
{
key
}
const
res
=
await
getDianXingAnLiSelectData
(
params
)
if
(
res
.
code
!==
200
)
return
dictTypeOptions
=
res
.
data
const
jsonStr
=
JSON
.
stringify
(
res
.
data
)
localStorage
.
setItem
(
'dic_'
+
key
,
jsonStr
)
}
this
.
itemOptions
.
options
=
dictTypeOptions
this
.
$forceUpdate
()
},
},
components
:
{},
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/collectDataConfiguration/TableConfig.vue
View file @
14acbd3
...
...
@@ -87,8 +87,11 @@
? items.disabledCallback(scope.row, items.title)
: false
"
@
click=
"item.callback(scope.row, items.title)"
><span
v-if=
"!items.circle"
>
{{
items
.
title
}}
</span></el-button
@
click=
"item.callback(scope.row, items.title ? items.title : 'titleChange')"
>
<span
v-if=
"items.titleChange"
>
{{
items
.
titleChange
(
scope
.
row
,
items
.
title
)
}}
</span>
<span
v-else-if=
"!items.circle"
>
{{
items
.
title
}}
</span>
</el-button
>
</
template
>
</el-table-column>
...
...
@@ -231,24 +234,24 @@ export default {
this
.
$refs
.
tableConfig
.
clearSelection
()
},
handleToText
(
item
,
state
=
''
)
{
if
(
!
state
)
return
if
(
state
.
indexOf
(
','
)
>
-
1
){
let
stateVal
=
state
.
split
(
','
)
let
labelValue
=
''
stateVal
.
forEach
(
valItem
=>
{
const
arr
=
item
.
options
.
find
((
v
)
=>
v
.
value
==
valItem
)
||
{}
labelValue
+=
`,
${
arr
.
label
}
`
});
return
labelValue
.
slice
(
1
,
labelValue
.
length
)
}{
let
val
=
state
// if (!val) {
// val = item.emptyToNum || 0
// }
// let obj = item.options.find(item => item.value == val)
const
obj
=
item
.
options
.
find
((
v
)
=>
v
.
value
==
val
)
||
{}
return
obj
[
'label'
]
}
if
(
!
state
&&
typeof
state
!=
'number'
)
return
if
(
typeof
state
!=
'number'
&&
state
.
indexOf
(
','
)
>
-
1
){
let
stateVal
=
state
.
split
(
','
)
let
labelValue
=
''
stateVal
.
forEach
(
valItem
=>
{
const
arr
=
item
.
options
.
find
((
v
)
=>
v
.
value
==
valItem
)
||
{}
labelValue
+=
`,
${
arr
.
label
}
`
});
return
labelValue
.
slice
(
1
,
labelValue
.
length
)
}{
let
val
=
state
// if (!val) {
// val = item.emptyToNum || 0
// }
// let obj = item.options.find(item => item.value == val)
const
obj
=
item
.
options
.
find
((
v
)
=>
v
.
value
==
val
)
||
{}
return
obj
[
'label'
]
}
},
/**
* 切换分页数量
...
...
@@ -301,9 +304,14 @@ export default {
if
(
result
.
data
){
const
{
data
}
=
result
if
(
result
&&
result
.
code
===
200
)
{
this
.
pagination
.
totalRow
=
data
.
total
this
.
tableData
=
data
.
records
this
.
$emit
(
'fetchData'
,
data
)
if
(
data
instanceof
Array
){
// this.pagination.totalRow = data.total
this
.
tableData
=
data
}
else
{
this
.
pagination
.
totalRow
=
data
.
total
this
.
tableData
=
data
.
records
}
this
.
$emit
(
'fetchData'
,
data
)
}
else
{
this
.
$message
({
type
:
'warning'
,
...
...
src/views/dictionaryManagement/Add.vue
0 → 100644
View file @
14acbd3
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"showDialog"
:close-on-click-modal=
"false"
width=
"40%"
@
close=
"handleClose()"
@
open=
"handleOpen"
>
<Form
ref=
"addForm"
:form-options=
"formOptions"
label-width=
"120px"
id=
"addForm"
>
</Form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
size=
"mini"
>
保 存
</el-button >
<el-button
@
click=
"handleClose()"
size=
"mini"
>
取 消
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
Form
from
'@/views/collectDataConfiguration/Form.vue'
import
{
collectDataConfiguration
}
from
'@/api/architectureInspection'
import
{
delFlag
}
from
'@/utils/architectureInspectionDis'
export
default
{
components
:
{
Form
},
props
:
{
title
:
{
type
:
String
,
default
:
''
,
},
visible
:
{
type
:
Boolean
,
default
:
false
,
},
rowData
:
{
type
:
Object
,
default
:
()
=>
{},
},
},
data
()
{
return
{
query
:
{
url
:
collectDataConfiguration
,
method
:
'post'
,
queryParam
:
{},
},
}
},
computed
:
{
formOptions
()
{
return
[
{
label
:
'字典名称'
,
// label文字
prop
:
'name'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
},
{
label
:
'字典标识'
,
// label文字
prop
:
'typeValue'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
},
{
label
:
'启用状态'
,
// label文字
prop
:
'delFlag'
,
// 字段名
element
:
'el-select'
,
// 指定elementui组件
placeholder
:
'请选择'
,
// elementui组件属性
options
:
delFlag
,
rules
:
[{
required
:
true
,
trigger
:
'change'
,
message
:
'不能为空'
}],
},
{
label
:
'排序'
,
// label文字
prop
:
'sort'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请填写排序(默认请填0)'
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
},
{
label
:
'描述'
,
// label文字
prop
:
'remark'
,
// 字段名
type
:
'textarea'
,
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
span
:
24
,
// rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
]
},
showDialog
:
{
get
()
{
return
this
.
visible
},
set
(
value
)
{
this
.
$emit
(
'update:visible'
,
value
)
},
},
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
'addForm'
].
onValidate
(()
=>
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'保存中'
,
spinner
:
'el-icon-loading'
,
})
const
formInfo
=
this
.
$refs
[
'addForm'
].
getData
()
let
params
=
Object
.
keys
(
this
.
rowData
).
length
?
{
...
this
.
rowData
,
...
formInfo
,
}
:
{
...
formInfo
,
}
let
url
=
Object
.
keys
(
this
.
rowData
).
length
?
'/dict/update'
:
'/dict/create'
// 编辑
this
.
$postRequestShared
(
url
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
loading
.
close
()
this
.
$message
.
success
(
'保存成功'
)
this
.
showDialog
=
false
this
.
handleClose
()
this
.
$emit
(
'querySearch'
)
}
})
})
},
handleClose
()
{
this
.
showDialog
=
false
this
.
formOptions
.
forEach
((
v
)
=>
{
v
.
initValue
=
''
})
this
.
$refs
[
'addForm'
].
addInitValue
()
this
.
$refs
[
'addForm'
].
onReset
()
},
handleOpen
()
{
if
(
Object
.
keys
(
this
.
rowData
).
length
)
{
this
.
formOptions
.
forEach
((
v
)
=>
{
v
.
initValue
=
this
.
rowData
[
v
.
prop
]
})
// console.log(this.rowData);
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'addForm'
].
addInitValue
()
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'addForm'
].
addInitValue
()
this
.
$refs
[
'addForm'
].
onReset
()
})
}
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
@import
'@/styles/elementui.scss'
;
/
deep
/
#addForm
{
.el-select,
.el-input{
width
:
60%
!important
;
>.el-input{
width
:
100%
!important
;
}
}
}
</
style
>
\ No newline at end of file
src/views/dictionaryManagement/AddMaintenance.vue
0 → 100644
View file @
14acbd3
<
template
>
<el-dialog
:title=
"title"
:visible
.
sync=
"showDialog"
width=
"40%"
@
close=
"handleClose()"
@
open=
"handleOpen"
>
<Form
ref=
"addForm"
:form-options=
"formOptions"
label-width=
"120px"
id=
"addForm"
>
</Form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
size=
"mini"
>
保 存
</el-button >
<el-button
@
click=
"handleClose()"
size=
"mini"
>
取 消
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
Form
from
'@/views/collectDataConfiguration/Form.vue'
import
{
collectDataConfiguration
}
from
'@/api/architectureInspection'
import
{
flag
}
from
'@/utils/architectureInspectionDis'
export
default
{
components
:
{
Form
},
props
:
{
title
:
{
type
:
String
,
default
:
''
,
},
visible
:
{
type
:
Boolean
,
default
:
false
,
},
rowData
:
{
type
:
Object
,
default
:
()
=>
{},
},
dictId
:
{
type
:
Number
,
default
:
0
,
}
},
data
()
{
return
{
query
:
{
url
:
collectDataConfiguration
,
method
:
'post'
,
queryParam
:
{},
},
}
},
computed
:
{
formOptions
()
{
return
[
{
label
:
'字典值'
,
// label文字
prop
:
'value'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
},
{
label
:
'字典值描述'
,
// label文字
prop
:
'label'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
// rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
{
label
:
'等级'
,
// label文字
prop
:
'grade'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
},
{
label
:
'排序'
,
// label文字
prop
:
'sort'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请填写排序(默认请填0)'
,
// elementui组件属性
rules
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'不能为空'
}],
},
{
label
:
'启用状态'
,
// label文字
prop
:
'flag'
,
// 字段名
element
:
'el-select'
,
// 指定elementui组件
placeholder
:
'请选择'
,
// elementui组件属性
options
:
flag
,
rules
:
[{
required
:
true
,
trigger
:
'change'
,
message
:
'不能为空'
}],
},
{
label
:
'描述'
,
// label文字
prop
:
'remark'
,
// 字段名
type
:
'textarea'
,
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
span
:
24
,
// rules: [{ required: true, trigger: 'blur', message: '不能为空' }],
},
]
},
showDialog
:
{
get
()
{
return
this
.
visible
},
set
(
value
)
{
this
.
$emit
(
'update:visible'
,
value
)
},
},
},
methods
:
{
handleSubmit
()
{
this
.
$refs
[
'addForm'
].
onValidate
(()
=>
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'保存中'
,
spinner
:
'el-icon-loading'
,
})
const
formInfo
=
this
.
$refs
[
'addForm'
].
getData
()
let
params
=
Object
.
keys
(
this
.
rowData
).
length
?
{
...
this
.
rowData
,
...
formInfo
,
dictId
:
this
.
dictId
}
:
{
...
formInfo
,
dictId
:
this
.
dictId
}
let
url
=
Object
.
keys
(
this
.
rowData
).
length
?
'/dictDetail/update'
:
'/dictDetail/create'
this
.
$postRequestShared
(
url
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
loading
.
close
()
this
.
$message
.
success
(
'保存成功'
)
this
.
showDialog
=
false
this
.
handleClose
()
this
.
$emit
(
'querySearch'
)
}
})
})
},
handleClose
()
{
this
.
showDialog
=
false
this
.
formOptions
.
forEach
((
v
)
=>
{
v
.
initValue
=
''
})
this
.
$refs
[
'addForm'
].
addInitValue
()
this
.
$refs
[
'addForm'
].
onReset
()
},
handleOpen
()
{
if
(
Object
.
keys
(
this
.
rowData
).
length
)
{
this
.
formOptions
.
forEach
((
v
)
=>
{
v
.
initValue
=
this
.
rowData
[
v
.
prop
]
})
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'addForm'
].
addInitValue
()
})
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'addForm'
].
addInitValue
()
this
.
$refs
[
'addForm'
].
onReset
()
})
}
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
//
@import
'@/styles/elementui.scss'
;
/
deep
/
#addForm
{
.el-select,
.el-input{
width
:
60%
!important
;
>.el-input{
width
:
100%
!important
;
}
}
}
</
style
>
\ No newline at end of file
src/views/dictionaryManagement/Maintenance.vue
0 → 100644
View file @
14acbd3
<
template
>
<div>
<el-dialog
:title=
"'维护'"
:visible
.
sync=
"showDialog"
width=
"90%"
@
close=
"showDialog = false"
@
open=
"handleOpen"
>
<div
class=
"searchTable"
>
<list-page>
<!-- 查询表单插槽 -->
<template
#
formWrap
>
<SearchForm
ref=
"searchForm"
@
onSearch=
"querySearch"
:form-options=
"formOptions"
/>
</
template
>
<!-- 中部操作按钮 -->
<
template
#
operationWrap
>
<el-button
type=
"primary"
icon=
"el-icon-document-add"
size=
"medium"
plain
@
click=
"fnAdd"
>
新建
</el-button >
</
template
>
<!-- 表格插槽 -->
<
template
#
tableWrap
>
<table-config
ref=
"searchTable"
:query=
"query"
:columns=
"columns"
id-key=
"elementId"
:hasPagination=
'false'
>
</table-config>
</
template
>
</list-page>
</div>
</el-dialog>
<AddMaintenance
@
querySearch=
"querySearch"
:visible
.
sync=
"addVisible"
:row-data=
"addRowData"
:title=
"dialogTitle"
:dictId=
'rowData.id'
/>
</div>
</template>
<
script
>
import
ListPage
from
'@/components/ListPage.vue'
import
SearchForm
from
'@/components/SearchForm.vue'
import
TableConfig
from
'@/views/collectDataConfiguration/TableConfig.vue'
import
{
dictionaryMaintenanceSearch
}
from
'@/api/architectureInspection'
import
{
flag
}
from
'@/utils/architectureInspectionDis'
import
AddMaintenance
from
'./AddMaintenance.vue'
export
default
{
name
:
'Maintenance'
,
components
:
{
ListPage
,
SearchForm
,
TableConfig
,
AddMaintenance
},
props
:
{
title
:
{
type
:
String
,
default
:
''
,
},
visible
:
{
type
:
Boolean
,
default
:
false
,
},
rowData
:
{
type
:
Object
,
default
:
()
=>
{},
},
},
computed
:
{
formOptions
()
{
return
[
{
label
:
'字典描述'
,
// label文字
prop
:
'label'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
},
{
label
:
'启用状态'
,
// label文字
prop
:
'flag'
,
// 字段名
element
:
'el-select'
,
// 指定elementui组件
placeholder
:
'请选择'
,
// elementui组件属性
options
:
flag
,
},
]
},
columns
()
{
return
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
'80px'
},
{
label
:
'字典描述'
,
prop
:
'label'
},
{
label
:
'字典值'
,
prop
:
'value'
,
width
:
'150px'
,},
{
label
:
'等级'
,
prop
:
'grade'
,
width
:
'150px'
},
{
label
:
'排序'
,
prop
:
'sort'
,
width
:
'80px'
},
{
label
:
'启用状态'
,
prop
:
'flag'
,
width
:
'120px'
,
collectionType
:
'flag'
,
options
:
flag
,
},
{
label
:
'描述'
,
prop
:
'remark'
},
{
label
:
'操作'
,
type
:
'operation'
,
width
:
'360px'
,
actionButtons
:
[
{
title
:
'编辑'
,
type
:
'primary'
,
size
:
'mini'
,
plain
:
true
,
icon
:
'el-icon-edit'
,
// disabledCallback: (row, title) => {
// return row.state == '1' ? true : false
// },
},
{
title
:
''
,
titleChange
:
(
row
)
=>
{
return
row
.
flag
==
0
?
'禁用'
:
'启用'
},
size
:
'mini'
,
icon
:
'el-icon-chat-dot-round'
,
type
:
'primary'
,
plain
:
true
,
// disabledCallback: (row, title) => {
// return row.state == '1' ? true : false
// },
},
],
callback
:
(
row
,
title
)
=>
{
this
.
fnOperation
(
row
,
title
)
},
},
]
},
showDialog
:
{
get
()
{
return
this
.
visible
},
set
(
value
)
{
this
.
$emit
(
'update:visible'
,
value
)
},
},
},
data
(){
return
{
query
:
{
url
:
dictionaryMaintenanceSearch
,
method
:
'post'
,
queryParam
:
{},
},
addVisible
:
false
,
addRowData
:
{},
dialogTitle
:
''
,
}
},
methods
:
{
querySearch
(
data
)
{
this
.
query
.
queryParam
=
{
...
this
.
query
.
queryParam
,
...
data
,
}
this
.
$refs
.
searchTable
.
queryData
()
},
fnAdd
()
{
this
.
addVisible
=
true
this
.
addRowData
=
{}
this
.
dialogTitle
=
'数据字典详情新建'
},
fnOperation
(
row
,
title
)
{
switch
(
title
)
{
case
'编辑'
:
this
.
fnEdit
(
row
)
break
break
case
'titleChange'
:
this
.
fnEnable
(
row
)
default
:
break
}
},
fnEdit
(
row
)
{
this
.
dialogTitle
=
'数据字典详情修改'
this
.
addRowData
=
row
this
.
addVisible
=
true
},
fnEnable
(
row
){
let
title
=
row
.
flag
?
'启用'
:
'禁用'
this
.
$confirm
(
'是否确认?'
+
title
,
'提示'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
this
.
$postRequestShared
(
'/dictDetail/delete'
,
{
id
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
title
+
'成功'
)
this
.
$refs
.
searchTable
.
queryData
()
}
else
{
this
.
$message
.
error
(
title
+
'失败'
)
}
})
})
.
catch
(()
=>
{})
},
handleOpen
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
searchForm
.
addInitValue
()
this
.
$refs
.
searchForm
.
onReset
()
})
this
.
query
.
queryParam
.
dictId
=
this
.
rowData
.
id
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/styles/elementui.scss'
;
::v-deep
.searchTable
{
.tableConfig{
height
:
32vh
!important
;
}
}
</
style
>
\ No newline at end of file
src/views/dictionaryManagement/index.vue
0 → 100644
View file @
14acbd3
<
template
>
<div
class=
"searchTable"
>
<list-page>
<!-- 查询表单插槽 -->
<template
#
formWrap
>
<SearchForm
@
onSearch=
"querySearch"
:form-options=
"formOptions"
/>
</
template
>
<!-- 中部操作按钮 -->
<
template
#
operationWrap
>
<el-button
type=
"primary"
icon=
"el-icon-document-add"
size=
"medium"
plain
@
click=
"fnAdd"
>
新建
</el-button >
</
template
>
<!-- 表格插槽 -->
<
template
#
tableWrap
>
<table-config
ref=
"searchTable"
:query=
"query"
:columns=
"columns"
id-key=
"elementId"
>
</table-config>
</
template
>
</list-page>
<Add
@
querySearch=
"querySearch"
:visible
.
sync=
"visible"
:row-data=
"rowData"
:title=
"dialogTitle"
></Add>
<!-- <Detail ref="Detail" :prjCodeDetail='detailPrjCode' :visible.sync="visibleDetail" @selectTabel='selectTabel' :title="detailTitle"/> -->
<Maintenance
:row-data=
"rowData"
@
querySearch=
"querySearch"
:visible
.
sync=
"maintenanceVisible"
/>
</div>
</template>
<
script
>
import
ListPage
from
'@/components/ListPage.vue'
import
SearchForm
from
'@/components/SearchForm.vue'
import
TableConfig
from
'@/views/collectDataConfiguration/TableConfig.vue'
import
{
dictionarySearch
}
from
'@/api/architectureInspection'
import
{
delFlag
}
from
'@/utils/architectureInspectionDis'
import
Add
from
'./Add.vue'
import
Maintenance
from
'./Maintenance.vue'
export
default
{
name
:
'dictionaryManagement'
,
components
:
{
ListPage
,
SearchForm
,
TableConfig
,
Add
,
Maintenance
},
computed
:
{
formOptions
()
{
return
[
{
label
:
'字典名称'
,
// label文字
prop
:
'name'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
},
{
label
:
'字典标识'
,
// label文字
prop
:
'typeValue'
,
// 字段名
element
:
'el-input'
,
// 指定elementui组件
placeholder
:
'请输入内容'
,
// elementui组件属性
},
{
label
:
'启用状态'
,
// label文字
prop
:
'delFlag'
,
// 字段名
element
:
'el-select'
,
// 指定elementui组件
placeholder
:
'请选择'
,
// elementui组件属性
options
:
delFlag
,
},
]
},
columns
()
{
return
[
{
label
:
'序号'
,
type
:
'index'
,
width
:
'80px'
},
{
label
:
'字典名称'
,
prop
:
'name'
,
width
:
'150px'
,},
{
label
:
'字典标识'
,
prop
:
'typeValue'
,
width
:
'150px'
,},
{
label
:
'描述'
,
prop
:
'remark'
,
width
:
'150px'
},
{
label
:
'排序'
,
prop
:
'sort'
,
width
:
'80px'
},
{
label
:
'启用状态'
,
prop
:
'delFlag'
,
width
:
'120px'
,
collectionType
:
'delFlag'
,
options
:
delFlag
,
},
{
label
:
'创建日期'
,
prop
:
'createTime'
,
width
:
'120px'
},
{
label
:
'创建人'
,
prop
:
'createMan'
,
},
{
label
:
'最终修改时间'
,
prop
:
'lastUpdateTime'
,
},
{
label
:
'最终修改人'
,
prop
:
'lastUpdateMan'
,
},
{
label
:
'操作'
,
type
:
'operation'
,
width
:
'360px'
,
actionButtons
:
[
{
title
:
'编辑'
,
type
:
'primary'
,
size
:
'mini'
,
plain
:
true
,
icon
:
'el-icon-edit'
,
// disabledCallback: (row, title) => {
// return row.state == '1' ? true : false
// },
},
{
title
:
'维护'
,
size
:
'mini'
,
type
:
'primary'
,
plain
:
true
,
icon
:
'el-icon-data-analysis'
,
// disabledCallback: (row, title) => {
// return row.state == '1' ? true : false
// },
},
{
title
:
''
,
titleChange
:
(
row
)
=>
{
return
row
.
delFlag
==
0
?
'禁用'
:
'启用'
},
size
:
'mini'
,
icon
:
'el-icon-chat-dot-round'
,
type
:
'primary'
,
plain
:
true
,
},
],
callback
:
(
row
,
title
)
=>
{
this
.
fnOperation
(
row
,
title
)
},
},
]
},
},
data
(){
return
{
query
:
{
url
:
dictionarySearch
,
method
:
'post'
,
queryParam
:
{
},
},
visible
:
false
,
// 新增 修改
rowData
:
{},
dialogTitle
:
''
,
maintenanceVisible
:
false
,
// 维护
}
},
methods
:
{
querySearch
(
data
)
{
this
.
query
.
queryParam
=
{
...
this
.
query
.
queryParam
,
...
data
,
}
this
.
$refs
.
searchTable
.
queryData
()
},
fnAdd
()
{
this
.
visible
=
true
this
.
rowData
=
{}
this
.
dialogTitle
=
'新建'
},
fnOperation
(
row
,
title
)
{
switch
(
title
)
{
case
'编辑'
:
this
.
fnEdit
(
row
)
break
case
'维护'
:
this
.
fnMaintenance
(
row
)
break
case
'titleChange'
:
this
.
fnDisabled
(
row
)
default
:
break
}
},
fnEdit
(
row
)
{
this
.
dialogTitle
=
'修改'
this
.
rowData
=
row
this
.
visible
=
true
},
fnMaintenance
(
row
){
this
.
maintenanceVisible
=
true
this
.
rowData
=
row
},
fnDisabled
(
row
){
let
title
=
row
.
delFlag
==
1
?
'启用'
:
'禁用'
this
.
$confirm
(
`是否确认
${
title
}
?`
,
'提示'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
this
.
$postRequestShared
(
'/dict/delete'
,
{
id
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
title
+
'成功'
)
this
.
$refs
.
searchTable
.
queryData
()
}
else
{
this
.
$message
.
error
(
title
+
'失败'
)
}
})
})
.
catch
(()
=>
{})
},
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/views/supervisionDataCollection/UploadDialog.vue
View file @
14acbd3
...
...
@@ -55,7 +55,6 @@
<
script
>
import
{
getDictTypeOptions
}
from
'@/utils'
import
{
queryProjectInfoManageTable
,
editDeleteProjectInfoManageTable
,
...
...
@@ -100,7 +99,7 @@ export default {
},
methods
:
{
getDicts
()
{
getDictTypeOptions
(
'prj_data'
).
then
((
res
)
=>
{
this
.
getDictTypeOptions
(
'prj_data'
).
then
((
res
)
=>
{
this
.
tableData
=
res
.
map
((
v
)
=>
{
return
{
label
:
v
.
label
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment