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 b6e6f7e1
authored
Dec 19, 2023
by
Thews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20231219汪皖苏
1 parent
8a58e079
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
171 additions
and
39 deletions
src/api/index.js
src/views/total-archi-property-document/index.vue
src/api/index.js
View file @
b6e6f7e
...
...
@@ -237,7 +237,7 @@ export function getTypicalExampleDel(params) {
}
// 典型案例导出
export
function
getTypicalExampleExcel
(
params
)
{
return
post
(
'/excel/etTc'
,
params
);
return
download
(
'/excel/etTc'
,
params
);
}
// 总体架构资产文档库
...
...
@@ -247,5 +247,5 @@ export function getDocPoolList(params) {
}
// 新建总体架构资产文档
export
function
getDocPoolAdd
(
params
)
{
return
post
(
'/kl-doc-pool/cDocPool'
,
params
);
return
download
(
'/kl-doc-pool/cDocPool'
,
params
);
}
\ No newline at end of file
src/views/total-archi-property-document/index.vue
View file @
b6e6f7e
...
...
@@ -10,7 +10,7 @@
<div
class=
"search_menu_item"
>
<span
class=
"search_title"
>
文档类型
</span>
<el-select
v-model=
"params.fileType"
placeholder=
"请选择"
class=
"search_item"
>
<el-option
v-for=
"item in se
arch_select1"
:key=
"item.belongId"
:label=
"item.name"
:value=
"item.belongId
"
></el-option>
<el-option
v-for=
"item in se
lectData1"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value
"
></el-option>
</el-select>
</div>
<div
class=
"search_menu_item"
>
...
...
@@ -36,11 +36,12 @@
</div>
</div>
<div
class=
"search_btn"
>
<el-button
@
click=
"add"
type=
"primary"
size=
"medium"
icon=
"el-icon-document-add
"
>
新建
</el-button>
<el-button
type=
"primary"
size=
"medium"
icon=
"el-icon-document-add"
@
click=
"operate('add')
"
>
新建
</el-button>
<el-button
type=
"primary"
size=
"medium"
icon=
"el-icon-plus"
>
导出
</el-button>
</div>
<el-table
:height=
"tableHeight"
@
selection-change=
"select_table_rows"
v-loading=
"loading"
:data=
"tableData"
stripe
border
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectable"
></el-table-column>
<!--
<el-table
:height=
"tableHeight"
@
selection-change=
"select_table_rows"
v-loading=
"loading"
:data=
"tableData"
stripe
border
>
-->
<el-table
:height=
"tableHeight"
v-loading=
"loading"
:data=
"tableData"
stripe
border
>
<!--
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectable"
></el-table-column>
-->
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"fileName"
label=
"文档名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"fileType"
label=
"文档类型"
align=
"center"
></el-table-column>
...
...
@@ -96,8 +97,8 @@
</el-form>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
>
确定
</el-button>
<el-button
>
取消
</el-button>
<el-button
class=
"greenButton"
@
click=
"operate('create')"
>
确定
</el-button>
<el-button
@
click=
"add_dialog = false"
>
取消
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -105,18 +106,9 @@
<
script
>
import
{
query_jia_gou_yuan_su_guan_xi_table
,
add_jia_gou_ceng_ci
,
query_jia_gou_ceng_ci
,
add_jia_gou_gui_shu
,
query_jia_gou_gui_shu
,
delete_jia_gou_gui_shu
,
add_jia_gou_yuan_su
,
version_release_jia_gou_gui_shu
,
edit_jia_gou_yuan_su
,
getDocPoolList
,
getDocPoolAdd
,
getDianXingAnLiSelectData
,
}
from
'@/api/index.js'
;
import
{
MessageBox
,
Message
}
from
'element-ui'
;
import
$
from
'jquery'
;
...
...
@@ -141,8 +133,32 @@ export default {
query_item3
:
null
,
query_item4
:
null
,
loading
:
false
,
selectTable
:
[],
search_select1
:
[],
selectData1
:
[
{
label
:
"元模型"
,
value
:
1
,
},
{
label
:
"业务架构"
,
value
:
2
,
},
{
label
:
"应用架构"
,
value
:
3
,
},
{
label
:
"数据架构"
,
value
:
4
,
},
{
label
:
"技术架构"
,
value
:
5
,
},
{
label
:
"安全架构"
,
value
:
6
,
},
],
params
:
{
current
:
1
,
pageSize
:
10
,
...
...
@@ -168,6 +184,8 @@ export default {
// 初始化查询列表
this
.
getList
();
// 获取元素列表
// this.getFileTypeSelect();
},
methods
:
{
// 查询列表
...
...
@@ -179,31 +197,130 @@ export default {
}
});
},
set_table_height
()
{
//动态设置表格高度
const
table_container_height
=
$
(
".table_container"
).
height
();
const
search_menu_height
=
$
(
".search_menu"
).
height
();
const
search_btn_height
=
$
(
".search_btn"
).
outerHeight
(
true
);
this
.
tableHeight
=
table_container_height
-
search_menu_height
-
search_btn_height
-
90
+
'px'
;
// 重置
reset
()
{
this
.
params
=
{
current
:
1
,
pageSize
:
10
,
startTime
:
""
,
endTime
:
""
,
fileName
:
""
,
fileType
:
""
,
};
},
selectable
(
row
)
{
//表格勾选框禁用
if
(
row
.
state
==
1
)
{
return
false
;
// 禁用
}
else
{
return
true
;
//不禁用
// 所有操作
operate
(
type
,
item
){
this
.
openType
=
type
;
if
(
type
==
"add"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"新建案例"
;
this
.
resetForm
();
}
else
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"编辑案例"
;
this
.
formData
=
item
;
}
else
if
(
type
==
"create"
)
{
if
(
this
.
formData
.
ktcId
)
{
// 编辑保存
getTypicalExampleUpdate
(
this
.
formData
).
then
(
res
=>
{
console
.
log
(
this
.
formData
,
res
);
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"保存成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
else
{
this
.
add_dialog
=
false
;
this
.
$message
.
error
(
res
.
msg
);
}
});
}
else
{
// 新建保存
getTypicalExampleAdd
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"保存成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
else
{
this
.
add_dialog
=
false
;
this
.
$message
.
error
(
res
.
msg
);
}
});
}
}
else
if
(
type
==
"del"
)
{
// 删除
this
.
$confirm
(
"确认删除吗"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
let
params
=
{
ids
:
[
item
.
ktcId
],
};
getTypicalExampleDel
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"删除成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
});
}).
catch
(()
=>
{
});
}
else
if
(
type
==
"delMultiple"
)
{
if
(
this
.
selectList
.
length
<=
0
)
{
this
.
$message
.
error
(
"请选择一项进行删除"
);
return
;
}
let
params
=
{
ids
:
[],
};
this
.
selectList
.
map
(
item
=>
{
params
.
ids
.
push
(
item
.
ktcId
)
})
this
.
$confirm
(
"确认批量删除吗"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
getTypicalExampleDel
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"批量删除成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
});
}).
catch
(()
=>
{
});
}
},
select_table_rows
(
data
){
//表格的勾选
this
.
selectTable
=
data
;
// 新建清空表单
resetForm
(){
this
.
formData
=
{
tcName
:
''
,
tcType
:
''
,
prjType
:
''
,
buildContent
:
''
,
problemType
:
''
,
problemLevel
:
''
,
problemContent
:
''
,
archiDetail
:
""
,
}
},
add
()
{
//新建按钮
this
.
add_dialog
=
true
;
getFileTypeSelect
()
{
//案例类型下拉
const
params
=
{
key
:
"kl_file_type"
}
getDianXingAnLiSelectData
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
selectData1
=
res
.
data
;
console
.
log
(
this
.
selectData1
);
}
})
},
reset
()
{
//重置
this
.
query_item1
=
null
;
this
.
query_item3
=
null
;
this
.
query_item4
=
null
;
},
// 每页条数改变
handleSizeChange
(
val
)
{
this
.
pager
.
current
=
1
;
...
...
@@ -215,6 +332,20 @@ export default {
this
.
pager
.
current
=
val
;
this
.
getList
();
},
set_table_height
()
{
//动态设置表格高度
const
table_container_height
=
$
(
".table_container"
).
height
();
const
search_menu_height
=
$
(
".search_menu"
).
height
();
const
search_btn_height
=
$
(
".search_btn"
).
outerHeight
(
true
);
this
.
tableHeight
=
table_container_height
-
search_menu_height
-
search_btn_height
-
90
+
'px'
;
},
selectable
(
row
)
{
//表格勾选框禁用
if
(
row
.
state
==
1
)
{
return
false
;
// 禁用
}
else
{
return
true
;
//不禁用
}
},
}
}
</
script
>
...
...
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