@ -1,12 +1,7 @@
< template >
< template >
< 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
< el -form :model ="queryParams" ref = "queryForm" :inline ="true" v-show ="showSearch" >
: model = "queryParams"
ref = "queryForm"
: inline = "true"
v - show = "showSearch"
>
< el -form -item label = "名称" prop = "name" >
< el -form -item label = "名称" prop = "name" >
< el -input
< el -input
v - model = "queryParams.name"
v - model = "queryParams.name"
@ -17,16 +12,8 @@
/ >
/ >
< / 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
< el -button type = "primary" icon = "el-icon-search" size = "mini" @click ="handleQuery" > 搜 索 < / el -button >
type = "primary"
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetQuery" > 重 置 < / el -button >
icon = "el-icon-search"
size = "mini"
@ click = "handleQuery"
> 搜索 < / e l - b u t t o n
>
< el -button icon = "el-icon-refresh" size = "mini" @click ="resetQuery"
> 重置 < / 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 >
< / e l - f o r m >
< / e l - f o r m >
< / div >
< / div >
@ -44,18 +31,14 @@
: disabled = "single"
: disabled = "single"
@ click = "handleUpdate"
@ click = "handleUpdate"
v - hasPermi = "['tcZz/netManage:ytlc:edit']"
v - hasPermi = "['tcZz/netManage:ytlc: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:ytlc:remove']"
v - hasPermi = "['tcZz/netManage:ytlc:remove']"
> 删除 < / e l - b u t t o n
> 删除 < / e l - b u t t o n >
>
< el -button type = "primary" size = "mini" @click ="exportFile" > 导 入 < / el -button >
< el -button
< el -button
type = "warning"
type = "warning"
size = "mini"
size = "mini"
@ -65,24 +48,14 @@
> 导出 < / e l - b u t t o n
> 导出 < / e l - b u t t o n
>
>
< / div >
< / div >
< el -table
< el -table v-loading ="loading" :data="ytlcList" @selection-change="handleSelectionChange" >
v - loading = "loading"
: data = "ytlcList"
@ 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 = "name" / >
< el -table -column label = "名称" align = "center" prop = "name" / >
< 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
< el -table -column label = "操作" align = "center" class -name = " small -padding fixed -width " width = "200" fixed = "right" >
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"
@ -96,21 +69,19 @@
size = "mini"
size = "mini"
@ click = "handleUpdate(scope.row)"
@ click = "handleUpdate(scope.row)"
v - hasPermi = "['tcZz/netManage:ytlc:edit']"
v - hasPermi = "['tcZz/netManage:ytlc: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:ytlc:remove']"
v - hasPermi = "['tcZz/netManage:ytlc: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"
@ -118,27 +89,16 @@
/ >
/ >
<!-- 添加或修改约谈流程对话框 -- >
<!-- 添加或修改约谈流程对话框 -- >
< el -dialog
< el -dialog :visible.sync ="open" width = "600px" append -to -body custom -class = " dialog -box " >
: visible . sync = "open"
width = "600px"
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
< el -form ref = "form" :model ="form" :rules ="rules" label -width = " auto " class = "dialog-from" >
ref = "form"
: model = "form"
: rules = "rules"
label - width = "auto"
class = "dialog-from"
>
< el -form -item label = "名称" prop = "name" >
< el -form -item label = "名称" prop = "name" >
< el -input v -model = " form.name " placeholder = "请输入名称" / >
< el -input v -model = " form.name " 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 > - - >
<!-- < el -form -item label = "文件路径(完整路径)" > -- >
<!-- < el -form -item label = "文件路径(完整路径)" > -- >
< fileUpload v -model = " fileNameS " :limit ="1" / >
< fileUpload v -model = " fileNameS " :limit ="1" / >
<!-- < / 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 - 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" >
@ -164,13 +124,7 @@
< / div > -- >
< / div > -- >
< 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
< el -input v -model = " form.remark " resize = "none" :rows ="5" type = "textarea" placeholder = "请输入备注" / >
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" >
@ -187,69 +141,36 @@
: 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
< el -descriptions title = "约谈流程" :column ="2" border labelClassName = "desLable" >
title = "约谈流程"
< el -descriptions -item label = "名称" > { { form . name } } < / e l - d e s c r i p t i o n s - i t e m >
: column = "2"
border
< el -descriptions -item label = "文件名称" > { { form . fileName } } < / e l - d e s c r i p t i o n s - i t e m >
labelClassName = "desLable"
>
< el -descriptions -item label = "名称" > { {
form . name
} } < / e l - d e s c r i p t i o n s - i t e m >
<!-- < el -descriptions -item label = "文件名称" > { { form . fileName } } < / e l - d e s c r i p t i o n s - i t e m > - - >
< el -descriptions -item label = "文件"
> < a
v - for = "(item, index) in files"
: key = "index"
: href = "item.url"
target = "blank"
> { { item . name } } < / a
> < / e l - d e s c r i p t i o n s - i t e m
>
<!-- < el -descriptions -item label = "文件路径(完整路径)" > { { form . fileUrl } } < / e l - d e s c r i p t i o n s - i t e m > - - >
< el -descriptions -item label = "文件路径(完整路径)" > { { form . fileUrl } } < / 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 >
< 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"
propsUrl = "/tcZz/netManage/ytlc/common/importExcel"
importUrl = "/tcZz/netManage/ytlc/importTemplate"
importName = "约谈流程"
: getList = "getList"
> < / i m p o r t - d i a l o g >
< / div >
< / div >
< / template >
< / template >
< script >
< script >
import {
import { listYtlc , getYtlc , delYtlc , addYtlc , updateYtlc , exportYtlc } from "@/api/tcZz/netManage/ytlc" ;
listYtlc ,
export default {
getYtlc ,
delYtlc ,
addYtlc ,
updateYtlc ,
exportYtlc ,
} from "@/api/tcZz/netManage/ytlc" ;
import importDialog from "@/views/components/importDialog/index.vue"
export default {
name : "Ytlc" ,
name : "Ytlc" ,
components : { importDialog } ,
/ / 注 释 字 典
/ / 注 释 字 典
data ( ) {
data ( ) {
return {
return {
tableHeigth : 0 ,
tableHeigth : 0 ,
/ / 查 看 详 情
/ / 查 看 详 情
infoOpen : false ,
infoOpen : false ,
/ / 详 情 标 题
/ / 详 情 标 题
infoTitle : "" ,
infoTitle : '' ,
/ / 遮 罩 层
/ / 遮 罩 层
loading : true ,
loading : true ,
/ / 导 出 遮 罩 层
/ / 导 出 遮 罩 层
@ -295,6 +216,7 @@ export default {
updateTime : null ,
updateTime : null ,
remark : null ,
remark : null ,
} ,
} ,
/ / 表 单 参 数
/ / 表 单 参 数
form : {
form : {
@ -307,36 +229,33 @@ export default {
} ,
} ,
/ / 表 单 校 验
/ / 表 单 校 验
rules : {
rules : {
name : [ { required : true , message : "请输入名称" , trigger : "blur" } ] ,
name : [
{ required : true , message : '请输入名称' , trigger : 'blur' } ,
] ,
} ,
} ,
fileList : [ ] ,
fileList : [ ] ,
fileNameS : [ ] ,
fileNameS : [ ] ,
files : [ ] ,
} ;
} ;
} ,
} ,
created ( ) {
created ( ) {
this . getList ( ) ;
this . getList ( ) ;
} ,
} ,
methods : {
methods : {
/** 导入按钮操作 */
exportFile ( ) {
this . $refs . importdialog . open ( ) ;
} ,
/** 查询约谈流程列表 */
/** 查询约谈流程列表 */
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 . queryParams . params [ "beginCreateTime" ] = this . daterangeCreateTime [ 0 ] ;
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 . queryParams . params [ "beginUpdateTime" ] = this . daterangeUpdateTime [ 0 ] ;
this . daterangeUpdateTime [ 0 ] ;
this . queryParams . params [ "endUpdateTime" ] = this . daterangeUpdateTime [ 1 ] ;
this . queryParams . params [ "endUpdateTime" ] = this . daterangeUpdateTime [ 1 ] ;
}
}
listYtlc ( this . queryParams ) . then ( ( response ) => {
listYtlc ( this . queryParams ) . then ( response => {
this . ytlcList = response . rows ;
this . ytlcList = response . rows ;
this . total = response . total ;
this . total = response . total ;
this . loading = false ;
this . loading = false ;
@ -374,6 +293,7 @@ export default {
/ / f i l e U r l : " " ,
/ / f i l e U r l : " " ,
/ / }
/ / }
/ / ] ,
/ / ] ,
} ;
} ;
this . resetForm ( "form" ) ;
this . resetForm ( "form" ) ;
} ,
} ,
@ -391,31 +311,18 @@ export default {
} ,
} ,
/ / 多 选 框 选 中 数 据
/ / 多 选 框 选 中 数 据
handleSelectionChange ( selection ) {
handleSelectionChange ( selection ) {
this . ids = selection . map ( ( item ) => item . id ) ;
this . ids = selection . map ( item => item . id )
this . single = selection . length !== 1 ;
this . single = selection . length !== 1
this . multiple = ! selection . length ;
this . multiple = ! selection . length
} ,
} ,
/**查看按钮操作 */
/**查看按钮操作 */
handleInfo ( row ) {
handleInfo ( row ) {
this . reset ( ) ;
this . reset ( ) ;
this . files = [ ] ;
const id = row . id || this . ids
const id = row . id || this . ids ;
getYtlc ( id ) . then ( response => {
getYtlc ( id ) . then ( ( response ) => {
this . form = response . data ;
this . form = response . data ;
let arr1 = this . form . fileName . split ( "," ) ;
let arr2 = this . form . fileUrl . split ( "," ) ;
if ( arr1 [ 0 ] !== "" && arr1 . length > 0 && arr2 . length > 0 ) {
arr1 . forEach ( ( item , index ) => {
let obj = { } ;
obj . name = item ;
obj . url = arr2 [ index ] ;
this . files . push ( obj ) ;
} ) ;
} else {
this . files = [ ] ;
}
this . infoOpen = true ;
this . infoOpen = true ;
this . infoTitle = "查看约谈流程详情" ;
this . infoTitle = "查看约谈流程详情"
} ) ;
} ) ;
} ,
} ,
/** 新增按钮操作 */
/** 新增按钮操作 */
@ -428,10 +335,10 @@ export default {
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate ( row ) {
handleUpdate ( row ) {
this . reset ( ) ;
this . reset ( ) ;
this . fileNameS = [ ] ;
this . fileNameS = [ ]
const id = row . id || this . ids ;
const id = row . id || this . ids
getYtlc ( id ) . then ( ( response ) => {
getYtlc ( id ) . then ( response => {
/ / c o n s o l e . l o g ( r e s p o n s e . d a t a , ' r e s p o n s e . d a t a ' )
console . log ( response . data , 'response.data' )
this . form = response . data ;
this . form = response . data ;
/ / t h i s . f o r m . n a m e = r e s p o n s e . d a t a . n a m e ;
/ / t h i s . f o r m . n a m e = r e s p o n s e . d a t a . n a m e ;
/ / 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 ;
/ / 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 ;
@ -448,7 +355,6 @@ export default {
} ) ;
} ) ;
} ) ;
} ) ;
}
}
/ / c o n s o l e . l o g ( t h i s . f i l e N a m e S , ' t h i s . f i l e N a m e S ' )
this . open = true ;
this . open = true ;
this . title = "修改约谈流程" ;
this . title = "修改约谈流程" ;
} ) ;
} ) ;
@ -457,15 +363,11 @@ export default {
submitForm ( ) {
submitForm ( ) {
let arr1 = [ ] ;
let arr1 = [ ] ;
let arr2 = [ ] ;
let arr2 = [ ] ;
let reg = new RegExp ( "http" ) ;
console . log ( this . fileNameS )
if ( this . fileNameS . length > 0 ) {
if ( this . fileNameS . length > 0 ) {
this . fileNameS . forEach ( ( value ) => {
this . fileNameS . forEach ( ( value ) => {
arr1 . push ( value . name ) ;
arr1 . push ( value . name ) ;
if ( reg . test ( value . url ) ) {
arr2 . push ( value . url ) ;
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 ( "," ) ;
@ -473,18 +375,17 @@ export default {
this . form . fileName = "" ;
this . form . fileName = "" ;
this . form . fileUrl = "" ;
this . form . fileUrl = "" ;
}
}
/ / c o n s o l e . l o g ( t h i s . f o r m , " t h i s . f o r m " ) ;
this . $refs [ "form" ] . validate ( valid => {
this . $refs [ "form" ] . validate ( ( valid ) => {
if ( valid ) {
if ( valid ) {
if ( this . form . id != null ) {
if ( this . form . id != null ) {
console . log ( this . form ) ;
console . log ( this . form )
updateYtlc ( this . form ) . then ( ( response ) => {
updateYtlc ( this . form ) . then ( response => {
this . $modal . msgSuccess ( "修改成功" ) ;
this . $modal . msgSuccess ( "修改成功" ) ;
this . open = false ;
this . open = false ;
this . getList ( ) ;
this . getList ( ) ;
} ) ;
} ) ;
} else {
} else {
addYtlc ( this . form ) . then ( ( response ) => {
addYtlc ( this . form ) . then ( response => {
this . $modal . msgSuccess ( "新增成功" ) ;
this . $modal . msgSuccess ( "新增成功" ) ;
this . open = false ;
this . open = false ;
this . getList ( ) ;
this . getList ( ) ;
@ -499,53 +400,45 @@ export default {
this . $confirm ( '是否确认删除编号为"' + ids + '"的数据项?' , "警告" , {
this . $confirm ( '是否确认删除编号为"' + ids + '"的数据项?' , "警告" , {
confirmButtonText : "确定" ,
confirmButtonText : "确定" ,
cancelButtonText : "取消" ,
cancelButtonText : "取消" ,
type : "warning" ,
type : "warning"
} )
} ) . then ( function ( ) {
. then ( function ( ) {
return delYtlc ( ids ) ;
return delYtlc ( ids ) ;
} )
} ) . then ( ( ) => {
. then ( ( ) => {
this . getList ( ) ;
this . getList ( ) ;
this . msgSuccess ( "删除成功" ) ;
this . msgSuccess ( "删除成功" ) ;
} )
} ) . catch ( ( ) => { } ) ;
. catch ( ( ) => { } ) ;
} ,
} ,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport ( ) {
handleExport ( ) {
const queryParams = this . queryParams ;
const queryParams = this . queryParams ;
this . $confirm ( "是否确认导出所有约谈流程数据项?" , "警告" , {
this . $confirm ( '是否确认导出所有约谈流程数据项?' , "警告" , {
confirmButtonText : "确定" ,
confirmButtonText : "确定" ,
cancelButtonText : "取消" ,
cancelButtonText : "取消" ,
type : "warning" ,
type : "warning"
} )
} ) . then ( ( ) => {
. then ( ( ) => {
this . download ( '/tcZz/netManage/ytlc/export' , {
this . download (
... this . queryParams
"/tcZz/netManage/ytlc/export" ,
} , '约谈流程_' + new Date ( ) . getTime ( ) + '.xlsx' )
{
... this . queryParams ,
} ,
"约谈流程_" + new Date ( ) . getTime ( ) + ".xlsx"
) ;
this . exportLoading = false ;
this . exportLoading = false ;
} )
} ) . catch ( ( ) => { } ) ;
. catch ( ( ) => { } ) ;
} ,
} ,
addDomain ( ) {
addDomain ( ) {
this . form . domains . push ( {
this . form . domains . push ( {
fileUrl : "" ,
fileUrl : '' ,
fileName : "" ,
fileName : '' ,
} ) ;
} ) ;
console . log ( this . form . domains , "domains" ) ;
console . log ( this . form . domains , 'domains' )
} ,
} ,
removeDomain ( item ) {
removeDomain ( item ) {
var index = this . form . domains . indexOf ( item ) ;
var index = this . form . domains . indexOf ( item )
/ / c o n s o l e . l o g ( i n d e x , ' i n d e x ' )
/ / c o n s o l e . l o g ( i n d e x , ' i n d e x ' )
if ( index !== - 1 ) {
if ( index !== - 1 ) {
this . form . domains . splice ( index , 1 ) ;
this . form . domains . splice ( index , 1 )
}
}
} ,
} ,
} ,
}
} ;
}
< / script >
< / script >
< style lang = "scss" scoped >
< style lang = "scss" scoped >
/ / : : v - d e e p . e l - d i a l o g {
/ / : : v - d e e p . e l - d i a l o g {
@ -566,8 +459,4 @@ export default {
/ / }
/ / }
/ / }
/ / }
/ / }
/ / }
a {
color : # 0072 c6 ;
margin : 0 5 px ;
}
< / style >
< / style >