
11 changed files with 1211 additions and 66 deletions
@ -0,0 +1,61 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
// 汇总工单数据
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/v1/riskLevel/listPage', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
// 保存新增记录
|
||||
|
saveRiskLevel: function(params) { |
||||
|
return request({ |
||||
|
url: '/v1/riskLevel/saveRiskLevel', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
// 通过sid删除一条或多条记录
|
||||
|
delBySids: function(sid) { |
||||
|
return request({ |
||||
|
url: '/v1/riskLevel/del/' + sid, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 添加风险类别
|
||||
|
saveRiskType: function(params) { |
||||
|
return request({ |
||||
|
url: '/v1/riskType/saveRiskType', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 查询二级层级内容
|
||||
|
selectRiskTypeFirst: function() { |
||||
|
return request({ |
||||
|
url: '/v1/riskType/selectRiskTypeFirst', |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
// 添加风险类别
|
||||
|
RiskListPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/v1/riskType/listPage', |
||||
|
method: 'post', |
||||
|
data: params |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 通过sid查询一级风险类别下的二级类别
|
||||
|
selectRiskTypeSubordinate: function(sid) { |
||||
|
return request({ |
||||
|
url: '/v1/riskType/selectRiskTypeSubordinate/' + sid, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
.<template> |
||||
|
<div> |
||||
|
风险指标 |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
|
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,273 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="风险等级查询" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="queryParams" :model="queryParams.params" :inline="true" class="tab-header"> |
||||
|
<el-form-item label="客户名称"><el-input v-model="queryParams.params.custname" placeholder="请输入客户名称" clearable /></el-form-item> |
||||
|
<el-form-item label="工单名称"><el-input v-model="queryParams.params.ordername" placeholder="请输入工单名称" clearable /></el-form-item> |
||||
|
<el-form-item label="等级"> |
||||
|
<el-select |
||||
|
v-model="queryParams.params.orderdegree" |
||||
|
class="addinputw" |
||||
|
placeholder="等级" |
||||
|
size="small" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="(item, i) in arrList" |
||||
|
:key="i" |
||||
|
:label="item.type" |
||||
|
:value="item.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">风险等级列表</div> |
||||
|
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
|
||||
|
<!-- Start 项目列表 --> |
||||
|
<div> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" > |
||||
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column prop="name" label="风险等级名称" align="center" /> |
||||
|
<el-table-column prop="code" label="风险等级代码" align="center" /> |
||||
|
<el-table-column prop="handlingMethod" label="处理方式" align="center" /> |
||||
|
<el-table-column prop="reportTarget" :formatter="formatorderdegree" label="报送单位" align="center" /> |
||||
|
<el-table-column fixed="right" label="操作" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-tooltip class="item" effect="dark" content="编辑" placement="top-end"> |
||||
|
<i class="el-icon-edit-outline" @click="toEdit(scope.row)"></i> |
||||
|
</el-tooltip> |
||||
|
<el-tooltip class="item" effect="dark" content="删除" placement="top"> |
||||
|
<i class="el-icon-delete" @click="doDel(scope.row)"></i> |
||||
|
</el-tooltip> |
||||
|
<!-- <el-tooltip class="item" effect="dark" content="查看" placement="top-start"> |
||||
|
<i class="el-icon-notebook-2" @click="purchase(scope.row)"></i> |
||||
|
</el-tooltip> --> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination |
||||
|
v-show="dataList.length > 0" |
||||
|
:total="queryParams.total" |
||||
|
:page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" |
||||
|
class="pagination" |
||||
|
@pagination="loadList" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<el-drawer |
||||
|
title="汇总工单数据详情" |
||||
|
:visible.sync="drawer" |
||||
|
size="86%"> |
||||
|
<div class="main-content"> |
||||
|
<el-descriptions class="margin-top" title="巡视工单信息" :column="5" :size="size"> |
||||
|
<el-descriptions-item label="工单名称">{{ TableList.ordername }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="工单编号">{{ TableList.orderno }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="客户名称">{{ TableList.custname }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="等级">{{ TableList.orderdegree }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="工单内容">{{ TableList.ordercontent }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="现场联系人">{{ TableList.receiveperson }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="现场联系人电话">{{ TableList.receivetel }}</el-descriptions-item> |
||||
|
</el-descriptions> |
||||
|
</div> |
||||
|
</el-drawer> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/Risk/index' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './RiskSetAdd' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DispatchOrderinfoIndex', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
tableLoading: false, |
||||
|
drawer: false, |
||||
|
dataList: [], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
arr:[{value:1,type:'计划巡视'},{value:2,type:'专项巡视'},{value:3,type:'告警巡视'}], |
||||
|
arrList:[{value:1,type:'一般'},{value:2,type:'重要'},{value:3,type:'紧急'},{value:4,type:'督办'}], |
||||
|
multipleSelection: [], |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
size:'', |
||||
|
TableList:[] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 初始化按钮 |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': // 关闭 |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
doDel(row) { |
||||
|
const sids = [] |
||||
|
sids.push(row.sid) |
||||
|
const tip = '请确认是否是否删除该条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}) |
||||
|
.then(() => { |
||||
|
req |
||||
|
.delBySids(sids) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams.params = {} |
||||
|
this.queryParams.params.sid = '' // sid |
||||
|
this.queryParams.params.name = '' // 登录名 |
||||
|
this.dosearch() |
||||
|
}, |
||||
|
loadList() { |
||||
|
const _this = this |
||||
|
this.tableLoading = true |
||||
|
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 { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
_this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
purchase(row){ |
||||
|
this.drawer=true |
||||
|
this.TableList=row |
||||
|
}, |
||||
|
formatorderdegree: function( row, column) { |
||||
|
if(row.reportTarget === 1){ |
||||
|
return '监管公司' |
||||
|
} else if(row.reportTarget === 2) { |
||||
|
return '贷款支行' |
||||
|
} else if (row.reportTarget === 3) { |
||||
|
return '总行' |
||||
|
}else{ |
||||
|
return '' |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.margin-top { |
||||
|
border-bottom: 1px solid #ebebeb; |
||||
|
} |
||||
|
.item { |
||||
|
margin: 6px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,219 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!-- 标题按钮部分开始 --> |
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
<!-- 标题按钮部分结束 --> |
||||
|
<!-- Start 新增修改部分 --> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj"> |
||||
|
<el-card class="box-card"> |
||||
|
<div class="wlInfo"><span>风险信息</span></div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">风险等级名称:</span> |
||||
|
<el-input v-model="formobj.name" placeholder="风险等级名称" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">风险等级代码:</span> |
||||
|
<el-input v-model="formobj.code" placeholder="风险等级代码" class="item_input" clearable /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="item"> |
||||
|
<span class="item_text">处理方式:</span> |
||||
|
<el-input v-model="formobj.handlingMethod" placeholder="处理方式" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">报送单位:</span> |
||||
|
<el-select |
||||
|
v-model="formobj.reportTarget" |
||||
|
class="item_input" |
||||
|
placeholder="请选择报送单位" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="(item, i) in reportTarget" |
||||
|
:key="i" |
||||
|
:label="item.type" |
||||
|
:value="item.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
<div class="item" style="height: 110px;"> |
||||
|
<span class="item_text">备注信息:</span> |
||||
|
<el-input type="textarea" |
||||
|
:autosize="{ minRows: 4, maxRows: 6 }" v-model="formobj.remarks" class="item_input" placeholder="备注信息" /> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<!-- End 添加修改部分 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/Risk/index' |
||||
|
export default { |
||||
|
name: 'DispatchStandardsAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
submitdisabled: false, |
||||
|
viewTitle: '', |
||||
|
formobj: { |
||||
|
name: '', // 风险等级名称 |
||||
|
code: '', // 风险等级代码 |
||||
|
handlingMethod: '', // 处理方式 |
||||
|
reportTarget: '', // 报送单位 |
||||
|
remarks: '' // 备注信息+ |
||||
|
}, |
||||
|
rules: { |
||||
|
name: [{ required: true, message: '风险等级名称不能为空', trigger: 'blur' }], // 风险等级名称 |
||||
|
code: [{ required: true, message: '风险等级代码不能为空', trigger: 'blur' }], |
||||
|
handlingMethod: [{ required: true, message: '处理方式不能为空', trigger: 'blur' }], |
||||
|
reportTarget: [{ required: true, message: '报送单位不能为空', trigger: 'blur' }], |
||||
|
}, |
||||
|
reportTarget:[{value:1,type:'监管公司'},{value:2,type:'贷款支行'},{value:3,type:'总行'}], |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
methods: { |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj.id = '' |
||||
|
this.formobj.sid = '' |
||||
|
this.formobj.name= '', |
||||
|
this.formobj.code= '', |
||||
|
this.formobj.handlingMethod= '', |
||||
|
this.formobj.reportTarget= '', |
||||
|
this.formobj.remarks= '' |
||||
|
|
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.viewTitle = '【新增】风险等级' |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.viewTitle = '【修改】风险等级' |
||||
|
const _this = this |
||||
|
const vdata = row |
||||
|
_this.formobj.id = vdata.id |
||||
|
_this.formobj.sid = vdata.sid |
||||
|
_this.formobj.name = vdata.name |
||||
|
_this.formobj.code = vdata.code |
||||
|
_this.formobj.handlingMethod = vdata.handlingMethod |
||||
|
if(vdata.reportTarget === 1){ |
||||
|
_this.formobj.reportTarget= '监管公司' |
||||
|
} else if(vdata.reportTarget === 2) { |
||||
|
_this.formobj.reportTarget= '贷款支行' |
||||
|
} else if (vdata.reportTarget === 3) { |
||||
|
_this.formobj.reportTarget= '总行' |
||||
|
}else{ |
||||
|
_this.formobj.reportTarget= '' |
||||
|
} |
||||
|
_this.formobj.remarks = vdata.remarks |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
if(this.formobj.reportTarget === '监管公司'){ |
||||
|
this.formobj.reportTarget= 1 |
||||
|
} else if(this.formobj.reportTarget === '贷款支行') { |
||||
|
this.formobj.reportTarget= 2 |
||||
|
} else if (this.formobj.reportTarget ==='总行') { |
||||
|
this.formobj.reportTarget= 3 |
||||
|
}else{ |
||||
|
this.formobj.reportTarget= '' |
||||
|
} |
||||
|
req |
||||
|
.saveRiskLevel(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.box-card { |
||||
|
margin-left: 60px; |
||||
|
margin-right: 60px; |
||||
|
min-width: 70%; |
||||
|
margin-top: 20px; |
||||
|
padding-bottom: 50px; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
margin-top: 15px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
|
||||
|
.item_text { |
||||
|
flex: 0.8; |
||||
|
font-size: 18px; |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
.item_input { |
||||
|
flex: 4; |
||||
|
font-size: 16px; |
||||
|
margin-left: 10px; |
||||
|
margin-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.item_left_input { |
||||
|
width: 20%; |
||||
|
} |
||||
|
|
||||
|
.item_left_text { |
||||
|
height: 30px; |
||||
|
margin-left: 20px; |
||||
|
line-height: 30px; |
||||
|
color: #018AD2; |
||||
|
padding: 0px 15px; |
||||
|
border: 1.5px solid #018AD2; |
||||
|
border-radius: 5px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.item_right { |
||||
|
flex: 1; |
||||
|
justify-items: center; |
||||
|
|
||||
|
.item_right_list_text { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.item_right_list_delect { |
||||
|
color: #5E94FF; |
||||
|
margin-left: 20px; |
||||
|
font-size: 16px; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -0,0 +1,272 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar ref="btnbar" view-title="风险类别查询" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="queryParams" :model="queryParams.params" :inline="true" class="tab-header"> |
||||
|
<el-form-item label="客户名称"><el-input v-model="queryParams.params.custname" placeholder="请输入客户名称" clearable /></el-form-item> |
||||
|
<el-form-item label="工单名称"><el-input v-model="queryParams.params.ordername" placeholder="请输入工单名称" clearable /></el-form-item> |
||||
|
<el-form-item label="等级"> |
||||
|
<el-select |
||||
|
v-model="queryParams.params.orderdegree" |
||||
|
class="addinputw" |
||||
|
placeholder="等级" |
||||
|
size="small" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="(item, i) in arrList" |
||||
|
:key="i" |
||||
|
:label="item.type" |
||||
|
:value="item.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
||||
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Start 项目列表头部 --> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">风险类别列表</div> |
||||
|
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
<!-- End 项目列表头部 --> |
||||
|
|
||||
|
<!-- Start 项目列表 --> |
||||
|
<div> |
||||
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" > |
||||
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column prop="name" label="类别名称" align="center" /> |
||||
|
<el-table-column prop="code" label="类别编号" align="center" /> |
||||
|
<el-table-column prop="content" label="分类说明" align="center" /> |
||||
|
<el-table-column prop="hierarchy" :formatter="formatorderdegree" label="层级" align="center" /> |
||||
|
<el-table-column prop="remarks" label="备注信息" align="center" /> |
||||
|
<el-table-column fixed="right" label="操作" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-tooltip class="item" effect="dark" content="编辑" placement="top-end"> |
||||
|
<i class="el-icon-edit-outline" @click="toEdit(scope.row)"></i> |
||||
|
</el-tooltip> |
||||
|
<el-tooltip class="item" effect="dark" content="删除" placement="top"> |
||||
|
<i class="el-icon-delete" @click="doDel(scope.row)"></i> |
||||
|
</el-tooltip> |
||||
|
<el-tooltip class="item" effect="dark" content="查看二级" placement="top-start"> |
||||
|
<i class="el-icon-notebook-2" @click="purchase(scope.row)"></i> |
||||
|
</el-tooltip> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination |
||||
|
v-show="dataList.length > 0" |
||||
|
:total="queryParams.total" |
||||
|
:page.sync="queryParams.current" |
||||
|
:limit.sync="queryParams.size" |
||||
|
class="pagination" |
||||
|
@pagination="loadList" |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<el-drawer |
||||
|
title="汇总工单数据详情" |
||||
|
:visible.sync="drawer" |
||||
|
size="86%"> |
||||
|
<div class="main-content"> |
||||
|
<el-descriptions class="margin-top" title="巡视工单信息" :column="5" :size="size"> |
||||
|
<el-descriptions-item label="工单名称">{{ TableList.ordername }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="工单编号">{{ TableList.orderno }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="客户名称">{{ TableList.custname }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="等级">{{ TableList.orderdegree }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="工单内容">{{ TableList.ordercontent }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="现场联系人">{{ TableList.receiveperson }}</el-descriptions-item> |
||||
|
<el-descriptions-item label="现场联系人电话">{{ TableList.receivetel }}</el-descriptions-item> |
||||
|
</el-descriptions> |
||||
|
</div> |
||||
|
</el-drawer> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/Risk/index' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './categoryAdd' |
||||
|
|
||||
|
export default { |
||||
|
name: 'DispatchOrderinfoIndex', |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
tableLoading: false, |
||||
|
drawer: false, |
||||
|
dataList: [], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
arr:[{value:1,type:'计划巡视'},{value:2,type:'专项巡视'},{value:3,type:'告警巡视'}], |
||||
|
arrList:[{value:1,type:'一般'},{value:2,type:'重要'},{value:3,type:'紧急'},{value:4,type:'督办'}], |
||||
|
multipleSelection: [], |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
size:'', |
||||
|
TableList:[] |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
// 初始化按钮 |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doClose': // 关闭 |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
doDel(row) { |
||||
|
const sids = [] |
||||
|
sids.push(row.sid) |
||||
|
const tip = '请确认是否是否删除该条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}) |
||||
|
.then(() => { |
||||
|
req |
||||
|
.delBySids(sids) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams.params = {} |
||||
|
this.queryParams.params.sid = '' // sid |
||||
|
this.queryParams.params.name = '' // 登录名 |
||||
|
this.dosearch() |
||||
|
}, |
||||
|
loadList() { |
||||
|
const _this = this |
||||
|
this.tableLoading = true |
||||
|
req |
||||
|
.RiskListPage(this.queryParams) |
||||
|
.then(resp => { |
||||
|
_this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
_this.queryParams.total = data.total |
||||
|
_this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
_this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
purchase(row){ |
||||
|
// this.drawer=true |
||||
|
req.selectRiskTypeSubordinate(row.sid).then((res)=>{ |
||||
|
console.log(res.data); |
||||
|
}) |
||||
|
}, |
||||
|
formatorderdegree: function( row, column) { |
||||
|
if(row.hierarchy === 1){ |
||||
|
return '一级' |
||||
|
}else{ |
||||
|
return '' |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
.margin-top { |
||||
|
border-bottom: 1px solid #ebebeb; |
||||
|
} |
||||
|
.item { |
||||
|
margin: 6px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,228 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!-- 标题按钮部分开始 --> |
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
<!-- 标题按钮部分结束 --> |
||||
|
<!-- Start 新增修改部分 --> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj"> |
||||
|
<el-card class="box-card"> |
||||
|
<div class="wlInfo"><span>风险类别</span></div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">类别名称:</span> |
||||
|
<el-input v-model="formobj.name" placeholder="类别名称" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">类别编号:</span> |
||||
|
<el-input v-model="formobj.code" placeholder="类别编号" class="item_input" clearable /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="item"> |
||||
|
<span class="item_text">分类说明:</span> |
||||
|
<el-input v-model="formobj.content" placeholder="分类说明" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">层级:</span> |
||||
|
<el-input v-model="formobj.hierarchy" placeholder="请输入层级" @input="hierarchy($event)" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item" v-show="viewState == 2" > |
||||
|
<span class="item_text">上级名称:</span> |
||||
|
<el-select |
||||
|
v-model="formobj.parentName" |
||||
|
class="item_input" |
||||
|
placeholder="请选择上级名称" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="(item, i) in arrList" |
||||
|
:key="i" |
||||
|
:label="item.name" |
||||
|
:value="item.name" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
<div class="item" style="height: 110px;"> |
||||
|
<span class="item_text">备注信息:</span> |
||||
|
<el-input type="textarea" |
||||
|
:autosize="{ minRows: 4, maxRows: 6 }" v-model="formobj.remarks" class="item_input" placeholder="备注信息" /> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
<!-- End 添加修改部分 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/Risk/index' |
||||
|
export default { |
||||
|
name: 'DispatchStandardsAdd', |
||||
|
data() { |
||||
|
return { |
||||
|
submitdisabled: false, |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
arrList: [], |
||||
|
formobj: { |
||||
|
name: '', |
||||
|
code: '', |
||||
|
content: '', |
||||
|
hierarchy: '', |
||||
|
parentSid: '', |
||||
|
parentName: '', |
||||
|
remarks: '' |
||||
|
}, |
||||
|
rules: { |
||||
|
name: [{ required: true, message: '风险等级名称不能为空', trigger: 'blur' }], |
||||
|
code: [{ required: true, message: '风险等级代码不能为空', trigger: 'blur' }], |
||||
|
handlingMethod: [{ required: true, message: '处理方式不能为空', trigger: 'blur' }], |
||||
|
reportTarget: [{ required: true, message: '报送单位不能为空', trigger: 'blur' }], |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
methods: { |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj.id = '' |
||||
|
this.formobj.sid = '' |
||||
|
this.formobj.name= '', |
||||
|
this.formobj.code= '', |
||||
|
this.formobj.content= '', |
||||
|
this.formobj.hierarchy= '', |
||||
|
this.formobj.parentSid= '' |
||||
|
this.formobj.parentName= '' |
||||
|
this.formobj.remarks= '' |
||||
|
|
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.viewTitle = '【新增】风险等级' |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.viewTitle = '【修改】风险等级' |
||||
|
const _this = this |
||||
|
const vdata = row |
||||
|
_this.formobj.id = vdata.id |
||||
|
_this.formobj.sid = vdata.sid |
||||
|
_this.formobj.name = vdata.name |
||||
|
_this.formobj.code = vdata.code |
||||
|
_this.formobj.handlingMethod = vdata.handlingMethod |
||||
|
_this.formobj.remarks = vdata.remarks |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
req |
||||
|
.saveRiskType(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
superior(){ |
||||
|
req |
||||
|
.selectRiskTypeFirst() |
||||
|
.then(resp => { |
||||
|
if(resp.code==200){ |
||||
|
this.arrList=resp.data |
||||
|
this.formobj.parentSid=resp.data[0].sid |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
hierarchy(e){ |
||||
|
if(e==2){ |
||||
|
this.viewState=2 |
||||
|
this.superior() |
||||
|
}else{ |
||||
|
this.viewState=1 |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.box-card { |
||||
|
margin-left: 60px; |
||||
|
margin-right: 60px; |
||||
|
min-width: 70%; |
||||
|
margin-top: 20px; |
||||
|
padding-bottom: 50px; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
margin-top: 15px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
|
||||
|
.item_text { |
||||
|
flex: 0.8; |
||||
|
font-size: 18px; |
||||
|
text-align: right; |
||||
|
} |
||||
|
|
||||
|
.item_input { |
||||
|
flex: 4; |
||||
|
font-size: 16px; |
||||
|
margin-left: 10px; |
||||
|
margin-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.item_left_input { |
||||
|
width: 20%; |
||||
|
} |
||||
|
|
||||
|
.item_left_text { |
||||
|
height: 30px; |
||||
|
margin-left: 20px; |
||||
|
line-height: 30px; |
||||
|
color: #018AD2; |
||||
|
padding: 0px 15px; |
||||
|
border: 1.5px solid #018AD2; |
||||
|
border-radius: 5px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.item_right { |
||||
|
flex: 1; |
||||
|
justify-items: center; |
||||
|
|
||||
|
.item_right_list_text { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.item_right_list_delect { |
||||
|
color: #5E94FF; |
||||
|
margin-left: 20px; |
||||
|
font-size: 16px; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue