@ -2,113 +2,113 @@
< div class = "container-main" ref = "main" >
< div class = "container-main" ref = "main" >
< div class = "search-hearder" ref = "topSearch" >
< div class = "search-hearder" ref = "topSearch" >
< el -form :model ="queryParams" ref = "queryForm" :inline ="true" v-show ="showSearch" >
< el -form :model ="queryParams" ref = "queryForm" :inline ="true" v-show ="showSearch" >
<!-- < el -form -item label = "${comment}" prop = "id" >
<!-- < el -form -item label = "${comment}" prop = "id" >
< el -input
< el -input
v - model = "queryParams.id"
v - model = "queryParams.id"
placeholder = "请输入${comment}"
placeholder = "请输入${comment}"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m > - - >
< / e l - f o r m - i t e m > - - >
< el -form -item label = "区域" prop = "areaId" >
< el -form -item label = "区域" prop = "areaId" >
< el -select v-model ="queryParams.areaId" placeholder="请选择区域" clearable size="small" >
< el -select v-model ="queryParams.areaId" placeholder="请选择区域" clearable size="small" >
< el -option
< el -option
v - for = "dict in dict.type.tc_area"
v - for = "dict in dict.type.tc_area"
: key = "dict.value"
: key = "dict.value"
: label = "dict.label"
: label = "dict.label"
: value = "dict.value"
: value = "dict.value"
/ >
/ >
< / e l - s e l e c t >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "启用/禁用" prop = "isStatus" >
< el -form -item label = "启用/禁用" prop = "isStatus" >
< el -select v-model ="queryParams.isStatus" placeholder="请选择启用/禁用" clearable size="small" >
< el -select v-model ="queryParams.isStatus" placeholder="请选择启用/禁用" clearable size="small" >
< el -option
< el -option
v - for = "dict in dict.type.tc_start"
v - for = "dict in dict.type.tc_start"
: key = "dict.value"
: key = "dict.value"
: label = "dict.label"
: label = "dict.label"
: value = "dict.value"
: value = "dict.value"
/ >
/ >
< / e l - s e l e c t >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "标题" prop = "title" >
< el -form -item label = "标题" prop = "title" >
< el -input
< el -input
v - model = "queryParams.title"
v - model = "queryParams.title"
placeholder = "请输入标题"
placeholder = "请输入标题"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "类型" prop = "type" >
< el -form -item label = "类型" prop = "type" >
< el -input
< el -input
v - model = "queryParams.type"
v - model = "queryParams.type"
placeholder = "请输入类型"
placeholder = "请输入类型"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
<!-- < el -form -item label = "文件名称" prop = "fileName" >
<!-- < el -form -item label = "文件名称" prop = "fileName" >
< el -input
< el -input
v - model = "queryParams.fileName"
v - model = "queryParams.fileName"
placeholder = "请输入文件名称"
placeholder = "请输入文件名称"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "创建者" prop = "createBy" >
< el -form -item label = "创建者" prop = "createBy" >
< el -input
< el -input
v - model = "queryParams.createBy"
v - model = "queryParams.createBy"
placeholder = "请输入创建者"
placeholder = "请输入创建者"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "创建时间" >
< el -form -item label = "创建时间" >
< el -date -picker
< el -date -picker
v - model = "daterangeCreateTime"
v - model = "daterangeCreateTime"
size = "small"
size = "small"
style = "width: 240px"
style = "width: 240px"
value - format = "yyyy-MM-dd"
value - format = "yyyy-MM-dd"
type = "daterange"
type = "daterange"
range - separator = "-"
range - separator = "-"
start - placeholder = "开始日期"
start - placeholder = "开始日期"
end - placeholder = "结束日期"
end - placeholder = "结束日期"
> < / e l - d a t e - p i c k e r >
> < / e l - d a t e - p i c k e r >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "更新者" prop = "updateBy" >
< el -form -item label = "更新者" prop = "updateBy" >
< el -input
< el -input
v - model = "queryParams.updateBy"
v - model = "queryParams.updateBy"
placeholder = "请输入更新者"
placeholder = "请输入更新者"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "更新时间" >
< el -form -item label = "更新时间" >
< el -date -picker
< el -date -picker
v - model = "daterangeUpdateTime"
v - model = "daterangeUpdateTime"
size = "small"
size = "small"
style = "width: 240px"
style = "width: 240px"
value - format = "yyyy-MM-dd"
value - format = "yyyy-MM-dd"
type = "daterange"
type = "daterange"
range - separator = "-"
range - separator = "-"
start - placeholder = "开始日期"
start - placeholder = "开始日期"
end - placeholder = "结束日期"
end - placeholder = "结束日期"
> < / e l - d a t e - p i c k e r >
> < / e l - d a t e - p i c k e r >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "备注" prop = "remark" >
< el -form -item label = "备注" prop = "remark" >
< el -input
< el -input
v - model = "queryParams.remark"
v - model = "queryParams.remark"
placeholder = "请输入备注"
placeholder = "请输入备注"
clearable
clearable
size = "small"
size = "small"
@ keyup . enter . native = "handleQuery"
@ keyup . enter . native = "handleQuery"
/ >
/ >
< / e l - f o r m - i t e m > - - >
< / e l - f o r m - i t e m > - - >
< el -form -item >
< el -form -item >
< el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleQuery" > 搜 索 < / el -button >
< el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleQuery" > 搜 索 < / el -button >
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetQuery" > 重 置 < / el -button >
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetQuery" > 重 置 < / el -button >
@ -124,19 +124,19 @@
> 新增 < / e l - b u t t o n
> 新增 < / e l - b u t t o n
>
>
< el -button
< el -button
type = "success"
type = "success"
size = "mini"
size = "mini"
: disabled = "single"
: disabled = "single"
@ click = "handleUpdate"
@ click = "handleUpdate"
v - hasPermi = "['tcZz/netManage:gzdt:edit']"
v - hasPermi = "['tcZz/netManage:gzdt:edit']"
> 修改 < / e l - b u t t o n >
> 修改 < / e l - b u t t o n >
< el -button
< el -button
type = "danger"
type = "danger"
size = "mini"
size = "mini"
: disabled = "multiple"
: disabled = "multiple"
@ click = "handleDelete"
@ click = "handleDelete"
v - hasPermi = "['tcZz/netManage:gzdt:remove']"
v - hasPermi = "['tcZz/netManage:gzdt:remove']"
> 删除 < / e l - b u t t o n >
> 删除 < / e l - b u t t o n >
< el -button
< el -button
type = "warning"
type = "warning"
size = "mini"
size = "mini"
@ -172,126 +172,126 @@
< / div >
< / div >
< el -table v-loading ="loading" :data="gzdtList" @selection-change="handleSelectionChange" >
< el -table v-loading ="loading" :data="gzdtList" @selection-change="handleSelectionChange" >
< el -table -column type = "selection" width = "55" align = "center" / >
< el -table -column type = "selection" width = "55" align = "center" / >
<!-- < el -table -column label = "序号" align = "center" prop = "id" / > -- >
<!-- < el -table -column label = "序号" align = "center" prop = "id" / > -- >
< el -table -column label = "区域" align = "center" prop = "areaId" >
< el -table -column label = "区域" align = "center" prop = "areaId" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< dict -tag :options ="dict.type.tc_area" :value ="scope.row.areaId" / >
< dict -tag :options ="dict.type.tc_area" :value ="scope.row.areaId" / >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "标题" align = "center" prop = "title" / >
< el -table -column label = "标题" align = "center" prop = "title" / >
< el -table -column label = "类型" align = "center" prop = "type" / >
< el -table -column label = "类型" align = "center" prop = "type" / >
<!-- < el -table -column label = "文件名称" align = "center" prop = "fileName" / >
<!-- < el -table -column label = "文件名称" align = "center" prop = "fileName" / >
< el -table -column label = "文件路径(完整路径)" align = "center" prop = "fileUrl" / >
< el -table -column label = "文件路径(完整路径)" align = "center" prop = "fileUrl" / >
< el -table -column label = "备注" align = "center" prop = "remark" / > -- >
< el -table -column label = "备注" align = "center" prop = "remark" / > -- >
< el -table -column label = "启用/禁用" align = "center" prop = "isStatus" >
< el -table -column label = "启用/禁用" align = "center" prop = "isStatus" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
<!-- < dict -tag :options ="dict.type.tc_start" :value ="scope.row.isStatus" / > -- >
<!-- < dict -tag :options ="dict.type.tc_start" :value ="scope.row.isStatus" / > -- >
< el -switch
< el -switch
v - model = "scope.row.isStatus"
v - model = "scope.row.isStatus"
: active - value = "2"
: active - value = "2"
: inactive - value = "1"
: inactive - value = "1"
active - color = "#ff4949"
active - color = "#ff4949"
inactive - color = "#13ce66"
inactive - color = "#13ce66"
@ change = "handleStatusChange(scope.row)"
@ change = "handleStatusChange(scope.row)"
> < / e l - s w i t c h >
> < / e l - s w i t c h >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " width = "200" fixed = "right" >
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " width = "200" fixed = "right" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< el -button
< el -button
size = "mini"
size = "mini"
@ click = "handleInfo(scope.row)"
@ click = "handleInfo(scope.row)"
v - hasPermi = "['tcZz/netManage:gzdt:list']"
v - hasPermi = "['tcZz/netManage:gzdt:list']"
>
>
查看
查看
< / e l - b u t t o n >
< / e l - b u t t o n >
< el -button
< el -button
type = "success"
type = "success"
size = "mini"
size = "mini"
@ click = "handleUpdate(scope.row)"
@ click = "handleUpdate(scope.row)"
v - hasPermi = "['tcZz/netManage:gzdt:edit']"
v - hasPermi = "['tcZz/netManage:gzdt:edit']"
> 修改 < / e l - b u t t o n >
> 修改 < / e l - b u t t o n >
< el -button
< el -button
size = "mini"
size = "mini"
type = "danger"
type = "danger"
@ click = "handleDelete(scope.row)"
@ click = "handleDelete(scope.row)"
v - hasPermi = "['tcZz/netManage:gzdt:remove']"
v - hasPermi = "['tcZz/netManage:gzdt:remove']"
> 删除 < / e l - b u t t o n >
> 删除 < / e l - b u t t o n >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b l e >
< pagination
< pagination
v - show = "total>0"
v - show = "total>0"
: total = "total"
: total = "total"
: page . sync = "queryParams.pageNum"
: page . sync = "queryParams.pageNum"
: limit . sync = "queryParams.pageSize"
: limit . sync = "queryParams.pageSize"
@ pagination = "getList"
@ pagination = "getList"
/ >
/ >
<!-- 添加或修改工作动态对话框 -- >
<!-- 添加或修改工作动态对话框 -- >
< el -dialog :visible.sync ="open" width = "700px" append -to -body custom -class = " dialog -box " >
< el -dialog :visible.sync ="open" width = "700px" append -to -body custom -class = " dialog -box " >
< div slot = "title" class = "dialog-title" > { { title } } < / div >
< div slot = "title" class = "dialog-title" > { { title } } < / div >
< el -form ref = "form" :model ="form" :rules ="rules" label -width = " auto " class = "dialog-from" >
< el -form ref = "form" :model ="form" :rules ="rules" label -width = " auto " class = "dialog-from" >
< el -form -item label = "区域" prop = "areaId" >
< el -form -item label = "区域" prop = "areaId" >
< el -select v-model ="form.areaId" placeholder="请选择区域" >
< el -select v-model ="form.areaId" placeholder="请选择区域" >
< el -option
< el -option
v - for = "dict in dict.type.tc_area"
v - for = "dict in dict.type.tc_area"
: key = "dict.value"
: key = "dict.value"
: label = "dict.label"
: label = "dict.label"
: value = "dict.value"
: value = "dict.value"
> < / e l - o p t i o n >
> < / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "启用/禁用" >
< el -form -item label = "启用/禁用" >
< el -radio -group v-model ="form.isStatus" >
< el -radio -group v-model ="form.isStatus" >
< el -radio
< el -radio
v - for = "dict in dict.type.tc_start"
v - for = "dict in dict.type.tc_start"
: key = "dict.value"
: key = "dict.value"
: label = "parseInt(dict.value)"
: label = "parseInt(dict.value)"
> { { dict . label } } < / e l - r a d i o >
> { { dict . label } } < / e l - r a d i o >
< / e l - r a d i o - g r o u p >
< / e l - r a d i o - g r o u p >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "标题" prop = "title" >
< el -form -item label = "标题" prop = "title" >
< el -input v -model = " form.title " placeholder = "请输入标题" / >
< el -input v -model = " form.title " placeholder = "请输入标题" / >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item label = "类型" prop = "type" >
< el -form -item label = "类型" prop = "type" >
< el -input v -model = " form.type " placeholder = "请输入类型" / >
< el -input v -model = " form.type " placeholder = "请输入类型" / >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
<!-- < el -form -item label = "文件名称" prop = "fileName" >
<!-- < el -form -item label = "文件名称" prop = "fileName" >
< el -input v -model = " form.fileName " placeholder = "请输入文件名称" / >
< el -input v -model = " form.fileName " placeholder = "请输入文件名称" / >
< / e l - f o r m - i t e m > - - >
< / e l - f o r m - i t e m > - - >
<!-- < el -form -item label = "文件" >
< el -form -item label = "文件" >
< el -button @click ="addDomain" type = "primary" > 添加文件 < / e l - b u t t o n >
< el -button @click ="addDomain" type = "primary" > 添加文件 < / e l - b u t t o n >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< div v-for ="(domain, index) in form.domains" :key="index" class="file-item" >
< div v-for ="(domain, index) in form.domains" :key="index" class="file-item" >
< el -form -item
< el -form -item
label = "文件名称"
label = "文件名称"
: prop = "'domains.' + index + '.fileName'"
: prop = "'domains.' + index + '.fileName'"
: rules = " {
: rules = " {
required : true , message : '文件名称不能为空' , trigger : 'blur'
required : true , message : '文件名称不能为空' , trigger : 'blur'
} "
} "
>
>
< el -input v-model ="domain.fileName" placeholder="请输入文件名称" > < / el -input >
< el -input v-model ="domain.fileName" placeholder="请输入文件名称" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -form -item
< el -form -item
label = "文件路径"
label = "文件路径"
: prop = "'domains.' + index + '.fileUrl'"
: prop = "'domains.' + index + '.fileUrl'"
: rules = " {
: rules = " {
required : true , message : '文件路径不能为空' , trigger : 'blur'
required : true , message : '文件路径不能为空' , trigger : 'blur'
} "
} "
>
>
< el -input v-model ="domain.fileUrl" placeholder="请输入文件路径" > < / el -input >
< el -input v-model ="domain.fileUrl" placeholder="请输入文件路径" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< el -button @click.prevent ="removeDomain(domain)" type = "danger" size = "mini" > 删除 < / e l - b u t t o n >
< el -button @click.prevent ="removeDomain(domain)" type = "danger" size = "mini" > 删除 < / e l - b u t t o n >
< / div > -- >
< / div >
< el -form -item label = "文件 上传" prop = 'fileNameS' >
<!-- < el -form -item label = "文件 路径(完整路径)" >
< fileUpload v -model = " fileNameS " / >
< fileUpload v -model = " fileNameS " / >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m > - - >
< el -form -item label = "备注" prop = "remark" >
< el -form -item label = "备注" prop = "remark" >
<!-- < el -input v -model = " form.remark " placeholder = "请输入备注" / > -- >
<!-- < el -input v -model = " form.remark " placeholder = "请输入备注" / > -- >
< el -input v -model = " form.remark " resize = "none" :rows ="5" type = "textarea" placeholder = "请输入备注" / >
< el -input v -model = " form.remark " resize = "none" :rows ="5" type = "textarea" placeholder = "请输入备注" / >
< / e l - f o r m - i t e m >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
< div slot = "footer" class = "dialog-footer" >
< el -button type = "primary" @click ="submitForm" > 确 定 < / el -button >
< el -button type = "primary" @click ="submitForm" > 确 定 < / el -button >
@ -300,18 +300,17 @@
< / e l - d i a l o g >
< / e l - d i a l o g >
<!-- 查看工作动态详情页 -- >
<!-- 查看工作动态详情页 -- >
< el -dialog
< el -dialog
: visible . sync = "infoOpen"
: visible . sync = "infoOpen"
width = "90%"
width = "90%"
append - to - body
append - to - body
: close - on - click - modal = "false"
: close - on - click - modal = "false"
: destroy - on - close = "true"
: destroy - on - close = "true"
custom - class = "dialog-box"
custom - class = "dialog-box"
>
>
< div slot = "title" class = "dialog-title" > { { infoTitle } } < / div >
< div slot = "title" class = "dialog-title" > { { infoTitle } } < / div >
< el -descriptions title = "工作动态" :column ="2" border labelClassName = "desLable" >
< el -descriptions title = "工作动态" :column ="2" border labelClassName = "desLable" >
< el -descriptions -item label = "区域" > { { selectDictLabel ( dict . type . tc _area , form . areaId ) } } < / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "区域" > { { selectDictLabel ( dict . type . tc _area , form . areaId ) } } < / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "启用/禁用" > { { selectDictLabel ( dict . type . tc _start , form . isStatus ) } } < / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "启用/禁用" > { { selectDictLabel ( dict . type . tc _start , form . isStatus ) } } < / e l - d e s c r i p t i o n s - i t e m >
@ -326,7 +325,7 @@
< el -descriptions -item label = "备注" > { { form . remark } } < / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item label = "备注" > { { form . remark } } < / e l - d e s c r i p t i o n s - i t e m >
< / e l - d e s c r i p t i o n s >
< / e l - d e s c r i p t i o n s >
< / e l - d i a l o g >
< / e l - d i a l o g >
< import -dialog ref = "importdialog"
< import -dialog ref = "importdialog"
@ -369,15 +368,15 @@
/ / 总 条 数
/ / 总 条 数
total : 0 ,
total : 0 ,
/ / 工 作 动 态 表 格 数 据
/ / 工 作 动 态 表 格 数 据
gzdtList : [ ] ,
gzdtList : [ ] ,
/ / 弹 出 层 标 题
/ / 弹 出 层 标 题
title : "" ,
title : "" ,
/ / 是 否 显 示 弹 出 层
/ / 是 否 显 示 弹 出 层
open : false ,
open : false ,
/ / 备 注 时 间 范 围
/ / 备 注 时 间 范 围
daterangeCreateTime : [ ] ,
daterangeCreateTime : [ ] ,
/ / 备 注 时 间 范 围
/ / 备 注 时 间 范 围
daterangeUpdateTime : [ ] ,
daterangeUpdateTime : [ ] ,
/ / 查 询 参 数
/ / 查 询 参 数
queryParams : {
queryParams : {
pageNum : 1 ,
pageNum : 1 ,
@ -409,12 +408,12 @@
} ,
} ,
/ / 表 单 参 数
/ / 表 单 参 数
form : {
form : {
/ / d o m a i n s : [
domains : [
/ / {
{
/ / f i l e N a m e : " " ,
fileName : "" ,
/ / f i l e U r l : " "
fileUrl : " "
/ / }
}
/ / ] ,
] ,
} ,
} ,
/ / 表 单 校 验
/ / 表 单 校 验
rules : {
rules : {
@ -428,7 +427,7 @@
{ required : true , message : '请输入类型' , trigger : 'blur' } ,
{ required : true , message : '请输入类型' , trigger : 'blur' } ,
] ,
] ,
} ,
} ,
fileNameS : [ ] ,
/ / f i l e N a m e S : [ ] ,
fileList : [ ] ,
fileList : [ ] ,
files : [ ] ,
files : [ ] ,
} ;
} ;
@ -442,15 +441,15 @@
/** 查询工作动态列表 */
/** 查询工作动态列表 */
getList ( ) {
getList ( ) {
this . loading = true ;
this . loading = true ;
this . queryParams . params = { } ;
this . queryParams . params = { } ;
if ( null != this . daterangeCreateTime && '' != this . daterangeCreateTime ) {
if ( null != this . daterangeCreateTime && '' != this . daterangeCreateTime ) {
this . queryParams . params [ "beginCreateTime" ] = this . daterangeCreateTime [ 0 ] ;
this . queryParams . params [ "beginCreateTime" ] = this . daterangeCreateTime [ 0 ] ;
this . queryParams . params [ "endCreateTime" ] = this . daterangeCreateTime [ 1 ] ;
this . queryParams . params [ "endCreateTime" ] = this . daterangeCreateTime [ 1 ] ;
}
}
if ( null != this . daterangeUpdateTime && '' != this . daterangeUpdateTime ) {
if ( null != this . daterangeUpdateTime && '' != this . daterangeUpdateTime ) {
this . queryParams . params [ "beginUpdateTime" ] = this . daterangeUpdateTime [ 0 ] ;
this . queryParams . params [ "beginUpdateTime" ] = this . daterangeUpdateTime [ 0 ] ;
this . queryParams . params [ "endUpdateTime" ] = this . daterangeUpdateTime [ 1 ] ;
this . queryParams . params [ "endUpdateTime" ] = this . daterangeUpdateTime [ 1 ] ;
}
}
listGzdt ( this . queryParams ) . then ( response => {
listGzdt ( this . queryParams ) . then ( response => {
this . gzdtList = response . rows ;
this . gzdtList = response . rows ;
this . total = response . total ;
this . total = response . total ;
@ -488,12 +487,12 @@
updateTime : null ,
updateTime : null ,
remark : null ,
remark : null ,
/ / d o m a i n s : [
domains : [
/ / {
{
/ / f i l e N a m e : " " ,
fileName : "" ,
/ / f i l e U r l : " "
fileUrl : " "
/ / }
}
/ / ] ,
] ,
} ;
} ;
this . resetForm ( "form" ) ;
this . resetForm ( "form" ) ;
} ,
} ,
@ -548,7 +547,7 @@
this . form = response . data ;
this . form = response . data ;
let arr1 = this . form . fileName . split ( ',' ) ;
let arr1 = this . form . fileName . split ( ',' ) ;
let arr2 = this . form . fileUrl . split ( ',' ) ;
let arr2 = this . form . fileUrl . split ( ',' ) ;
if ( arr1 [ 0 ] !== '' && arr1 . length > 0 && arr2 . length > 0 ) {
if ( arr1 [ 0 ] !== '' && arr1 . length > 1 && arr2 . length > 1 ) {
arr1 . forEach ( ( item , index ) => {
arr1 . forEach ( ( item , index ) => {
let obj = { } ;
let obj = { } ;
obj . name = item ;
obj . name = item ;
@ -565,61 +564,50 @@
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd ( ) {
handleAdd ( ) {
this . reset ( ) ;
this . reset ( ) ;
this . fileNameS = [ ] ;
/ / t h i s . f i l e N a m e S = [ ] ;
this . open = true ;
this . open = true ;
this . title = "添加工作动态" ;
this . title = "添加工作动态" ;
} ,
} ,
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate ( row ) {
handleUpdate ( row ) {
this . reset ( ) ;
this . reset ( ) ;
this . fileNameS = [ ]
/ / t h i s . f i l e N a m e S = [ ]
const id = row . id || this . ids
const id = row . id || this . ids
getGzdt ( id ) . then ( response => {
getGzdt ( id ) . then ( response => {
this . form = response . data ;
/ / t h i s . f o r m = r e s p o n s e . d a t a ;
console . log ( this . form )
this . form . areaId = response . data . areaId ;
/ / t h i s . f o r m . a r e a I d = r e s p o n s e . d a t a . a r e a I d ;
this . form . isStatus = response . data . isStatus ;
/ / t h i s . f o r m . i s S t a t u s = r e s p o n s e . d a t a . i s S t a t u s ;
this . form . title = response . data . title ;
/ / t h i s . f o r m . t i t l e = r e s p o n s e . d a t a . t i t l e ;
this . form . type = response . data . type ;
/ / t h i s . f o r m . t y p e = r e s p o n s e . d a t a . t y p e ;
this . form . createTime = response . data . createTime ;
/ / t h i s . f o r m . c r e a t e T i m e = r e s p o n s e . d a t a . c r e a t e T i m e ;
this . form . remark = response . data . remark ;
/ / t h i s . f o r m . r e m a r k = r e s p o n s e . d a t a . r e m a r k ;
this . form . id = response . data . id ;
/ / t h i s . f o r m . i d = r e s p o n s e . d a t a . i d ;
if ( response . data . fileName && response . data . fileUrl ) {
/ / i f ( r e s p o n s e . d a t a . f i l e N a m e & & r e s p o n s e . d a t a . f i l e U r l ) {
/ / l e t a r r 1 = r e s p o n s e . d a t a . f i l e N a m e . s p l i t ( " , " ) ;
/ / l e t a r r 2 = r e s p o n s e . d a t a . f i l e U r l . s p l i t ( " , " ) ;
/ / i f ( a r r 1 . l e n g t h > 1 ) {
/ / t h i s . f o r m . d o m a i n s = [ ] ;
/ / a r r 1 . f o r E a c h ( ( v a l u e , i n d e x ) = > {
/ / t h i s . f o r m . d o m a i n s . p u s h ( {
/ / f i l e N a m e : v a l u e ,
/ / f i l e U r l : a r r 2 [ i n d e x ] ,
/ / } ) ;
/ / } ) ;
/ / } e l s e {
/ / t h i s . f o r m . d o m a i n s = [
/ / {
/ / f i l e N a m e : a r r 1 [ 0 ] ,
/ / f i l e U r l : a r r 2 [ 0 ] ,
/ / }
/ / ] ;
/ / }
/ / } e l s e {
/ / t h i s . f o r m . d o m a i n s = [
/ / {
/ / f i l e N a m e : ' ' ,
/ / f i l e U r l : ' ' ,
/ / }
/ / ] ;
/ / }
if ( response . data . fileName && response . data . fileUrl ) {
let arr1 = response . data . fileName . split ( "," ) ;
let arr1 = response . data . fileName . split ( "," ) ;
let arr2 = response . data . fileUrl . split ( "," ) ;
let arr2 = response . data . fileUrl . split ( "," ) ;
arr1 . forEach ( ( name , index ) => {
if ( arr1 . length > 1 ) {
let obj = { } ;
this . form . domains = [ ] ;
obj . name = name ;
arr1 . forEach ( ( value , index ) => {
obj . url = arr2 [ index ]
this . form . domains . push ( {
this . fileNameS . push ( obj )
fileName : value ,
} )
fileUrl : arr2 [ index ] ,
} ) ;
} ) ;
} else {
this . form . domains = [
{
fileName : arr1 [ 0 ] ,
fileUrl : arr2 [ 0 ] ,
}
] ;
}
} else {
this . form . domains = [
{
fileName : '' ,
fileUrl : '' ,
}
] ;
}
}
this . open = true ;
this . open = true ;
this . title = "修改工作动态" ;
this . title = "修改工作动态" ;
@ -638,40 +626,31 @@
} ,
} ,
/** 提交按钮 */
/** 提交按钮 */
submitForm ( ) {
submitForm ( ) {
let reg = new RegExp ( 'http' )
let arr1 = [ ] ;
let arr1 = [ ] ;
let arr2 = [ ] ;
let arr2 = [ ] ;
this . fileNameS . forEach ( ( value ) => {
this . form . domains . forEach ( ( value ) => {
arr1 . push ( value . name ) ;
arr1 . push ( value . fileName ) ;
if ( reg . test ( value . url ) ) {
arr2 . push ( value . fileUrl ) ;
arr2 . push ( value . url ) ;
} else {
arr2 . push ( process . env . VUE _APP _BASE _API + value . url ) ;
}
} ) ;
} ) ;
this . form . fileName = arr1 . join ( "," ) ;
this . form . fileName = arr1 . join ( "," ) ;
this . form . fileUrl = arr2 . join ( "," ) ;
this . form . fileUrl = arr2 . join ( "," ) ;
if ( this . form . fileName && this . form . fileUrl ) {
this . $refs [ "form" ] . validate ( valid => {
this . $refs [ "form" ] . validate ( valid => {
if ( valid ) {
if ( valid ) {
if ( this . form . id != null ) {
if ( this . form . id != null ) {
updateGzdt ( this . form ) . then ( response => {
updateGzdt ( this . form ) . then ( response => {
this . $modal . msgSuccess ( "修改成功" ) ;
this . $modal . msgSuccess ( "修改成功" ) ;
this . open = false ;
this . open = false ;
this . getList ( ) ;
this . getList ( ) ;
} ) ;
} ) ;
} else {
} else {
addGzdt ( this . form ) . then ( response => {
addGzdt ( this . form ) . then ( response => {
this . $modal . msgSuccess ( "新增成功" ) ;
this . $modal . msgSuccess ( "新增成功" ) ;
this . open = false ;
this . open = false ;
this . getList ( ) ;
this . getList ( ) ;
} ) ;
} ) ;
}
}
}
} ) ;
}
} else {
} ) ;
this . $modal . msgError ( '请上传文件' )
}
} ,
} ,
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete ( row ) {
handleDelete ( row ) {
@ -723,19 +702,19 @@
/ / t h i s . $ m o d e l . m s g E r r o r ( " 导 入 失 败 " ) ;
/ / t h i s . $ m o d e l . m s g E r r o r ( " 导 入 失 败 " ) ;
/ / } ) ;
/ / } ) ;
} ,
} ,
/ / a d d D o m a i n ( ) {
addDomain ( ) {
/ / / / c o n s o l e . l o g ( t h i s . f o r m . d o m a i n s , ' d o m a i n s ' )
/ / c o n s o l e . l o g ( t h i s . f o r m . d o m a i n s , ' d o m a i n s ' )
/ / t h i s . f o r m . d o m a i n s . p u s h ( {
this . form . domains . push ( {
/ / f i l e U r l : ' ' ,
fileUrl : '' ,
/ / f i l e N a m e : ' ' ,
fileName : '' ,
/ / } ) ;
} ) ;
/ / } ,
} ,
/ / r e m o v e D o m a i n ( i t e m ) {
removeDomain ( item ) {
/ / v a r i n d e x = t h i s . f o r m . d o m a i n s . i n d e x O f ( i t e m )
var index = this . form . domains . indexOf ( item )
/ / i f ( i n d e x ! = = - 1 ) {
if ( index !== - 1 ) {
/ / t h i s . f o r m . d o m a i n s . s p l i c e ( i n d e x , 1 )
this . form . domains . splice ( index , 1 )
/ / }
}
/ / } ,
} ,
}
}
}
}