Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dxgaqgl-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
李苏
dxgaqgl-vue
Commits
a8c5ec9b
Commit
a8c5ec9b
authored
May 07, 2025
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
0de5de6f
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1703 additions
and
3 deletions
+1703
-3
index.js
src/router/index.js
+85
-2
permission.js
src/store/modules/permission.js
+5
-1
dialog.vue
src/views/contingency/yjylcx/dialog.vue
+44
-0
edit.vue
src/views/contingency/yjylcx/edit.vue
+95
-0
index.vue
src/views/contingency/yjylcx/index.vue
+232
-0
api.js
src/views/flfggl/flfg/api.js
+41
-0
index.vue
src/views/flfggl/flfg/index.vue
+330
-0
lessEdit.vue
src/views/flfggl/flfg/lessEdit.vue
+63
-0
dialog.vue
src/views/train/aqpxcx/dialog.vue
+44
-0
edit.vue
src/views/train/aqpxcx/edit.vue
+95
-0
index.vue
src/views/train/aqpxcx/index.vue
+235
-0
api.js
src/views/zdczgcgl/zdccgc/api.js
+41
-0
index.vue
src/views/zdczgcgl/zdccgc/index.vue
+330
-0
lessEdit.vue
src/views/zdczgcgl/zdccgc/lessEdit.vue
+63
-0
No files found.
src/router/index.js
View file @
a8c5ec9b
...
...
@@ -1352,6 +1352,19 @@ export const powerRoutes = [{
},
name
:
'contingencystudy'
,
path
:
"contingencystudy"
},
{
component
:
'contingency/yjylcx/index'
,
hidden
:
false
,
meta
:
{
"title"
:
"应急演练查询"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
904100700
,
},
name
:
'yjylcx'
,
path
:
"yjylcx"
}
]
},
...
...
@@ -2103,6 +2116,19 @@ export const powerRoutes = [{
name
:
'aqpx'
,
path
:
"aqpx"
},
{
component
:
'train/aqpxcx/index'
,
hidden
:
false
,
meta
:
{
"title"
:
"安全培训查询"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
906001900
,
},
name
:
'aqpxcx'
,
path
:
"aqpxcx"
},
{
component
:
'train/aqpxjh/index'
,
hidden
:
false
,
...
...
@@ -2605,12 +2631,69 @@ export const powerRoutes = [{
]
},
{
path
:
'/zdczgcgl'
,
component
:
'Layout'
,
hidden
:
false
,
alwaysShow
:
true
,
redirect
:
'zdccgc'
,
meta
:
{
title
:
"制度操作规程管理"
,
icon
:
"fa-cog"
,
noCache
:
false
,
link
:
null
,
mkid
:
'1913000000'
},
children
:
[{
component
:
'zdczgcgl/zdccgc/index'
,
hidden
:
false
,
meta
:
{
"title"
:
"制度操作规程"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
'1913000100'
,
},
name
:
'zdccgc'
,
path
:
"zdccgc"
},
]
},
{
path
:
'/flfggl'
,
component
:
'Layout'
,
hidden
:
false
,
alwaysShow
:
true
,
redirect
:
'flfg'
,
meta
:
{
title
:
"法律法规管理"
,
icon
:
"fa-cog"
,
noCache
:
false
,
link
:
null
,
mkid
:
'1914000000'
},
children
:
[{
component
:
'flfggl/flfg/index'
,
hidden
:
false
,
meta
:
{
"title"
:
"法律法规"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
'1914000100'
,
},
name
:
'flfg'
,
path
:
"flfg"
},
]
},
]
// 公共路由
export
const
constantRoutes
=
[{
export
const
constantRoutes
=
[
{
path
:
"/paper/:id"
,
component
:
()
=>
import
(
'@/views/train/testPaper/index.vue'
),
// component:'train/testPaper/index',
hidden
:
true
,
meta
:
{
"title"
:
"考试试卷"
,
...
...
src/store/modules/permission.js
View file @
a8c5ec9b
...
...
@@ -120,7 +120,7 @@ const permission = {
(
item
)
=>
{
let
hasMkid
=
true
asymenus
.
forEach
(
e
=>
{
if
((
e
.
mkid
==
item
.
meta
.
mkid
)
||
(
item
.
meta
.
mkid
==
'test'
)
)
{
if
((
e
.
mkid
==
item
.
meta
.
mkid
)
)
{
item
.
meta
.
icon
=
e
.
icon
if
(
item
.
meta
.
mkid
!=
'test'
)
{
item
.
meta
.
title
=
e
.
mkmc
...
...
@@ -139,6 +139,7 @@ const permission = {
return
newData
}
let
newPowerRoutes
=
filter
(
powerRoutes
)
let
newCommonList
=
filter
(
commonList
.
list
)
let
newErpList
=
filter
(
erpList
.
list
)
...
...
@@ -156,6 +157,7 @@ const permission = {
res
.
data
=
dynamicRouter
([...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
],
asymenus
)
||
[...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
]
console
.
log
(
res
.
data
,
'res.data.................'
)
/* 重置首页路由*/
// let hompePage = treeToList([...newCommonList,...newErpList,...newPowerRoutes]).filter(item=>item.mkid==localStorage.getItem('homeMkid'))
let
ttlist
=
treeToList
([...
newCommonList
,
...
newErpList
,
...
newPowerRoutes
])
...
...
@@ -231,7 +233,9 @@ const permission = {
// res.data=[...newCommonList,...newErpList,...newPowerRoutes]
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
const
rdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
console
.
log
(
rdata
,
'rdata'
)
const
sidebarRoutes
=
filterAsyncRouter
(
sdata
)
const
rewriteRoutes
=
filterAsyncRouter
(
rdata
,
false
,
true
)
const
asyncRoutes
=
filterDynamicRoutes
(
dynamicRoutes
);
rewriteRoutes
.
push
({
...
...
src/views/contingency/yjylcx/dialog.vue
0 → 100644
View file @
a8c5ec9b
<
template
>
<DefaultDialog
:app=
'app'
>
<div
slot=
"form"
style=
"display: flex;height: 70vh;"
>
</div>
<div
slot=
"reFooter"
class=
"refooter"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"app.showDialog=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"save()"
>
保 存
</el-button>
</span>
</div>
</DefaultDialog>
</
template
>
<
script
>
export
default
{
props
:
{
app
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
async
mounted
()
{
},
data
()
{
return
{
}
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/contingency/yjylcx/edit.vue
0 → 100644
View file @
a8c5ec9b
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-09-19 14:24:01
* @FilePath: /easyWork/static/baseEdit.vue
-->
<
template
>
<!-- prop 穿透赋值 -->
<BaseEdit
v-bind=
"$attrs"
:config=
'editConfig'
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</
template
>
<
template
#
toolbar=
"ctx"
>
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!--
<el-button
@
click=
"demo(ctx.editPage)"
size=
'mini'
type=
"primary"
>
示例按钮
</el-button>
-->
<!--
<AuxButton
:dynamic=
'true'
:queryParams=
"
{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</
template
>
</BaseEdit>
</template>
<
script
>
export
default
{
data
()
{
return
{
editConfig
:
{
/* 生成form表单 */
editColItemList
:
[{
label
:
'编码'
,
prop
:
'code'
,
span
:
12
,
type
:
'input'
,
required
:
true
,
},
{
label
:
'名称'
,
prop
:
'name'
,
span
:
12
,
type
:
'input'
,
required
:
true
,
},
{
label
:
'备注'
,
prop
:
'bz'
,
span
:
24
,
type
:
'input'
},
],
/* 生成主从表,为空数组默认不展示 */
editTableTitle
:
[
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable
:
''
}
}
},
methods
:
{
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/views/contingency/yjylcx/index.vue
0 → 100644
View file @
a8c5ec9b
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2025-05-07 15:17:48
* @FilePath: /dxgaqgl-vue/src/views/contingency/yjylcx/index.vue
-->
<
template
>
<BasePage
:power=
'power'
ref=
"basePage"
class=
"min_full"
:config=
"config"
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
<
template
#
toolbar=
"ctx"
>
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!--
<el-button
@
click=
"demo(ctx.basePage)"
size=
'mini'
type=
"primary"
>
示例按钮
</el-button>
-->
</
template
>
</BasePage>
</template>
<
script
>
// import Edit from './edit.vue'
export
default
{
name
:
'template'
,
data
()
{
return
{
power
:
{
add
:
false
,
copy
:
false
,
/* 手动控制删除 */
delButton
:
false
,
/* 手动控制编辑按钮权限 */
editButton
:
false
,
/* 是否渲染右侧操作按钮 */
operateButtons
:
false
,
/* 是否开启工作流按钮 */
workFlow
:
false
,
/* 表格开启选择,以及记住选择 */
showSelection
:
false
,
saveSelected
:
false
},
config
:
{
/* 基本配置*/
url
:
'aqgl/yjgl/yjylcx'
,
tableTitle
:
[{
label
:
"年度"
,
prop
:
"year"
,
fieldType
:
"int"
},
//{label: "季度", prop: "quarter", fieldType: "ftString",width:80},
{
label
:
"季度"
,
prop
:
"quarter"
,
formatter
:
function
(
row
,
column
,
value
,
index
)
{
let
jdobj
=
[
''
,
'第一季度'
,
'第二季度'
,
'第三季度'
,
'第四季度'
]
return
jdobj
[
value
]
},
fieldType
:
"ftString"
,
width
:
80
},
{
label
:
"演练名称"
,
prop
:
"name"
,
fieldType
:
"ftString"
,
width
:
180
},
{
label
:
"状态"
,
prop
:
"zt"
,
width
:
80
,
formatter
(
row
,
c
,
v
)
{
if
(
row
.
attachcount
>
0
)
{
return
'完成'
}
else
{
return
'未完成'
}
}
},
{
label
:
"月份"
,
prop
:
"month"
,
width
:
80
},
{
label
:
"分公司"
,
prop
:
"gsName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
label
:
"演练组织单位"
,
prop
:
"yldwName"
,
fieldType
:
"ftString"
,
width
:
192
},
// {label: "演练计划", prop: "yljhName", fieldType: "ftString",width:192},
/*{label: "培训人数", prop: "pxrs", fieldType: "int"},*/
{
label
:
"演练地点"
,
prop
:
"ylmb"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"演练等级"
,
prop
:
"yldj"
,
width
:
180
,
transform
:
{
url
:
'aqgl/yjgl/yjyljh/init/yldj'
,
label
:
'name'
,
value
:
'id'
}
},
{
label
:
"演练时间"
,
prop
:
"ylrq"
,
fieldType
:
"ftDateTime"
},
{
label
:
"演练责任人"
,
prop
:
"ylzrrName"
,
fieldType
:
"ftString"
,
width
:
192
},
/*{label: "演练时长", prop: "ylsc", fieldType: "float"},*/
{
label
:
"协办单位"
,
prop
:
"zbdwid"
,
fieldType
:
"ftString"
,
width
:
192
},
// {label: "演练负责人", prop: "ylfzrName", fieldType: "ftString",width:192},
// {label: "质量负责人", prop: "zlfzrName", fieldType: "ftString",width:192},
{
label
:
"演练人数"
,
prop
:
"ylrs"
,
width
:
120
},
],
queryParams
:
[
[{
label
:
'是否完成'
,
prop
:
'isComplete'
,
span
:
4
,
type
:
'checkboxYN'
,
value
:
'N'
},
{
label
:
'日期'
,
startProp
:
"ksrq"
,
endProp
:
"jsrq"
,
span
:
8
,
type
:
'RelDaterangeV2'
,
startValue
:
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
*
30
,
endValue
:
new
Date
().
getTime
(),
},
{
"label"
:
"公司"
,
"prop"
:
"pid"
,
"span"
:
4
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
onChange
:
this
.
onChange
,
"src"
:
"jcsj/common/bm/queryGs"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"bmmc"
}
}
},
{
"label"
:
"部门"
,
"prop"
:
"bmId"
,
"span"
:
4
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
linkParams
:
[
'pid'
],
linkage
:
true
,
"src"
:
"jcsj/common/bm/queryBm"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"bmmc"
}
}
},
{
"label"
:
"班组"
,
"prop"
:
"bzId"
,
"span"
:
4
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
linkParams
:
[
'pid'
],
linkage
:
true
,
"src"
:
"jcsj/common/bm/queryBz"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"bmmc"
}
}
},
]
],
/* 默认启停用 */
}
}
},
methods
:
{
onChange
(
item
)
{
this
.
$refs
.
basePage
.
queryParams
.
gsid
=
item
.
id
}
},
components
:
{
// Edit
}
}
</
script
>
<
style
>
</
style
>
src/views/flfggl/flfg/api.js
0 → 100644
View file @
a8c5ec9b
import
request
from
'common/src/utils/request'
/* query */
export
function
doQuery
(
query
)
{
return
request
({
url
:
'/aqgl/flfg/uflfg/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
/* 更新 */
export
function
doUpdate
(
query
)
{
return
request
({
url
:
'/aqgl/flfg/uflfg/update'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doAdd
(
query
)
{
return
request
({
url
:
'/aqgl/flfg/uflfg/add'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doDelete
(
query
)
{
return
request
({
url
:
'/aqgl/flfg/uflfg/delete'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doQuerytree
(
query
)
{
return
request
({
url
:
'/aqgl/flfg/uflfg/query/tree'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/views/flfggl/flfg/index.vue
0 → 100644
View file @
a8c5ec9b
<
template
>
<div
style=
"display: flex;"
>
<el-dialog
:fullscreen=
'true'
append-to-body
:visible
.
sync=
"show"
width=
"100%"
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%;position: relative;"
>
<div
v-if=
"showType=='pdf'"
style=
"color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;"
@
click=
"showSize=b"
>
大
</div>
<div
v-if=
"showType=='pdf'"
style=
"color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;"
@
click=
"showSize=m"
>
中
</div>
<div
v-if=
"showType=='pdf'"
style=
"color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;"
@
click=
"showSize=s"
>
小
</div>
<div
:style=
"showSize"
style=
'height: 85vh;width: 100%;'
>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
</div>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
style=
"max-height: 100%;position: absolute;
left: 50%;
top: 50%;;
transform: translate(-50%,-50%);
"
border=
"0"
>
</div>
</el-dialog>
<div
id=
'approvefileAdd'
style=
"display: none;"
>
<input
@
change=
'beginUpload'
id=
'aqglfilesonadd'
ref=
"upload"
type=
"file"
style=
"display: none;"
>
</div>
<div
class=
"min_full"
style=
"width: 200px;border-right: 0px;"
>
<TreeBase
:dgtype=
'3'
:app=
'this'
@
selected=
'selectedTree'
></TreeBase>
</div>
<div
class=
"min_full"
style=
"overflow: auto;width: calc(100% - 200px)"
>
<div
class=
"min_full"
style=
"calc(60vh - 42px)"
>
<!-- 查询条件-->
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'app'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
文档标题:
</span>
<el-input
v-model=
"queryParams.title"
></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row
class=
"tool-bar"
>
<PrintButton
:app=
'this'
></PrintButton>
<EditButton
ref=
"add"
:app=
'this'
></EditButton>
<!--
<ViewButton
ref=
"view"
:app=
'this'
></ViewButton>
<CopyButton
ref=
"copy"
:app=
'this'
></CopyButton>
<FieldButton
:app=
'this'
></FieldButton>
<ExcelButton
:app=
'this'
></ExcelButton>
-->
<!--
<AttachFileButton
:app=
'this'
></AttachFileButton>
-->
<el-button
@
click=
"upload"
size=
'mini'
type=
"primary"
>
新增
</el-button>
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
v-loading=
'isupLoad'
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'this'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
<template
slot=
"tabCustom"
>
<el-table-column
label=
"附件操作"
width=
"160"
header-align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<div
style=
"width: 100%;display: flex;"
>
<el-button
style=
"text-align: center;color: #3399ff;width: 33.3%;"
@
click
.
native
.
prevent=
"preview(scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-view"
></i>
预览
</el-button>
<el-button
v-show=
"powerObj['91']"
style=
"text-align: center;color: #3399ff;width: 33.3%;"
@
click
.
native
.
prevent=
"downLoad(scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-download"
></i>
下载
</el-button>
<el-button
style=
"text-align: center;color: #3399ff;width: 33.3%;"
@
click
.
native
.
prevent=
"upload('update',scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-upload2"
></i>
更新
</el-button>
</div>
</
template
>
</el-table-column>
</template>
</TablePager>
</div>
</div>
<!-- <MainIndex :vMain='this' ref="mainIndex" ></MainIndex>
<LessIndex :vMain='this' ref="lessIndex" ></LessIndex> -->
</div>
</div>
</template>
<
script
>
import
{
pdf
}
from
'common'
import
{
doQuerytree
}
from
"@/api/daily/nros.js"
;
import
{
autoAttachPreview
,
autoAttach
,
autoAttachDownload
,
deleteAttachDownload
,
uploadAttachDownload
,
aqglUploadUpdate
,
uploadUpdate
}
from
"common/src/api/system/dmgSystem.js"
;
import
{
doQuery
,
doDelete
,
doUpdate
}
from
"./api.js"
;
import
Edit
from
'./lessEdit.vue'
import
{
tableMixin
}
from
'common'
// import MainIndex from './mainIndex.vue'
// import LessIndex from './lessIndex.vue'
export
default
{
mixins
:
[
tableMixin
],
name
:
'securityDocumentManagement'
,
components
:{
pdf
,
// MainIndex,
// LessIndex,
Edit
},
data
()
{
return
{
showSize
:
'transform:scale(0.36)'
,
s
:
'transform:scale(0.36)'
,
m
:
'transform:scale(0.6)'
,
b
:
'transform:scale(0.9)'
,
numPages
:
1
,
show
:
false
,
isupLoad
:
false
,
treeTitle
:
'目录'
,
treeDefaultProps
:
{
children
:
'children'
,
label
:
'bmmc'
},
// 额外
typeMap
:
[],
systemType
:
[],
baseUrl
:
'aqgl/flfg/uflfg'
,
/* 查询参数*/
queryParams
:
{
mlid
:
''
,
title
:
''
,
gsid
:
''
},
treeQueryParams
:{
},
/* 表格标题对应参数*/
tableTitle
:
[
{
prop
:
'title'
,
label
:
'文档名称'
,
width
:
'340'
},
{
prop
:
'fileVersion'
,
label
:
'版本'
,
width
:
'60'
},
{
prop
:
'createTime'
,
label
:
'上传时间'
,
fieldType
:
"ftDateTime"
},
{
prop
:
'updUserName'
,
label
:
'上传人'
,
width
:
"80"
},
{
prop
:
'fileSize'
,
label
:
'大小'
,
width
:
'70'
,
formatter
:
function
(
a
,
b
,
bytes
){
if
(
!
bytes
){
return
'未上传文件'
}
if
(
bytes
===
0
)
return
'0 B'
;
var
k
=
1000
,
// or 1024
sizes
=
[
'B'
,
'KB'
,
'MB'
,
'GB'
,
'TB'
,
'PB'
,
'EB'
,
'ZB'
,
'YB'
],
i
=
Math
.
floor
(
Math
.
log
(
bytes
)
/
Math
.
log
(
k
));
return
(
bytes
/
Math
.
pow
(
k
,
i
)).
toPrecision
(
3
)
+
' '
+
sizes
[
i
];
}
}
]
}
},
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
preview
(
row
){
console
.
log
(
row
)
this
.
showType
=
row
.
fileType
let
canShow
=
[
'gif'
,
'jpg'
,
'jpeg'
,
'png'
,
'bmp'
,
'pdf'
].
indexOf
(
row
.
fileType
)
==-
1
if
(
canShow
){
this
.
$warning
(
'该文件不支持预览,请直接下载'
)
return
}
autoAttachPreview
({},
'aqgl/flfg/uflfg'
,
row
.
fileId
).
then
(
res
=>
{
if
(
res
.
type
==
'application/json'
){
this
.
$warning
(
'您没有权限,请联系系统管理员!'
)
return
}
let
blob
=
new
Blob
([
res
],
{
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
})
})
},
creatFile
(){
/* 清除老节点 */
$
(
'#approvefileAdd'
).
find
(
'input'
).
remove
()
let
lineEl
=
document
.
createElement
(
'input'
);
let
$lineEl
=
$
(
lineEl
)
$lineEl
.
attr
(
'type'
,
'file'
)
$lineEl
.
attr
(
'ref'
,
'upload'
)
$lineEl
.
attr
(
'id'
,
'aqglfilesonadd'
)
$lineEl
.
hide
()
$lineEl
.
change
(()
=>
{
this
.
beginUpload
()
})
// $lineEl
$
(
'#approvefileAdd'
).
append
(
$lineEl
)
},
beginUpload
(){
this
.
isupLoad
=
true
let
uploadDom
=
document
.
getElementById
(
'aqglfilesonadd'
)
var
filec
=
uploadDom
.
files
[
0
];
var
name
=
filec
.
name
var
type
=
filec
.
type
let
updateId
=
$
(
uploadDom
).
attr
(
'inputId'
)
updateId
&&
$
(
uploadDom
).
attr
(
'inputId'
,
null
)
if
(
filec
)
{
let
formData
=
new
FormData
();
formData
.
append
(
'file'
,
filec
)
formData
.
append
(
'type'
,
type
)
formData
.
append
(
'folder'
,
''
)
formData
.
append
(
'name'
,
name
)
if
(
updateId
){
formData
.
append
(
'id'
,
updateId
)
this
.
creatFile
()
uploadUpdate
(
formData
,
'aqgl/flfg/uflfg'
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'更新成功'
)
this
.
isupLoad
=
false
this
.
$refs
[
'TablePager'
].
reLoad
()
}
}).
catch
(
e
=>
{
console
.
error
(
e
)
this
.
isupLoad
=
false
})
return
}
formData
.
append
(
'groupid'
,
this
.
queryParams
.
gsid
)
this
.
creatFile
()
uploadAttachDownload
(
formData
,
'aqgl/flfg/uflfg'
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'添加成功'
)
this
.
isupLoad
=
false
this
.
$refs
[
'TablePager'
].
reLoad
()
}
}).
catch
(
e
=>
{
console
.
error
(
e
)
this
.
isupLoad
=
false
})
}
},
upload
(){
/* 清除老节点*/
let
$upload
=
$
(
'#aqglfilesonadd'
)
console
.
log
(
$upload
)
arguments
[
0
]
==
'update'
&&
$upload
.
attr
(
'inputId'
,
arguments
[
1
].
fileId
)
&&
$upload
.
click
()
if
(
arguments
[
0
]
==
'update'
){
return
}
else
if
(
this
.
queryParams
.
gsid
){
$upload
.
click
()
/* 上传*/
}
else
{
this
.
$warning
(
'请选中公司操作操作'
);
}
},
down
(
data
,
type
,
title
)
{
let
a
=
document
.
createElement
(
'a'
);
a
.
download
=
title
;
a
.
style
.
display
=
'none'
;
let
blob
=
new
Blob
([
data
],
{
type
:
'application/'
+
type
+
';charset=UTF-8'
,
});
a
.
href
=
URL
.
createObjectURL
(
blob
);
document
.
body
.
appendChild
(
a
);
a
.
click
();
document
.
body
.
removeChild
(
a
);
},
downLoad
(
row
){
let
title
=
row
.
fileName
autoAttachDownload
({},
'aqgl/flfg/uflfg'
,
row
.
fileId
).
then
(
res
=>
{
if
(
res
.
type
==
'application/json'
){
this
.
$warning
(
'您没有【下载】权限,请联系系统管理员!'
)
return
}
this
.
down
(
res
,
row
.
type
,
title
)
})
},
selectedTree
(
val
){
if
(
val
.
type
==
'ML'
){
this
.
queryParams
.
gsid
=
val
.
gsid
this
.
queryParams
.
mlid
=
val
.
id
}
else
{
this
.
queryParams
.
gsid
=
val
.
id
this
.
queryParams
.
mlid
=
''
}
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
/* 基础查询*/
query
:
doQuery
,
apiDelete
:
doDelete
,
apiUpdate
:
doUpdate
,
apiTreeQuery
:
doQuerytree
,
}
}
</
script
>
<
style
>
</
style
>
src/views/flfggl/flfg/lessEdit.vue
0 → 100644
View file @
a8c5ec9b
<
template
>
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"标题"
ref=
"title"
prop=
"title"
>
<el-input
:readonly=
"readonly"
v-model=
"form.title"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</
template
>
<
script
>
import
{
editMixin
}
from
'common'
export
default
{
mixins
:
[
editMixin
],
/* 存放index页面传递的额外参数*/
mounted
()
{
// this.form.mlid=this.app.queryParams.mlid
this
.
form
.
gsid
=
this
.
app
.
queryParams
.
gsid
},
/* 组件名称*/
name
:
'appVersionEdit'
,
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data
()
{
return
{
/* 额外初始化,根据需求*/
systemType
:
[],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form
:
{
mlid
:
''
,
gsid
:
''
,
title
:
''
,
sytk
:
''
,
bz
:
""
,
fbrq
:
new
Date
().
getTime
(),
ssrq
:
new
Date
().
getTime
(),
mlid
:
''
},
/* form提交时的规则,具体规则参考官网*/
rules
:
{
gsid
:
[{
required
:
true
,
},
],
}
}
},
methods
:
{
/* 重写方法,this.app来调用index页面定义的api*/
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
src/views/train/aqpxcx/dialog.vue
0 → 100644
View file @
a8c5ec9b
<
template
>
<DefaultDialog
:app=
'app'
>
<div
slot=
"form"
style=
"display: flex;height: 70vh;"
>
</div>
<div
slot=
"reFooter"
class=
"refooter"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"app.showDialog=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"save()"
>
保 存
</el-button>
</span>
</div>
</DefaultDialog>
</
template
>
<
script
>
export
default
{
props
:
{
app
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
async
mounted
()
{
},
data
()
{
return
{
}
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/train/aqpxcx/edit.vue
0 → 100644
View file @
a8c5ec9b
<!--
* @Description:生成基础baseEdit组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-09-19 14:24:01
* @FilePath: /easyWork/static/baseEdit.vue
-->
<
template
>
<!-- prop 穿透赋值 -->
<BaseEdit
v-bind=
"$attrs"
:config=
'editConfig'
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
</
template
>
<
template
#
toolbar=
"ctx"
>
<!-- 嵌入默认页面从表上方插槽 ctx.editPage来操作默认页面 -->
<!--
<el-button
@
click=
"demo(ctx.editPage)"
size=
'mini'
type=
"primary"
>
示例按钮
</el-button>
-->
<!--
<AuxButton
:dynamic=
'true'
:queryParams=
"
{
sbxxTreeId:that.form.sbxxTreeId,
zt:'N'
}" :component='Qxsj' rename='选择缺陷数据' code='dynamic' @save="saveQxsj" /> -->
</
template
>
</BaseEdit>
</template>
<
script
>
export
default
{
data
()
{
return
{
editConfig
:
{
/* 生成form表单 */
editColItemList
:
[{
label
:
'编码'
,
prop
:
'code'
,
span
:
12
,
type
:
'input'
,
required
:
true
,
},
{
label
:
'名称'
,
prop
:
'name'
,
span
:
12
,
type
:
'input'
,
required
:
true
,
},
{
label
:
'备注'
,
prop
:
'bz'
,
span
:
24
,
type
:
'input'
},
],
/* 生成主从表,为空数组默认不展示 */
editTableTitle
:
[
// {
// title: "序号",
// field: "xh",
// width: 50,
// align: "center"
// },
// {
// title: "点检部位",
// field: "bw",
// width: 180,
// },
// {
// title: "点检项目",
// field: "project",
// width: 160
// },
// {
// title: "点检标准",
// field: "standard",
// width: 140
// },
],
/* 子表名,可选 同editTableTitle一起用*/
detailTable
:
''
}
}
},
methods
:
{
/**
* @description:示例按钮
* @param {*} ctx操作edit实例内容
* @return {*}
* @author: lisu
*/
// demo(ctx){}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/views/train/aqpxcx/index.vue
0 → 100644
View file @
a8c5ec9b
<!--
* @Description: 生成基础basePage组件,屏蔽不必要细节
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2025-05-07 15:16:06
* @FilePath: /dxgaqgl-vue/src/views/train/aqpxcx/index.vue
-->
<
template
>
<BasePage
:power=
'power'
ref=
"basePage"
class=
"min_full"
:config=
"config"
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
<
template
#
toolbar=
"ctx"
>
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!--
<el-button
@
click=
"demo(ctx.basePage)"
size=
'mini'
type=
"primary"
>
示例按钮
</el-button>
-->
</
template
>
</BasePage>
</template>
<
script
>
// import Edit from './edit.vue'
export
default
{
name
:
'template'
,
data
()
{
return
{
power
:
{
add
:
false
,
copy
:
false
,
/* 手动控制删除 */
delButton
:
false
,
/* 手动控制编辑按钮权限 */
editButton
:
false
,
/* 是否渲染右侧操作按钮 */
operateButtons
:
false
,
/* 是否开启工作流按钮 */
workFlow
:
false
,
/* 表格开启选择,以及记住选择 */
showSelection
:
false
,
saveSelected
:
false
},
config
:
{
/* 基本配置*/
url
:
'aqgl/pxgl/uaqpxcx'
,
tableTitle
:
[{
label
:
"年度"
,
prop
:
"year"
,
fieldType
:
"int"
},
//{label: "季度", prop: "quarter", fieldType: "ftString",width:80},
// {
// label: "季度",
// prop: "quarter",
// formatter: function(row, column, value, index) {
// let jdobj = ['', '第一季度', '第二季度', '第三季度', '第四季度']
// return jdobj[value]
// },
// width: 80
// },
{
label
:
"培训组织单位"
,
prop
:
"zzdw"
,
fieldType
:
"ftString"
,
width
:
180
},
{
label
:
"状态"
,
prop
:
"zt"
,
width
:
80
,
formatter
(
row
,
c
,
v
)
{
if
(
row
.
attachcount
>
0
)
{
return
'完成'
}
else
{
return
'未完成'
}
}
},
{
label
:
"月份"
,
prop
:
"month"
,
width
:
80
},
{
label
:
"培训名称"
,
prop
:
"name"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"分公司"
,
prop
:
"gsName"
,
fieldType
:
"ftString"
,
width
:
192
},
// {label: "培训计划", prop: "yljhName", fieldType: "ftString",width:192},
/*{label: "培训人数", prop: "pxrs", fieldType: "int"},*/
{
label
:
"培训地点"
,
prop
:
"pxmb"
,
fieldType
:
"ftString"
,
width
:
300
},
{
label
:
"培训等级"
,
prop
:
"pxdj"
,
width
:
180
,
transform
:
{
url
:
'aqgl/pxgl/uaqpxjh/init/pxdj'
,
label
:
'name'
,
value
:
'id'
}
},
{
label
:
"培训时间"
,
prop
:
"pxrq"
,
fieldType
:
"ftDateTime"
},
{
label
:
"培训责任人"
,
prop
:
"pxzrrName"
,
fieldType
:
"ftString"
,
width
:
192
},
/*{label: "培训时长", prop: "ylsc", fieldType: "float"},*/
{
label
:
"协办单位"
,
prop
:
"zbdwid"
,
fieldType
:
"ftString"
,
width
:
192
},
// {label: "培训负责人", prop: "ylfzrName", fieldType: "ftString",width:192},
// {label: "质量负责人", prop: "zlfzrName", fieldType: "ftString",width:192},
{
label
:
"培训人数"
,
prop
:
"pxrs"
,
width
:
120
},
{
label
:
"培训目标"
,
prop
:
"pxmb"
,
fieldType
:
"ftString"
,
width
:
180
},
],
queryParams
:
[
[{
label
:
'是否完成'
,
prop
:
'isComplete'
,
span
:
4
,
type
:
'checkboxYN'
,
value
:
'N'
},
{
label
:
'日期'
,
startProp
:
"ksrq"
,
endProp
:
"jsrq"
,
span
:
8
,
type
:
'RelDaterangeV2'
,
startValue
:
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
*
30
,
endValue
:
new
Date
().
getTime
(),
},
{
"label"
:
"公司"
,
"prop"
:
"pid"
,
"span"
:
4
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
onChange
:
this
.
onChange
,
"src"
:
"jcsj/common/bm/queryGs"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"bmmc"
}
}
},
{
"label"
:
"部门"
,
"prop"
:
"bmId"
,
"span"
:
4
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
linkParams
:
[
'pid'
],
linkage
:
true
,
"src"
:
"jcsj/common/bm/queryBm"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"bmmc"
}
}
},
{
"label"
:
"班组"
,
"prop"
:
"bzId"
,
"span"
:
4
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
linkParams
:
[
'pid'
],
linkage
:
true
,
"src"
:
"jcsj/common/bm/queryBz"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"bmmc"
}
}
},
]
],
/* 默认启停用 */
}
}
},
methods
:
{
onChange
(
item
)
{
this
.
$refs
.
basePage
.
queryParams
.
gsid
=
item
.
id
}
},
components
:
{
// Edit
}
}
</
script
>
<
style
>
</
style
>
src/views/zdczgcgl/zdccgc/api.js
0 → 100644
View file @
a8c5ec9b
import
request
from
'common/src/utils/request'
/* query */
export
function
doQuery
(
query
)
{
return
request
({
url
:
'/aqgl/zdczgc/uzdczgc/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
/* 更新 */
export
function
doUpdate
(
query
)
{
return
request
({
url
:
'/aqgl/zdczgc/uzdczgc/update'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doAdd
(
query
)
{
return
request
({
url
:
'/aqgl/zdczgc/uzdczgc/add'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doDelete
(
query
)
{
return
request
({
url
:
'/aqgl/zdczgc/uzdczgc/delete'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doQuerytree
(
query
)
{
return
request
({
url
:
'/aqgl/zdczgc/uzdczgc/query/tree'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/views/zdczgcgl/zdccgc/index.vue
0 → 100644
View file @
a8c5ec9b
<
template
>
<div
style=
"display: flex;"
>
<el-dialog
:fullscreen=
'true'
append-to-body
:visible
.
sync=
"show"
width=
"100%"
>
<div
ref=
'show'
v-if=
"show"
style=
"height: 85vh;width: 100%;position: relative;"
>
<div
v-if=
"showType=='pdf'"
style=
"color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 60px;"
@
click=
"showSize=b"
>
大
</div>
<div
v-if=
"showType=='pdf'"
style=
"color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 90px;"
@
click=
"showSize=m"
>
中
</div>
<div
v-if=
"showType=='pdf'"
style=
"color: #d9d9d9;font-size: 16px;position: fixed;right: 50px;cursor: pointer;top: 120px;"
@
click=
"showSize=s"
>
小
</div>
<div
:style=
"showSize"
style=
'height: 85vh;width: 100%;'
>
<pdf
ref=
"show"
v-if=
"showType=='pdf'"
v-for=
"i in numPages"
:key=
"i"
:src=
"url"
:page=
"i"
></pdf>
</div>
<!--
<iframe
v-if=
"showType=='pdf'"
:src=
"url"
width=
"100%"
height=
"100%"
border=
"0"
></iframe>
-->
<img
v-if=
"['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1"
:src=
"url"
style=
"max-height: 100%;position: absolute;
left: 50%;
top: 50%;;
transform: translate(-50%,-50%);
"
border=
"0"
>
</div>
</el-dialog>
<div
id=
'approvefileAdd'
style=
"display: none;"
>
<input
@
change=
'beginUpload'
id=
'aqglfilesonadd'
ref=
"upload"
type=
"file"
style=
"display: none;"
>
</div>
<div
class=
"min_full"
style=
"width: 200px;border-right: 0px;"
>
<TreeBase
:dgtype=
'3'
:app=
'this'
@
selected=
'selectedTree'
></TreeBase>
</div>
<div
class=
"min_full"
style=
"overflow: auto;width: calc(100% - 200px)"
>
<div
class=
"min_full"
style=
"calc(60vh - 42px)"
>
<!-- 查询条件-->
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'app'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
文档标题:
</span>
<el-input
v-model=
"queryParams.title"
></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row
class=
"tool-bar"
>
<PrintButton
:app=
'this'
></PrintButton>
<EditButton
ref=
"add"
:app=
'this'
></EditButton>
<!--
<ViewButton
ref=
"view"
:app=
'this'
></ViewButton>
<CopyButton
ref=
"copy"
:app=
'this'
></CopyButton>
<FieldButton
:app=
'this'
></FieldButton>
<ExcelButton
:app=
'this'
></ExcelButton>
-->
<!--
<AttachFileButton
:app=
'this'
></AttachFileButton>
-->
<el-button
@
click=
"upload"
size=
'mini'
type=
"primary"
>
新增
</el-button>
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<TablePager
v-loading=
'isupLoad'
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'this'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
<template
slot=
"tabCustom"
>
<el-table-column
label=
"附件操作"
width=
"160"
header-align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<div
style=
"width: 100%;display: flex;"
>
<el-button
style=
"text-align: center;color: #3399ff;width: 33.3%;"
@
click
.
native
.
prevent=
"preview(scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-view"
></i>
预览
</el-button>
<el-button
v-show=
"powerObj['91']"
style=
"text-align: center;color: #3399ff;width: 33.3%;"
@
click
.
native
.
prevent=
"downLoad(scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-download"
></i>
下载
</el-button>
<el-button
style=
"text-align: center;color: #3399ff;width: 33.3%;"
@
click
.
native
.
prevent=
"upload('update',scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-upload2"
></i>
更新
</el-button>
</div>
</
template
>
</el-table-column>
</template>
</TablePager>
</div>
</div>
<!-- <MainIndex :vMain='this' ref="mainIndex" ></MainIndex>
<LessIndex :vMain='this' ref="lessIndex" ></LessIndex> -->
</div>
</div>
</template>
<
script
>
import
{
pdf
}
from
'common'
import
{
doQuerytree
}
from
"@/api/daily/nros.js"
;
import
{
autoAttachPreview
,
autoAttach
,
autoAttachDownload
,
deleteAttachDownload
,
uploadAttachDownload
,
aqglUploadUpdate
,
uploadUpdate
}
from
"common/src/api/system/dmgSystem.js"
;
import
{
doQuery
,
doDelete
,
doUpdate
}
from
"./api.js"
;
import
Edit
from
'./lessEdit.vue'
import
{
tableMixin
}
from
'common'
// import MainIndex from './mainIndex.vue'
// import LessIndex from './lessIndex.vue'
export
default
{
mixins
:
[
tableMixin
],
name
:
'securityDocumentManagement'
,
components
:{
pdf
,
// MainIndex,
// LessIndex,
Edit
},
data
()
{
return
{
showSize
:
'transform:scale(0.36)'
,
s
:
'transform:scale(0.36)'
,
m
:
'transform:scale(0.6)'
,
b
:
'transform:scale(0.9)'
,
numPages
:
1
,
show
:
false
,
isupLoad
:
false
,
treeTitle
:
'目录'
,
treeDefaultProps
:
{
children
:
'children'
,
label
:
'bmmc'
},
// 额外
typeMap
:
[],
systemType
:
[],
baseUrl
:
'aqgl/zdczgc/uzdczgc'
,
/* 查询参数*/
queryParams
:
{
mlid
:
''
,
title
:
''
,
gsid
:
''
},
treeQueryParams
:{
},
/* 表格标题对应参数*/
tableTitle
:
[
{
prop
:
'title'
,
label
:
'文档名称'
,
width
:
'340'
},
{
prop
:
'fileVersion'
,
label
:
'版本'
,
width
:
'60'
},
{
prop
:
'createTime'
,
label
:
'上传时间'
,
fieldType
:
"ftDateTime"
},
{
prop
:
'updUserName'
,
label
:
'上传人'
,
width
:
"80"
},
{
prop
:
'fileSize'
,
label
:
'大小'
,
width
:
'70'
,
formatter
:
function
(
a
,
b
,
bytes
){
if
(
!
bytes
){
return
'未上传文件'
}
if
(
bytes
===
0
)
return
'0 B'
;
var
k
=
1000
,
// or 1024
sizes
=
[
'B'
,
'KB'
,
'MB'
,
'GB'
,
'TB'
,
'PB'
,
'EB'
,
'ZB'
,
'YB'
],
i
=
Math
.
floor
(
Math
.
log
(
bytes
)
/
Math
.
log
(
k
));
return
(
bytes
/
Math
.
pow
(
k
,
i
)).
toPrecision
(
3
)
+
' '
+
sizes
[
i
];
}
}
]
}
},
methods
:{
getNumPages
(
url
)
{
var
loadingTask
=
pdf
.
createLoadingTask
(
url
)
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
url
=
loadingTask
this
.
numPages
=
pdf
.
numPages
}).
catch
((
err
)
=>
{
console
.
error
(
'pdf加载失败'
)
})
},
/* 预览 */
preview
(
row
){
console
.
log
(
row
)
this
.
showType
=
row
.
fileType
let
canShow
=
[
'gif'
,
'jpg'
,
'jpeg'
,
'png'
,
'bmp'
,
'pdf'
].
indexOf
(
row
.
fileType
)
==-
1
if
(
canShow
){
this
.
$warning
(
'该文件不支持预览,请直接下载'
)
return
}
autoAttachPreview
({},
'aqgl/zdczgc/uzdczgc'
,
row
.
fileId
).
then
(
res
=>
{
if
(
res
.
type
==
'application/json'
){
this
.
$warning
(
'您没有权限,请联系系统管理员!'
)
return
}
let
blob
=
new
Blob
([
res
],
{
type
:
'application/'
+
row
.
fileType
+
';charset=UTF-8'
,
});
this
.
url
=
URL
.
createObjectURL
(
blob
)
this
.
getNumPages
(
this
.
url
)
this
.
show
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
show
.
addEventListener
(
'contextmenu'
,
function
(
event
)
{
event
.
preventDefault
();
},
false
);
})
})
},
creatFile
(){
/* 清除老节点 */
$
(
'#approvefileAdd'
).
find
(
'input'
).
remove
()
let
lineEl
=
document
.
createElement
(
'input'
);
let
$lineEl
=
$
(
lineEl
)
$lineEl
.
attr
(
'type'
,
'file'
)
$lineEl
.
attr
(
'ref'
,
'upload'
)
$lineEl
.
attr
(
'id'
,
'aqglfilesonadd'
)
$lineEl
.
hide
()
$lineEl
.
change
(()
=>
{
this
.
beginUpload
()
})
// $lineEl
$
(
'#approvefileAdd'
).
append
(
$lineEl
)
},
beginUpload
(){
this
.
isupLoad
=
true
let
uploadDom
=
document
.
getElementById
(
'aqglfilesonadd'
)
var
filec
=
uploadDom
.
files
[
0
];
var
name
=
filec
.
name
var
type
=
filec
.
type
let
updateId
=
$
(
uploadDom
).
attr
(
'inputId'
)
updateId
&&
$
(
uploadDom
).
attr
(
'inputId'
,
null
)
if
(
filec
)
{
let
formData
=
new
FormData
();
formData
.
append
(
'file'
,
filec
)
formData
.
append
(
'type'
,
type
)
formData
.
append
(
'folder'
,
''
)
formData
.
append
(
'name'
,
name
)
if
(
updateId
){
formData
.
append
(
'id'
,
updateId
)
this
.
creatFile
()
uploadUpdate
(
formData
,
'aqgl/zdczgc/uzdczgc'
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'更新成功'
)
this
.
isupLoad
=
false
this
.
$refs
[
'TablePager'
].
reLoad
()
}
}).
catch
(
e
=>
{
console
.
error
(
e
)
this
.
isupLoad
=
false
})
return
}
formData
.
append
(
'groupid'
,
this
.
queryParams
.
gsid
)
this
.
creatFile
()
uploadAttachDownload
(
formData
,
'aqgl/zdczgc/uzdczgc'
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
$success
(
'添加成功'
)
this
.
isupLoad
=
false
this
.
$refs
[
'TablePager'
].
reLoad
()
}
}).
catch
(
e
=>
{
console
.
error
(
e
)
this
.
isupLoad
=
false
})
}
},
upload
(){
/* 清除老节点*/
let
$upload
=
$
(
'#aqglfilesonadd'
)
console
.
log
(
$upload
)
arguments
[
0
]
==
'update'
&&
$upload
.
attr
(
'inputId'
,
arguments
[
1
].
fileId
)
&&
$upload
.
click
()
if
(
arguments
[
0
]
==
'update'
){
return
}
else
if
(
this
.
queryParams
.
gsid
){
$upload
.
click
()
/* 上传*/
}
else
{
this
.
$warning
(
'请选中公司操作操作'
);
}
},
down
(
data
,
type
,
title
)
{
let
a
=
document
.
createElement
(
'a'
);
a
.
download
=
title
;
a
.
style
.
display
=
'none'
;
let
blob
=
new
Blob
([
data
],
{
type
:
'application/'
+
type
+
';charset=UTF-8'
,
});
a
.
href
=
URL
.
createObjectURL
(
blob
);
document
.
body
.
appendChild
(
a
);
a
.
click
();
document
.
body
.
removeChild
(
a
);
},
downLoad
(
row
){
let
title
=
row
.
fileName
autoAttachDownload
({},
'aqgl/zdczgc/uzdczgc'
,
row
.
fileId
).
then
(
res
=>
{
if
(
res
.
type
==
'application/json'
){
this
.
$warning
(
'您没有【下载】权限,请联系系统管理员!'
)
return
}
this
.
down
(
res
,
row
.
type
,
title
)
})
},
selectedTree
(
val
){
if
(
val
.
type
==
'ML'
){
this
.
queryParams
.
gsid
=
val
.
gsid
this
.
queryParams
.
mlid
=
val
.
id
}
else
{
this
.
queryParams
.
gsid
=
val
.
id
this
.
queryParams
.
mlid
=
''
}
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
/* 基础查询*/
query
:
doQuery
,
apiDelete
:
doDelete
,
apiUpdate
:
doUpdate
,
apiTreeQuery
:
doQuerytree
,
}
}
</
script
>
<
style
>
</
style
>
src/views/zdczgcgl/zdccgc/lessEdit.vue
0 → 100644
View file @
a8c5ec9b
<
template
>
<RelDialog
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"标题"
ref=
"title"
prop=
"title"
>
<el-input
:readonly=
"readonly"
v-model=
"form.title"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</
template
>
<
script
>
import
{
editMixin
}
from
'common'
export
default
{
mixins
:
[
editMixin
],
/* 存放index页面传递的额外参数*/
mounted
()
{
// this.form.mlid=this.app.queryParams.mlid
this
.
form
.
gsid
=
this
.
app
.
queryParams
.
gsid
},
/* 组件名称*/
name
:
'appVersionEdit'
,
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data
()
{
return
{
/* 额外初始化,根据需求*/
systemType
:
[],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form
:
{
mlid
:
''
,
gsid
:
''
,
title
:
''
,
sytk
:
''
,
bz
:
""
,
fbrq
:
new
Date
().
getTime
(),
ssrq
:
new
Date
().
getTime
(),
mlid
:
''
},
/* form提交时的规则,具体规则参考官网*/
rules
:
{
gsid
:
[{
required
:
true
,
},
],
}
}
},
methods
:
{
/* 重写方法,this.app来调用index页面定义的api*/
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
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