
17 changed files with 1558 additions and 40 deletions
@ -0,0 +1,48 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/vehfleet/v1/affiliatedcompany/listPage', method: 'post', data: params, headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 查询全部列表
|
|||
listAll: function() { |
|||
return request({ |
|||
url: '/vehfleet/v1/affiliatedcompany/list', method: 'post', headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 新增、保存
|
|||
saveAffiliatedcompany: function(data) { |
|||
return request({ |
|||
url: '/vehfleet/v1/affiliatedcompany/saveOrUpdate', method: 'post', data: data, headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 初始化
|
|||
initAffiliatedcompany: function(data) { |
|||
return request({ |
|||
url: '/vehfleet/v1/affiliatedcompany/fetchSid/' + data, method: 'get' |
|||
}) |
|||
}, |
|||
|
|||
// 删除
|
|||
deleteBySids: function(data) { |
|||
return request({ |
|||
url: '/vehfleet/v1/affiliatedcompany/delBySids', method: 'DELETE', data: data, headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/vehfleet/v1/regulatorydocuments/listPage', method: 'post', data: params, headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 新增、保存
|
|||
saveRegulatorydocuments: function(data) { |
|||
return request({ |
|||
url: '/vehfleet/v1/regulatorydocuments/saveOrUpdate', method: 'post', data: data, headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 初始化
|
|||
initRegulatorydocuments: function(data) { |
|||
return request({ |
|||
url: '/vehfleet/v1/regulatorydocuments/fetchSid/' + data, method: 'get' |
|||
}) |
|||
}, |
|||
|
|||
// 删除
|
|||
deleteBySids: function(data) { |
|||
return request({ |
|||
url: '/vehfleet/v1/regulatorydocuments/delBySids', method: 'DELETE', data: data, headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
} |
@ -0,0 +1,257 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState ==1"> |
|||
<button-bar ref="btnbar" view-title="挂靠公司管理" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button class="searchbtn" size="small" @click="isSearchShow = !isSearchShow"> |
|||
{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header" label-width="120px"> |
|||
<el-form-item label="挂靠公司名称:"> |
|||
<el-input v-model="queryParams.params.corporateName" clearable placeholder=""/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button icon="el-icon-search" size="small" type="primary" @click="dosearch">查询</el-button> |
|||
<el-button icon="el-icon-refresh" size="small" type="primary" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">挂靠公司列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column align="center" fixed type="selection" width="50"/> |
|||
<el-table-column :index="indexMethod" align="center" fixed label="序号" type="index" width="60"/> |
|||
<el-table-column align="center" label="公司名称" prop="corporateName"/> |
|||
<el-table-column align="center" label="联系人" prop="contacts"/> |
|||
<el-table-column align="center" fit label="联系电话" prop="contactNumber"/> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<pagination v-show="dataList.length > 0" :limit.sync="queryParams.size" :page.sync="queryParams.current" |
|||
:total="queryParams.total" class="pagination" @pagination="loadList" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--新增修改部分组件--> |
|||
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/affiliatedCompany/affiliatedCompany' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './affiliatedCompanyAdd' |
|||
|
|||
export default { |
|||
name: 'AffiliatedCompany', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
divAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, // 显示隐藏 |
|||
tableLoading: false, |
|||
// 列表数据 |
|||
dataList: [], |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'el-icon-plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'el-icon-edit', |
|||
btnKey: 'toEdit', |
|||
btnLabel: '编辑' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'el-icon-delete', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
selectionList: [], |
|||
// sid数组 |
|||
sids: [], // 用于导出的时候保存已选择SID |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
corporateName: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
this.loadList() |
|||
}, |
|||
methods: { |
|||
handleSelectionChange(val) { |
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toEdit': |
|||
this.toEdit() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
toEdit() { |
|||
if (this.selectionList.length !== 1) { |
|||
this.$message({ |
|||
type: 'warning', |
|||
message: '请选择一条数据。', |
|||
showClose: true |
|||
}) |
|||
return |
|||
} |
|||
|
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(this.selectionList[0]) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length > 0) { |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then((resp) => { |
|||
loading.close() |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
this.loadList() |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请至少选择一条记录进行删除操作' |
|||
}) |
|||
} |
|||
}, |
|||
// 查询 |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
// 重置 |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
corporateName: '' |
|||
} |
|||
} |
|||
this.init() |
|||
}, |
|||
// 加载分页列表 |
|||
loadList() { |
|||
this.tableLoading = true |
|||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.queryParams.params.menuUrl = this.$route.path |
|||
req.listPage(this.queryParams).then(resp => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
this.queryParams.total = 0 |
|||
this.dataList = [] |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 子组件关闭(返回) |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,177 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>挂靠公司信息</div> |
|||
<div> |
|||
<el-button :disabled="submitdisabled" size="small" type="primary" @click="saveOrUpdate">保存</el-button> |
|||
<el-button size="small" type="info" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row class="first_row"> |
|||
<el-col :span="24"> |
|||
<div class="span-sty"><span class="must">*</span> 公司名称</div> |
|||
<el-form-item prop="corporateName"> |
|||
<el-input v-model="formobj.corporateName" class="addinputw addinputInfo" clearable placeholder="挂靠公司名称"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系人</div> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.contacts" class="addinputw addinputInfo" clearable placeholder="联系人"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">联系电话</div> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.contactNumber" class="addinputw addinputInfo" clearable placeholder="联系电话"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/affiliatedCompany/affiliatedCompany.js' |
|||
import { getOrgSidByPath } from '@/api/Common/dictcommons.js' |
|||
|
|||
export default { |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: '', |
|||
corporateName: '', |
|||
contacts: '', |
|||
contactNumber: '', |
|||
useOrgSid: window.sessionStorage.getItem('departmentSid'), |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
createBySid: window.sessionStorage.getItem('userSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
|
|||
}, |
|||
rules: { |
|||
corporateName: [{ required: true, message: '挂靠公司名称不能为空', trigger: 'blur' }] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
getDictValue() { |
|||
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
} |
|||
}) |
|||
}, |
|||
saveOrUpdate() { |
|||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
req.saveAffiliatedcompany(this.formobj).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
sid: '', |
|||
corporateName: '', |
|||
contacts: '', |
|||
contactNumber: '', |
|||
useOrgSid: window.sessionStorage.getItem('departmentSid'), |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
createBySid: window.sessionStorage.getItem('userSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
|
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
showAdd() { |
|||
this.getDictValue() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
showEdit(row) { |
|||
this.getDictValue() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.initAffiliatedcompany(row.sid).then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
align-items: center; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,339 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState ==1"> |
|||
<button-bar ref="btnbar" view-title="监管部门文件管理" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button class="searchbtn" size="small" @click="isSearchShow = !isSearchShow"> |
|||
{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header" label-width="120px"> |
|||
<el-form-item label="文件名称:"> |
|||
<el-select v-model="queryParams.params.fileNameValue" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="item in fileList" :key="item.dictKey" :label="item.dictValue" |
|||
:value="item.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="监管部门:"> |
|||
<el-select v-model="queryParams.params.departmentValue" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="item in orgList" :key="item.dictKey" :label="item.dictValue" |
|||
:value="item.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="上传日期"> |
|||
<el-date-picker v-model="queryParams.params.startTime" format="yyyy-MM-dd" placeholder="选择日期" |
|||
style="width: 200px;" type="date" value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
至 |
|||
<el-date-picker v-model="queryParams.params.endTime" format="yyyy-MM-dd" placeholder="选择日期" |
|||
style="width: 200px;" type="date" value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="上传人"> |
|||
<el-input v-model="queryParams.params.uploaderName" clearable placeholder="上传人" |
|||
style="width: 200px;" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="车队"> |
|||
<el-select v-model="queryParams.params.fleetName" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="(item,i) in fleetList" :key="item.sid" :label="item.corporateName" :value="item.corporateName"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="备注"> |
|||
<el-input v-model="queryParams.params.remarks" clearable placeholder="备注" style="width: 200px;"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button icon="el-icon-search" size="small" type="primary" @click="dosearch">查询</el-button> |
|||
<el-button icon="el-icon-refresh" size="small" type="primary" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">文件列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column align="center" fixed type="selection" width="50"/> |
|||
<el-table-column :index="indexMethod" align="center" fixed label="序号" type="index" width="60"/> |
|||
<el-table-column align="center" label="文件名称" prop="fileNameValue"/> |
|||
<el-table-column align="center" label="监管部门" prop="departmentValue"/> |
|||
<el-table-column align="center" fit label="上传时间" prop="createTime"/> |
|||
<el-table-column align="center" fit label="上传人" prop="uploaderName"/> |
|||
<el-table-column align="center" fit label="车队" prop="fleetName"/> |
|||
<el-table-column align="center" fit label="备注" prop="remarks"/> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<pagination v-show="dataList.length > 0" :limit.sync="queryParams.size" :page.sync="queryParams.current" |
|||
:total="queryParams.total" class="pagination" @pagination="loadList" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--新增修改部分组件--> |
|||
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/superviseFile/superviseFile' |
|||
import req2 from '@/api/affiliatedCompany/affiliatedCompany' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './superviseFileAdd' |
|||
import { typeValues } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'SuperviseFile', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
divAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, // 显示隐藏 |
|||
tableLoading: false, |
|||
// 列表数据 |
|||
dataList: [], |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'el-icon-plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'el-icon-edit', |
|||
btnKey: 'toEdit', |
|||
btnLabel: '编辑' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'el-icon-delete', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
selectionList: [], |
|||
// sid数组 |
|||
sids: [], // 用于导出的时候保存已选择SID |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
fileNameKey: '', |
|||
fileNameValue: '', |
|||
departmentKey: '', |
|||
departmentValue: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
uploaderName: '', |
|||
fleetSid: '', |
|||
fleetName: '', |
|||
remarks: '' |
|||
} |
|||
}, |
|||
fileList: [], |
|||
orgList: [], |
|||
fleetList: [] |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
this.loadList() |
|||
}, |
|||
methods: { |
|||
init() { |
|||
typeValues({ type: 'fileName' }).then((res) => { |
|||
if (res.success) { |
|||
this.fileList = res.data |
|||
} |
|||
}) |
|||
|
|||
typeValues({ type: 'superviseOrg' }).then((res) => { |
|||
if (res.success) { |
|||
this.orgList = res.data |
|||
} |
|||
}) |
|||
|
|||
req2.listAll().then((res) => { |
|||
if (res.success) { |
|||
this.fleetList = res.data |
|||
} |
|||
}) |
|||
}, |
|||
handleSelectionChange(val) { |
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toEdit': |
|||
this.toEdit() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
toEdit() { |
|||
if (this.selectionList.length !== 1) { |
|||
this.$message({ |
|||
type: 'warning', |
|||
message: '请选择一条数据。', |
|||
showClose: true |
|||
}) |
|||
return |
|||
} |
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(this.selectionList[0]) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length > 0) { |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then((resp) => { |
|||
loading.close() |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
this.loadList() |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请至少选择一条记录进行删除操作' |
|||
}) |
|||
} |
|||
}, |
|||
// 查询 |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
// 重置 |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
fileNameKey: '', |
|||
fileNameValue: '', |
|||
departmentKey: '', |
|||
departmentValue: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
uploaderName: '', |
|||
fleetSid: '', |
|||
fleetName: '', |
|||
remarks: '' |
|||
} |
|||
} |
|||
this.init() |
|||
}, |
|||
// 加载分页列表 |
|||
loadList() { |
|||
this.tableLoading = true |
|||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.queryParams.params.menuUrl = this.$route.path |
|||
req.listPage(this.queryParams).then(resp => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
this.queryParams.total = 0 |
|||
this.dataList = [] |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 子组件关闭(返回) |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,296 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>监管部门文件</div> |
|||
<div> |
|||
<el-button :disabled="submitdisabled" size="small" type="primary" @click="saveOrUpdate">保存</el-button> |
|||
<el-button size="small" type="info" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row class="first_row"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="must">*</span> 车队名称</div> |
|||
<el-form-item prop="fleetName"> |
|||
<el-select v-model="formobj.fleetName" clearable placeholder="请选择" class="addinputw addinputInfo" @change="selectFleetName"> |
|||
<el-option v-for="(item,i) in fleetList" :key="item.sid" :label="item.corporateName" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">上传人</div> |
|||
<el-form-item> |
|||
<span class="addinputw addinputInfo">{{ formobj.uploaderName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="must">*</span> 文件名称</div> |
|||
<el-form-item prop="fileNameValue"> |
|||
<el-select v-model="formobj.fileNameValue" placeholder="请选择" class="addinputw addinputInfo" @change="selectFileName"> |
|||
<el-option v-for="item in fileList" :key="item.dictKey" :label="item.dictValue" |
|||
:value="item.dictKey" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="must">*</span> 监管部门</div> |
|||
<el-form-item prop="departmentValue"> |
|||
<el-select v-model="formobj.departmentValue" placeholder="请选择" class="addinputw addinputInfo" @change="selectDepartment"> |
|||
<el-option v-for="item in orgList" :key="item.dictKey" :label="item.dictValue" |
|||
:value="item.dictKey" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" placeholder="备注" class="addinputw addinputInfo" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">附件</div> |
|||
<el-form-item > |
|||
<upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map" :upload-data="{ type: '0001' }" @change="backData"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/superviseFile/superviseFile' |
|||
import req2 from '@/api/affiliatedCompany/affiliatedCompany' |
|||
import uploadImg from '@/components/uploadFile/uploadImg' |
|||
import { getOrgSidByPath, |
|||
typeValues } from '@/api/Common/dictcommons.js' |
|||
|
|||
export default { |
|||
components: { |
|||
uploadImg |
|||
}, |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
formobj: { |
|||
sid: '', |
|||
fleetSid: '', |
|||
fleetName: '', |
|||
uploaderName: window.sessionStorage.getItem('name'), |
|||
uploaderSid: window.sessionStorage.getItem('userSid'), |
|||
fileNameKey: '', |
|||
fileNameValue: '', |
|||
departmentKey: '', |
|||
departmentValue: '', |
|||
filePaths: [], |
|||
useOrgSid: window.sessionStorage.getItem('departmentSid'), |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
createBySid: window.sessionStorage.getItem('userSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
}, |
|||
rules: { |
|||
fleetName: [{ required: true, message: '请选择车队', trigger: 'change' }], |
|||
fileNameValue: [{ required: true, message: '请选择文件名称', trigger: 'change' }], |
|||
departmentValue: [{ required: true, message: '请选择监管部门', trigger: 'change' }] |
|||
}, |
|||
imgList: [], |
|||
fileList: [], |
|||
orgList: [], |
|||
fleetList: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
getDictValue() { |
|||
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
} |
|||
}) |
|||
|
|||
typeValues({ type: 'fileName' }).then((res) => { |
|||
if (res.success) { |
|||
this.fileList = res.data |
|||
} |
|||
}) |
|||
|
|||
typeValues({ type: 'superviseOrg' }).then((res) => { |
|||
if (res.success) { |
|||
this.orgList = res.data |
|||
} |
|||
}) |
|||
|
|||
req2.listAll().then((res) => { |
|||
if (res.success) { |
|||
this.fleetList = res.data |
|||
} |
|||
}) |
|||
}, |
|||
selectFleetName(val) { |
|||
const choose = this.fleetList.filter((item) => item.sid === val) |
|||
if (choose !== null && choose.length > 0) { |
|||
this.formobj.fleetName = choose[0].corporateName |
|||
this.formobj.fleetSid = choose[0].sid |
|||
} else { |
|||
this.formobj.fleetName = '' |
|||
this.formobj.fleetSid = '' |
|||
} |
|||
}, |
|||
|
|||
selectFileName(val) { |
|||
const choose = this.fileList.filter((item) => item.dictKey === val) |
|||
if (choose !== null && choose.length > 0) { |
|||
this.formobj.fileNameValue = choose[0].dictValue |
|||
this.formobj.fileNameKey = choose[0].dictKey |
|||
} else { |
|||
this.formobj.fileNameValue = '' |
|||
this.formobj.fileNameKey = '' |
|||
} |
|||
}, |
|||
|
|||
selectDepartment(val) { |
|||
const choose = this.orgList.filter((item) => item.dictKey === val) |
|||
if (choose !== null && choose.length > 0) { |
|||
this.formobj.departmentValue = choose[0].dictValue |
|||
this.formobj.departmentKey = choose[0].dictKey |
|||
} else { |
|||
this.formobj.departmentValue = '' |
|||
this.formobj.departmentKey = '' |
|||
} |
|||
}, |
|||
|
|||
saveOrUpdate() { |
|||
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
req.saveRegulatorydocuments(this.formobj).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.imgList = [] |
|||
this.formobj = { |
|||
sid: '', |
|||
fleetSid: '', |
|||
fleetName: '', |
|||
uploaderName: window.sessionStorage.getItem('name'), |
|||
uploaderSid: window.sessionStorage.getItem('userSid'), |
|||
fileNameKey: '', |
|||
fileNameValue: '', |
|||
departmentKey: '', |
|||
departmentValue: '', |
|||
filePaths: [], |
|||
useOrgSid: window.sessionStorage.getItem('departmentSid'), |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
createOrgSid: window.sessionStorage.getItem('orgSid'), |
|||
userSid: window.sessionStorage.getItem('userSid'), |
|||
createBySid: window.sessionStorage.getItem('userSid'), |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
} |
|||
this.$emit('doback') |
|||
}, |
|||
showAdd() { |
|||
this.getDictValue() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
showEdit(row) { |
|||
this.getDictValue() |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.initRegulatorydocuments(row.sid).then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
for (var i = 0; i < resp.data.filePaths.length; i++) { |
|||
this.imgList.push({ |
|||
url: resp.data.filePaths[i] |
|||
}) |
|||
} |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
backData(value) { |
|||
console.log("backData", value) |
|||
this.formobj.filePaths = [] |
|||
this.imgList =value |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.formobj.filePaths.push(value[i].url) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
align-items: center; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,11 @@ |
|||
<script setup> |
|||
|
|||
</script> |
|||
|
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,302 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState ==1"> |
|||
<button-bar ref="btnbar" view-title="车辆保险台账管理" @btnhandle="btnHandle"/> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button class="searchbtn" size="small" @click="isSearchShow = !isSearchShow"> |
|||
{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header" label-width="120px"> |
|||
<el-form-item label="车牌号:"> |
|||
<el-select v-model="queryParams.params.fileName" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="item in fileList" :key="item.sid" :label="item.name" :value="item.sid"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="监管部门:"> |
|||
<el-select v-model="queryParams.params.orgName" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="item in orgList" :key="item.sid" :label="item.name" :value="item.sid"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="上传日期"> |
|||
<el-date-picker v-model="queryParams.params.createTimeStart" format="yyyy-MM-dd" placeholder="选择日期" |
|||
style="width: 200px;" type="date" value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
至 |
|||
<el-date-picker v-model="queryParams.params.createTimeEnd" format="yyyy-MM-dd" placeholder="选择日期" |
|||
style="width: 200px;" type="date" value-format="yyyy-MM-dd" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="上传人"> |
|||
<el-input v-model="queryParams.params.uploader" clearable placeholder="上传人" style="width: 200px;"/> |
|||
</el-form-item> |
|||
<el-form-item label="车队"> |
|||
<el-select v-model="queryParams.params.fleetName" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="(item,i) in fleetList" :key="i" :label="item.name" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="备注"> |
|||
<el-input v-model="queryParams.params.remarks" clearable placeholder="备注" style="width: 200px;"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button icon="el-icon-search" size="small" type="primary" @click="dosearch">查询</el-button> |
|||
<el-button icon="el-icon-refresh" size="small" type="primary" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="listtop"> |
|||
<div class="tit">文件列表</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column :index="indexMethod" align="center" fixed label="序号" type="index" width="60"/> |
|||
<el-table-column align="center" label="文件名称" prop="purchaseOrderNo"/> |
|||
<el-table-column align="center" label="监管部门" prop="modelName"/> |
|||
<el-table-column align="center" fit label="上传时间" prop="vehicleNum"/> |
|||
<el-table-column align="center" fit label="上传人" prop="vehicleNum"/> |
|||
<el-table-column align="center" fit label="车队" prop="vehicleNum"/> |
|||
<el-table-column align="center" fit label="备注" prop="vehicleNum"/> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<pagination v-show="dataList.length > 0" :limit.sync="queryParams.size" :page.sync="queryParams.current" |
|||
:total="queryParams.total" class="pagination" @pagination="loadList" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--新增修改部分组件--> |
|||
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/superviseFile/superviseFile' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './vehicleInsuranceLedgerAdd' |
|||
|
|||
export default { |
|||
name: 'VehicleInsuranceLedger', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
divAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, // 显示隐藏 |
|||
tableLoading: false, |
|||
// 列表数据 |
|||
dataList: [], |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'el-icon-plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'el-icon-edit', |
|||
btnKey: 'toEdit', |
|||
btnLabel: '编辑' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'el-icon-delete', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
selectionList: [], |
|||
// sid数组 |
|||
sids: [], // 用于导出的时候保存已选择SID |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
fileName: '', |
|||
orgName: '', |
|||
createTimeStart: '', |
|||
createTimeEnd: '', |
|||
uploader: '', |
|||
fleetName: '', |
|||
remarks: '' |
|||
} |
|||
}, |
|||
fileList: [], |
|||
orgList: [], |
|||
fleetList: [] |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
handleSelectionChange(val) { |
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toEdit': |
|||
this.toEdit() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
toAdd() { |
|||
this.viewState = 2 |
|||
this.$refs['divadd'].showAdd() |
|||
}, |
|||
toEdit(row) { |
|||
if (this.selectionList.length !== 1) { |
|||
this.$message({ |
|||
type: 'warning', |
|||
message: '请选择一条数据。', |
|||
showClose: true |
|||
}) |
|||
return |
|||
} |
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(row.sid, row) |
|||
}, |
|||
doDel() { |
|||
if (this.sids.length > 0) { |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.deleteBySids(this.sids).then((resp) => { |
|||
loading.close() |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: resp.msg, |
|||
showClose: true |
|||
}) |
|||
this.loadList() |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请至少选择一条记录进行删除操作' |
|||
}) |
|||
} |
|||
}, |
|||
// 查询 |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
// 重置 |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
fileName: '', |
|||
orgName: '', |
|||
createTimeStart: '', |
|||
createTimeEnd: '', |
|||
uploader: '', |
|||
fleetName: '', |
|||
remarks: '' |
|||
} |
|||
} |
|||
this.init() |
|||
}, |
|||
// 加载分页列表 |
|||
loadList() { |
|||
this.tableLoading = true |
|||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.queryParams.params.menuUrl = this.$route.path |
|||
req.listPage(this.queryParams).then(resp => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
this.queryParams.total = 0 |
|||
this.dataList = [] |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 子组件关闭(返回) |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,11 @@ |
|||
<script setup> |
|||
|
|||
</script> |
|||
|
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,11 @@ |
|||
<script setup> |
|||
|
|||
</script> |
|||
|
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
Loading…
Reference in new issue