<template>
|
<basic-container>
|
<el-form :model="searchForm" inline label-width="70px">
|
<el-row>
|
<el-col :span="3">
|
<el-form-item>
|
<el-input type="text"
|
v-model="searchForm.unitName"
|
clearable
|
placeholder="文件号"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="3">
|
<el-form-item>
|
<el-select v-model="searchForm.caseSource" placeholder="请选择案件来源">
|
<el-option
|
v-for="item in caseSourceList"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="3">
|
<el-form-item>
|
<el-input type="text"
|
v-model="searchForm.litigant"
|
clearable
|
placeholder="当事人"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="3">
|
<el-form-item>
|
<el-input type="text"
|
v-model="searchForm.phone"
|
clearable
|
placeholder="手机号"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item>
|
<el-button type="primary" @click="getDataList" icon="el-icon-search">查询
|
</el-button>
|
<el-button @click="reset">重置</el-button>
|
<el-button type="primary" @click="addItem()" icon="el-icon-plus">添加</el-button>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<!-- 列表y -->
|
<div class="law-table-main">
|
<el-table
|
:height="tableHeight"
|
:data="dataList" border
|
v-loading="dataListLoading">
|
<el-table-column
|
label="序号"
|
prop="data"
|
type="index"
|
width="60"
|
align="center"
|
fixed="left"
|
></el-table-column>
|
<el-table-column
|
prop="unitName"
|
label="文件号"
|
:show-overflow-tooltip="true"
|
min-width="18%"
|
></el-table-column>
|
<el-table-column
|
prop="caseSource"
|
label="案件来源"
|
:show-overflow-tooltip="true"
|
min-width="18%"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="casePoint"
|
label="案由"
|
:show-overflow-tooltip="true"
|
min-width="22%"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="litigant"
|
label="当事人姓名"
|
min-width="20%">
|
</el-table-column>
|
<el-table-column
|
prop="phone"
|
label="联系电话"
|
min-width="22%"
|
></el-table-column>
|
<el-table-column
|
label="操作"
|
fixed="right"
|
align="right"
|
header-align="center"
|
min-width="18%">
|
<template v-slot:="scope">
|
<el-button v-if="scope.row.registerState === '1'" type="text" @click="getById(scope.row.id)">
|
<img src="../../../assets/lawImg/seeIcon.png" alt="">
|
</el-button>
|
<el-button v-else type="text" @click="getById(scope.row.id)">
|
<img src="../../../assets/lawImg/editIcon.png" alt="">
|
</el-button>
|
<el-button type="text" @click="goProcess(scope.row)">
|
<img src="../../../assets/lawImg/editIcon2.png" alt="">
|
</el-button>
|
<el-button type="text" @click="deleteById(scope.row.id)">
|
<img src="../../../assets/lawImg/deleteIconRed.png" alt="">
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<div class="avue-crud__pagination">
|
<el-pagination
|
@size-change="sizeChangeHandle"
|
@current-change="currentChangeHandle"
|
:current-page="pageIndex"
|
:page-sizes="[10, 20, 50, 100]"
|
:page-size="pageSize"
|
:total="total"
|
background
|
layout="total, sizes, prev, pager, next, jumper"
|
>
|
</el-pagination>
|
</div>
|
<table-form v-if="isShow" ref="addOrUpdate" @getDataList="getDataList" @cancel="cancel"></table-form>
|
</basic-container>
|
</template>
|
|
<script>
|
import TableForm from '@/views/News/word-manage/auditLink/fileCase'
|
import {getList,delObj} from '@/api/News/fileCase'
|
import {remote} from "@/api/admin/dict"
|
|
export default {
|
name: "index",
|
components: {
|
TableForm
|
},
|
data() {
|
return {
|
tableHeight: 500,
|
// 搜索
|
searchForm: {
|
unitName:"",
|
caseSource: '',
|
litigant:"",
|
phone:"",
|
current: this.pageIndex,
|
size: this.pageSize
|
},
|
// 列表
|
dataList: [],
|
// 分页
|
pageIndex: 1,
|
pageSize: 10,
|
total: 0,
|
// 新增弹框开启或关闭
|
isShow: false,
|
dataListLoading: false,
|
//来源数据
|
caseSourceList: [],
|
}
|
},
|
created() {
|
this.getDataList();
|
this.getDataType();
|
this.tableHeight = window.innerHeight - 270
|
},
|
methods: {
|
// caseFormatter(row, column) {
|
// if (row.isCase == '1') {
|
// return '是';
|
// } else {
|
// return '否';
|
// }
|
// },
|
//重置
|
reset() {
|
this.searchForm = {};
|
this.getDataList();
|
},
|
//获取列表数据并查询
|
getDataList() {
|
this.dataListLoading = true;
|
this.searchForm.current = this.pageIndex;
|
this.searchForm.size = this.pageSize;
|
getList(this.searchForm).then(res => {
|
this.dataList = res.data.data.records;
|
this.total = res.data.data.total;
|
this.dataListLoading = false;
|
})
|
},
|
//获取来源
|
getDataType() {
|
remote('caseSource_Type').then(res => {
|
this.caseSourceList = res.data.data
|
})
|
},
|
//关闭添加弹框
|
cancel() {
|
this.isShow = false;
|
},
|
// 每页数
|
sizeChangeHandle(val) {
|
this.pageSize = val;
|
this.pageIndex = 1;
|
this.getDataList();
|
},
|
// 当前页
|
currentChangeHandle(val) {
|
this.pageIndex = val;
|
this.getDataList();
|
},
|
// 查看详细流程
|
goProcess(row) {
|
// this.$router.push({name: 'process_manage', params: {name: id}})
|
this.$router.push({
|
path: '/process',
|
query: {
|
id: row.id,
|
/*lawName:row.name,
|
place:row.place,
|
effectiveTime:row.effectiveTime*/
|
|
}
|
})
|
},
|
getById(id) {
|
this.isShow = true;
|
this.$nextTick(() => {
|
this.$refs.addOrUpdate.init(id)
|
})
|
},
|
addItem() {
|
this.isShow = true;
|
this.$nextTick(() => {
|
this.$refs.addOrUpdate.init('')
|
})
|
},
|
deleteById(id) {
|
this.$confirm('是否确认删除', '提示', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning'
|
}).then(function () {
|
return delObj(id)
|
}).then(data => {
|
this.$message.success('删除成功');
|
this.getDataList();
|
})
|
}
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
/*::v-deep{
|
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
|
margin-bottom: 10px;
|
}
|
|
.el-input--small .el-input__inner {
|
border-radius: 20px;
|
}
|
}*/
|
</style>
|